A AsyncIO wrapper for DBM.
Project description
A AsyncIO wrapper for Python’s DBM library.
Description
Supports 100% of GDBM API
Typing support
Docstrings for all methods
To ensure DBM can be used safely with AsyncIO, all DB operations are serialized, i.e. only one DB operation occurs at any given time.
This library is primarily made for GDBM, but should work with other implementations too.
Usage
Here is a basic example on how to use the queue:
import asyncio
import aiodbm
async def main():
async with aiodbm.open("data.dbm", "c") as db: # opening/creating database
await db.set("alpha", "green") # creating new key alpha with value green
value = await db.get("alpha") # fetching value for key alpha
print(value)
await db.delete("alpha") # delete key alpha
asyncio.run(main())
Installation
You can install this library directly from PyPI with the following command:
pip install aiodbm
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiodbm-0.1.0a1.tar.gz
(6.8 kB
view hashes)