Python Red Forester async client
Project description
Python Red Forester async client
This is early version of Red Forester API wrapper.
Current API limitations:
- node-links are ignored
Todo:
- complete node API
- partial map loading
- comments API
- node_type API
- map API
- map event listening
- source code
Usage Example
To work with wrapper, you need to run Python event_loop
.
async def task():
async with MindMap('map_id', ('username', 'password_md5_hash')) as mm:
# At this moment you can access map nodes,
# map users and map types through mm object.
# Can create and update nodes
# mm.root is map root Node.
# Node model has methods to find childs and ancestors Nodes.
# mm object has methods to act with API.
pass
loop = asyncio.get_event_loop()
loop.run_until_complete(task())
MindMap usage:
MindMap(map_id: str,
token: Tuple[str, str], # username (email) + md5 hash
view_root_id=None, # id of root Node
# temporary way to ignore node-links from outside of loading branch
ignore_out_of_branch=False,
# session_id is identifier of user-session. Allows to detect you own events
# (if you do events listening)
session_id=None
)
You also can instantiate MindMap(...)
without context manager (with
),
but you will need to call await mm.init()
and await mm.close()
manually.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rf_client-0.1.2.tar.gz
(8.3 kB
view hashes)
Built Distribution
rf_client-0.1.2-py3-none-any.whl
(10.5 kB
view hashes)
Close
Hashes for rf_client-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b176dbe86766017da81af40472ecbb1a19f9e8ab0ebb51473a2a2b1dfe6a31e6 |
|
MD5 | 7c22c9477ba3b0e3df24c1f8a53d6252 |
|
BLAKE2b-256 | 0593c4ee1c47795eff18a849136012038b6c8052264eb108664b6e77b9f270d4 |