Skip to main content

Python SDK for bidq

Project description

pybidq

Python SDK for bidq

Usage

import asyncio
from bidq import BidQ


async def setup_worker():
    client = await BidQ.create()

    @client.worker("add")
    def add(x, y):
        return x + y

    await client.serve()


async def send_job():
    client = await BidQ.create()
    jid = await client.submit("add", {"x": 1, "y": 2}, 0.2)
    try:
        print(await client.get(jid))
    except Exception as e:
        print(e)
    await client.close()


# asyncio.run(send_job())
asyncio.run(setup_worker())

Project details


Download files

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

Source Distribution

bidq-0.0.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

bidq-0.0.1-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

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