+
Skip to content

Tezar/aiostalk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aiostalk

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.

About

(fork only for making PR) Small & shameless Python beanstalkd client - for

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载