Skip to main content

LemonDB

LemonDB is a simple and lightweight document oriented database written in pure Python 3 tried on version: 3.9 & 3.8. It should work on versions <= 3.7. This class handle all operation including storing document on a file.

Example:

from lemondb import LemonDB
db = LemonDB('test.db')
db.insert_many([{'name': 'Zenqi'}, {'name': 'John Doe'}, {'name': 'Elizabeth Doe'}])

# Search from database using `find` or `search`
for i in db.find('Doe').where(lambda x: x['name'].startswith('John')):
  print(i)
  #: {'name': 'John Doe'}
  
#: You can use the query or dict
from lemondb import Query
query = Query()
print(db.find_one(query.name == 'Zenqi')))
#: {'name': 'Zenqi'}

print(db.find_one({'name': 'Zenqi'}))
#: {'name': 'Zenqi'}

📌 New Features in 1.x Series!

  • Different types are now supported!
  • Searching / filtering were improved.

Have you ever wanted to serialize a datetime object? and other type object that standard JSON could'nt serialized? Well lemondb now support those. Search & filtering were improved. LemonDB now using cursors. Don't believe me? Try this out

from lemondb import LemonDB
from datetime import datetime

# Adding datetime object
db = LemonDB('test.json')
db.insert({'name': 'John Doe', 'elapsed-time': datetime.now()})

# Searching now accept dict queries
db.find_one({'name': 'John Doe'})

Metadata

Release files for lemondb 1.0.3

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

Source distribution (sdist)

Source distribution for lemondb 1.0.3
File Size Uploaded
lemondb-1.0.3.tar.gz 20.3 kB Details

Release files / lemondb-1.0.3.tar.gz

Download URL lemondb-1.0.3.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
eee9f6b05e99f61a138a21df32622b460d031ff0a141e18f60c1b7570ebde845
BLAKE2b-256 checksum
How to use checksums
db6fd27fd0f745893e69e4eccd248258844038619da28ffc3358202d3c38a3a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

0.0.0

1 release file

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