Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webmediator-0.9.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file webmediator-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: webmediator-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.2

File hashes

Hashes for webmediator-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 213402e875365f8df9e6e1605505c35af876ccca5876adcdcb6d35c76fd37cae
MD5 5c31f790df4261a1bcfbf35906fdedc4
BLAKE2b-256 fd58b7d84bb7e564ecbc570fa1340e3df023e76e2ac0ce5a8adc342aab62108e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page