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.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aiostalk-1.3.tar.gz
Algorithm Hash digest
SHA256 024d366a3347c60ce044f3566d83575c5697c6f4a04947428606140ff5a3788b
MD5 12d4a6c08449f836d9da9f59a873373e
BLAKE2b-256 659be3d1f01ca5f2bfd1c35d67c92183d3372b719452761413c4f3bc965478ac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiostalk-1.3-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.12.3

File hashes

Hashes for aiostalk-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5cc88872bb4fcbae886826a234b78c62922705c205cf844b5bdbb7974233e738
MD5 a2c093fd323ca79fec0ebeb8e66305a3
BLAKE2b-256 47521ca632fa72de37f6637dca425e6d93bcd0b6933dd1c2cbfc10168fd1e010

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