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

Uploaded Source

Built Distribution

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

aiostalk-1.3.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aiostalk-1.3.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for aiostalk-1.3.1.tar.gz
Algorithm Hash digest
SHA256 a2ce935e04051671489b6e5bec88188e5ebad3450dedb9f13a47356c458fa03d
MD5 6b53f005a95689f7a892a28d4240044e
BLAKE2b-256 1008a48a6921410e640113532d67640739b30a2043a1301372b2803965d49839

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiostalk-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for aiostalk-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8286e87aabd9f5df13a486280ea65bed711b75a3281051f2bca6bf8bee48c89
MD5 9218a342a2d5fa8e8071a11a9560048f
BLAKE2b-256 7a123b0f57e869b1912c9288fa5025a80220be6987c5e2abecf45021491346d6

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