Skip to main content

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.

Release files for litedb 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for litedb 1.1.0
File Size Uploaded
litedb-1.1.0.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for litedb 1.1.0
File Interpreter ABI Platform
litedb-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.9 kB

Release files / litedb-1.1.0.tar.gz

Download URL litedb-1.1.0.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
08d44bc81a99e598f465d224c290cec885c72cf9d9c2abe9fe25578e847fa68b
BLAKE2b-256 checksum
How to use checksums
05a647f66a8a04d8074108ac45b70edabb30b78c5ed2dea3c0ee6f96fbd00907
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / litedb-1.1.0-py3-none-any.whl

Download URL litedb-1.1.0-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59a37de91e644dbc1215fa402f758d748b7b02b8ee3718ad47ae0d5148409f60
BLAKE2b-256 checksum
How to use checksums
f92dc3064aaa539ae3579ed450f2b4af4c38184e07e5f1db1d63dfa741f448da
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page