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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aiostalk-1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5

File hashes

Hashes for aiostalk-1.0.tar.gz
Algorithm Hash digest
SHA256 1b88e8809d7726af9fde87c6e36af39d07ddaba6d8df32a83eaa6ae5ee4e4ab5
MD5 2d61c01497ee34ddddac4fbf8554575d
BLAKE2b-256 05e9e53986125b73305f739a0fee8de3a01ff2c0c71fe7d02f473c35f080d1fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aiostalk-1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.5

File hashes

Hashes for aiostalk-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 740d4967825a58d7c88a2cb2e44fe766ec95eb5505bc8e343e7954bacfc705c3
MD5 e614264ac26cf9e1e377b8a02dc25c55
BLAKE2b-256 81f9e30ab4b24566910a4eff0e2551e596d19344f264421d44b3ff876b9cac67

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