This requires QDBM C Library (http://fallabs.com/qdbm/index.html)
Example code:
from qdbm import depot
db = depot.open(“test.db”, “n”) # depot.open(FILENAME, FLAG)
db[“apple”] = “red” # add data db[“lemon”] = “black” db[“orange”] = “orange”
db[“lemon”] = “yellow” # update data
print db[“lemon”] # get value that key is “lemon”
print db.get(“orange”, “unknown”) # get data with default value (returns orange)
print db.get(“melon”, “unknown”) # get data with default value (returns unknown)
print db.keys() # get list of keys (Python2), get iterator of keys (Python3)
print db.listkeys() # get list of keys (Python3)
- for k in db.iterkeys(): # get iterator of keys (Python2)
print k
- for k in db.keys(): # get iterator of keys (Python3)
print k
- for k, v in db.iteritems(): # get iterator of (key, value) (Python2)
print k, v
- for k, v in db.items(): # get iterator of (key, value) (Python3)
print k, v
- for v in db.itervalues(): # get iterator of values (Python2)
print v
- for v in db.values(): # get iterator of values (Python3)
print v
db.close() # close database object
- Flags:
r: Read Only
w: Read / Write
c: Read / Write (create if not exists)
n: Read / Write (always create new file)
Metadata
Release files for pyqdbm 0.9.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyqdbm-0.9.6.tar.gz | 7.0 kB | Without provenance | Details for pyqdbm-0.9.6.tar.gz |
Release files / pyqdbm-0.9.6.tar.gz
| Download URL | pyqdbm-0.9.6.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
710d5f4d7fa8fd5b197ced65bb43b173c53ad53bfa1adaa82809b5205200e7c2
|
|
BLAKE2b-256 checksum How to use checksums |
26419b27bde24af27dc5e3c95ec7468f8f2c0649ff6eb6dd6c125e4c2125ccbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyqdbm 0.9.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.