Skip to main content

A Python 3 asyncio client for the beanstalkd work queue

Project description

aiostalk is a small and shameless Python client library for communicating with the beanstalkd work queue.

It is based on (and requires) another library called greenstalk by Justin Mayhew.

Getting Started

Presuming beanstalkd running on localhost at standard port.

>>> import asyncio
>>> import aiostalk
>>>
>>> async def main():
...    client = aiostalk.Client(('127.0.0.1', 11300))
...    await client.connect()
...    job_id = await client.put('hello')
...    print(job_id)
...    job = await client.reserve()
...    print(job.id)
...    print(job.body)
...    await client.delete(job)
...    await client.close()
>>>
>>> asyncio.run(main())
1
1
hello

Using the Client as an asyncio context manager is also supported.

Documentation

Please see greenstalk docs at Read the Docs.

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

aiostalk-1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

aiostalk-1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file aiostalk-1.2.tar.gz.

File metadata

  • Download URL: aiostalk-1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for aiostalk-1.2.tar.gz
Algorithm Hash digest
SHA256 5030695d679a07db3a9cfba1657340ab3d8226acdb03ec6ed23042d22a9176af
MD5 d1dcc5d41632e6ba9cebb03d6ca5c418
BLAKE2b-256 3522fe0cffc8cdb5294bf203f4915e20b9827b94e3a2810ae289c0a0274356de

See more details on using hashes here.

File details

Details for the file aiostalk-1.2-py3-none-any.whl.

File metadata

  • Download URL: aiostalk-1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for aiostalk-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e75487097cccb1ec9ad39b8387096e28ec43ac4beb9dfb061497bbb6856dacf6
MD5 74cd912c5b8bd0a948716d6700092229
BLAKE2b-256 aed4bc05da2d1b2b124a35114ac6e0011fea654a9ee418bfdba6852a2035e267

See more details on using hashes here.

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