forked from Narcissus/pylibmeshctrl
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ed332ca4c | ||
|
|
5f0f6a0ff9 | ||
|
|
c576eae48b | ||
|
|
afb939b25e |
@@ -205,8 +205,8 @@ package:
|
|||||||
.. |the repository service| replace:: GitHub
|
.. |the repository service| replace:: GitHub
|
||||||
.. |contribute button| replace:: "Create pull request"
|
.. |contribute button| replace:: "Create pull request"
|
||||||
|
|
||||||
.. _repository: https://github.com/HuFlungDu/meshctrl
|
.. _repository: https://github.com/HuFlungDu/pylibmeshctrl
|
||||||
.. _issue tracker: https://github.com/HuFlungDu/meshctrl/issues
|
.. _issue tracker: https://github.com/HuFlungDu/pylibmeshctrl/issues
|
||||||
.. <-- end -->
|
.. <-- end -->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
53
README.rst
53
README.rst
@@ -29,15 +29,60 @@
|
|||||||
|
|
||||||
|
|
|
|
||||||
|
|
||||||
=============
|
|
||||||
meshctrl
|
meshctrl
|
||||||
=============
|
========
|
||||||
|
|
||||||
|
Library for remotely interacting with a
|
||||||
|
`MeshCentral <https://meshcentral.com/>`__ server instance
|
||||||
|
|
||||||
Libmeshctrl implementation in python
|
Installation
|
||||||
|
------------
|
||||||
|
|
||||||
|
pip install meshctrl
|
||||||
|
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
This module is implemented as a primarily asynchronous library
|
||||||
|
(asyncio), mostly through the ``Session`` class, which is exported as
|
||||||
|
default. Because the library is asynchronous, you must wait for it to be
|
||||||
|
initialized before interacting with the server. The preferred way to do
|
||||||
|
this is to use the async context manager pattern:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
|
import meshctrl
|
||||||
|
|
||||||
|
async with meshctrl.session.Session(url, **options):
|
||||||
|
print(await session.list_users())
|
||||||
|
...
|
||||||
|
|
||||||
|
However, if you prefer to instantiate the object yourself, you can
|
||||||
|
simply use the ``initialized`` property:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
|
session = meshctrl.session.Session(url, **options)
|
||||||
|
await session.initialized.wait()
|
||||||
|
|
||||||
|
Note that, in this case, you will be rquired to clean up tho session
|
||||||
|
using its ``close`` method.
|
||||||
|
|
||||||
|
Session Parameters
|
||||||
|
------------------
|
||||||
|
|
||||||
|
``url``: URL of meshcentral server to connect to. Should start with
|
||||||
|
either "ws://" or "wss://".
|
||||||
|
|
||||||
|
``options``: optional parameters. Described at `Read the
|
||||||
|
Docs <https://pylibmeshctrl.readthedocs.io/en/latest/api/meshctrl.html#module-meshctrl.session>`__
|
||||||
|
|
||||||
|
API
|
||||||
|
---
|
||||||
|
|
||||||
|
API is documented in the `API
|
||||||
|
Docs <https://pylibmeshctrl.readthedocs.io/en/latest/api/meshctrl.html>`__
|
||||||
|
|
||||||
This is a library for interacting with a Mesh Central instance programatically. Written in python.
|
|
||||||
|
|
||||||
|
|
||||||
.. _pyscaffold-notes:
|
.. _pyscaffold-notes:
|
||||||
|
|||||||
13
setup.cfg
13
setup.cfg
@@ -5,23 +5,18 @@
|
|||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
name = meshctrl
|
name = meshctrl
|
||||||
description = Add a short description here!
|
description = Python package for interacting with a Meshcentral server instance
|
||||||
author = Josiah Baldwin
|
author = Josiah Baldwin
|
||||||
author_email = jbaldwin8889@gmail.com
|
author_email = jbaldwin8889@gmail.com
|
||||||
license = MIT
|
license = MIT
|
||||||
license_files = LICENSE.txt
|
license_files = LICENSE.txt
|
||||||
long_description = file: README.rst
|
long_description = file: README.rst
|
||||||
long_description_content_type = text/x-rst; charset=UTF-8
|
long_description_content_type = text/x-rst; charset=UTF-8
|
||||||
url = https://github.com/pyscaffold/pyscaffold/
|
url = https://github.com/HuFlungDu/pylibmeshctrl/
|
||||||
# Add here related links, for example:
|
# Add here related links, for example:
|
||||||
project_urls =
|
project_urls =
|
||||||
Documentation = https://pyscaffold.org/
|
Documentation = https://pylibmeshctrl.readthedocs.io/
|
||||||
# Source = https://github.com/pyscaffold/pyscaffold/
|
Source = https://github.com/HuFlungDu/pylibmeshctrl/
|
||||||
# Changelog = https://pyscaffold.org/en/latest/changelog.html
|
|
||||||
# Tracker = https://github.com/pyscaffold/pyscaffold/issues
|
|
||||||
# Conda-Forge = https://anaconda.org/conda-forge/pyscaffold
|
|
||||||
# Download = https://pypi.org/project/PyScaffold/#files
|
|
||||||
# Twitter = https://twitter.com/PyScaffold
|
|
||||||
|
|
||||||
# Change if running only on Windows, Mac or Linux (comma-separated)
|
# Change if running only on Windows, Mac or Linux (comma-separated)
|
||||||
platforms = any
|
platforms = any
|
||||||
|
|||||||
Reference in New Issue
Block a user