python-gdbm@3.12

Python 3.12 interface to gdbm database library

brewmacoslinux
Try with needOr install directly
Source

About

Python interface to gdbm

Commands

python3.12

Examples

Open and create a gdbm database file$ python3.12 -c "import gdbm; db = gdbm.open('mydb.db', 'c'); db['key'] = b'value'; db.close()"
Read values from an existing gdbm database$ python3.12 -c "import gdbm; db = gdbm.open('mydb.db', 'r'); print(db[b'key']); db.close()"
Iterate through all keys in a gdbm database$ python3.12 -c "import gdbm; db = gdbm.open('mydb.db', 'r'); print(list(db.keys())); db.close()"