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.1-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: webmediator-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 21.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1e5676681938575a127ab57e3ec34815d8e9dfd7c0857b079b2bf1a02a7f66a
MD5 ace9e915399b0b1c53024b5e73c656f1
BLAKE2b-256 f5216d02de18d9f6d2988d4457390b3345833b920fa74520d022fc1b209cf489

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