Skip to main content

A pure Python NoSQL database

Project description

liteDB

.. image:: https://travis-ci.org/JonathanVusich/litedb.svg?branch=master&kill_cache=1 :target: https://travis-ci.org/JonathanVusich/litedb :alt: Build Status

.. image:: https://coveralls.io/repos/github/JonathanVusich/litedb/badge.svg?branch=master :target: https://coveralls.io/github/JonathanVusich/litedb?branch=master :alt: Coverage

.. image:: https://readthedocs.org/projects/litedb/badge/?version=latest :target: https://litedb.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

liteDB is a Python NoSQL database that was created to make databases easy. It is designed with clean and simple APIs, and comes in a couple of different implementations for specific use cases.

When should I use liteDB?

liteDB is the perfect tool for small projects where performance is of less concern than ease of use and clean, Pythonic APIs. When you don't want to go through the hassle of setting up an SQL database but don't want to rely on JSON data storage, liteDB is the solution. It works by using pickle to serialize arbitrary Python classes, and allows users to perform index-based searches on stored objects. It also is written using no platform-specific APIs so that it is completely cross-platform.

Future planned features

  • Database compression using gzip
  • Encryption
  • Better docs
  • Useful examples

Current performance/optimization problems

Note: This section is aimed mostly at developers who need the highest levels of performance. For most tasks, LiteDB will be quite performant.

  • The main performance cost in autoDB is the serialization and deserialization of Python objects. liteDB uses the pickle library for this task since it is able to serialize arbitrary Python types, which removes the need for the user to define custom classes for serialization. pickle has a couple of downsides though, including slow performance and security issues when unencrypted. An obvious solution to this problem is to use JSON for object serialization. However, this would require all stored objects to follow a predefined format and only contain data that is easy to serialize. This is a fairly large downside, as it would involve the user having to build their system for liteDB rather than just using it as a plug-and-play solution. The serialization engine will probably have to be implemented with JSON and tested extensively before this design decision can be fully resolved.

  • The index map can take up a considerable amount of memory when there are millions of unique objects in the database. This is due to the automatic indexing of any suitable object attribute. Perhaps the user should be able to select their desired indexes in order to save memory. Also, indexes may be able to be more efficiently implemented using lists instead of sets.

Can I contribute to liteDB?

Yes, you absolutely can! Any and all help with future functionality and the above issues is very welcome. Just fork the repository, and begin experimenting. If you come up with something that you believe is really good, be sure to share it by opening a PR!

Development status

This project has exited the implementation phase and has graduated to a beta release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

litedb-1.1.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

litedb-1.1.0-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file litedb-1.1.0.tar.gz.

File metadata

  • Download URL: litedb-1.1.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for litedb-1.1.0.tar.gz
Algorithm Hash digest
SHA256 08d44bc81a99e598f465d224c290cec885c72cf9d9c2abe9fe25578e847fa68b
MD5 7405bb151e8aada70a379689d84e9c0c
BLAKE2b-256 05a647f66a8a04d8074108ac45b70edabb30b78c5ed2dea3c0ee6f96fbd00907

See more details on using hashes here.

File details

Details for the file litedb-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: litedb-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for litedb-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59a37de91e644dbc1215fa402f758d748b7b02b8ee3718ad47ae0d5148409f60
MD5 4ac44566c69e848ecebfb74c723b752b
BLAKE2b-256 f92dc3064aaa539ae3579ed450f2b4af4c38184e07e5f1db1d63dfa741f448da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page