Python sync/async client for the WebMediator API
Project description
webmediator
Python sync/async client for the WebMediator API.
Sync
import webmediator
client = webmediator.Client('https://localhost:7263/mediator')
response = client.send('Ping', {'Message':'EXAMPLE' }):
print(response)
Async
import webmediator
import asyncio
async def main():
mediator = webmediator.AsyncClient('http://localhost:5263/mediator')
response = await client.send('Ping', {'Message':'EXAMPLE' }):
print(response)
if __name__ == "__main__":
asyncio.get_event_loop().run_until_complete(main())
Console output:
type: Pong, data: {'Message': 'EXAMPLE PONG'}
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
webmediator-0.9.2.tar.gz
(6.6 kB
view details)
File details
Details for the file webmediator-0.9.2.tar.gz.
File metadata
- Download URL: webmediator-0.9.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4ef73fdd3d8b34ce1d54b6d94072f44d1651b2dc00dd3969b161dd999585c0e
|
|
| MD5 |
b263593cdef39972bf9771ec19972975
|
|
| BLAKE2b-256 |
94a6ed918546164a7a1787e3d5558d7d9f4fa5e7bf18ca135950ae1750be3388
|