Database library for Python based on LMDB storage engine
Project description
PYNNDB2 - Python Native Nosql DataBase library
This is version 2 of the Python NoSQL database library, for more complete documentation please visit https://pynndb.madpenguin.uk or browse around the source code in this repository.
Please note that this library should be backwards compatible with V1 with regards to databases but NOT the API. The API has been reworked so you will need to modify any existing applications in order to use V2. The changes are more semantic than structural and upgrading should not be too onerous. Also, there are new features in V2 which are not available in V1, so once you've started using a database with the V2 library, it's probably best not to move backwards, although if you've not used compression or full function indexes, moving back should be ok.
PyNNDB is a NoSQL Database library implemented in Python utilising the LMDB key-value storage store for back-end functionality. Although there might be an immediate perception that this idea might result in something that is a little "slow", it consists of a python layer backed by a powerful engine written in 'C', much like other popular Python database solutions and as a result generally compares favourably.
The idea of database logic coded in Python came about after many years of using both SQL and NoSQL databases with Python to write Cloud based microservices and coming across issued that were difficult to address with current main-stream solutions. Notably, it became apparent that the performance bottleneck in these applications ended up being in the Python layer between the application and the back-end database, a layer often added as a compatibility options to allow Python applications to access the database. This raised the question, "what if we pick a faster back-end, and make this Python layer a first-class component rather than an after-thought?"
Features
- NoSQL database library written in Python using the LMDB C-extension as a base KV store
- Primary ObjectId() based indexes for all objects
- Mutiple secondary indexes based on Python functions, supporting unique and duplicates
- Transparent compression / decompression (currently zStd and Snappy)
- Powerful and flexible search routines
- Designed to work in a multi-processor environment / multiprocessing IPC
- Inherits the features of LMDB including ACID transaction processing
Notes
- IF you are upgrading from 2.0 to 2.1 please be aware that the format of ObjectId has changed, so if your code relies on the ordering of ObjectId and you work with persistent data, you will probably want to rewrite your data with the new ObjectId for consistency.
About the code
Version 2 is coded for Python 3.7+ and makes use of Python3's new "typing" module with a view to self-documentation. All of the API documentation (and many of the examples) are documented automatically 100% from source code using the documentation routes contained within this repository, for example;
If you have problems or spot any bugs, please feel free to log an issue on the Bug Tracker or alternatively connect on Keybase
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
Built Distribution
File details
Details for the file pynndb2-2.2.9.tar.gz
.
File metadata
- Download URL: pynndb2-2.2.9.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7b6ac463cd2d35336b05468f4f515151db9f45b0651c17fa614c81dc4aa9135 |
|
MD5 | af2cd47f1c0f71b9670fb49ca6288188 |
|
BLAKE2b-256 | ccdd5cf644ac3f7370ea7c85dce0acacf4b580c831e174a94b8afba5bcc0a4a6 |
File details
Details for the file pynndb2-2.2.9-py3-none-any.whl
.
File metadata
- Download URL: pynndb2-2.2.9-py3-none-any.whl
- Upload date:
- Size: 38.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d38deb0e9313b39a09820bb24a33a92f6bda91fd981e6f10d4a787e3e9df5a3 |
|
MD5 | 5dd4676e5341a2c9038d69b956cdc659 |
|
BLAKE2b-256 | e09345f1b42aedfbfc61cb590db26c1240aac8091af14339ff5322c91ad2f50e |