Simple ang lightweight document oriented database
Project description
LemonDB
Development Status: Beta
Simple ang lightweight document oriented database written in pure Python 3
(3.9)
Examples
Data insertion Example:
from lemondb import LemonDB
db = LemonDB('db')
db.insert({'name': 'John Doe'})
Query Example
LemonDB.Search
can accept 3 types of parameters:
- Standard
Query
class - Regular Expression
- Lambda Functions
from lemondb import LemonDB
from lemondb import Query
db = LemonDB('db')
db.insert_many([
{'name': 'John Doe'},
{'name': 'Elizabeth Doe'}
])
data = db.search(query.name == 'John Doe')
print(data)
# Output: John Doe
#: Using lambda
data = db.search(lambda x: x['name'] == 'John Doe')
print(data)
# Output: John Doe
#: Using regular expression
data = db.search(
query='^J(.*?)e$' #: Match when the first string is J and endswith e
)
print(data)
# Output: John Doe
Encrypted LemonDB
You can use Sidle Encryption within the LemonDB. Just use the SidleMiddleware
and SidlePlugin
from lemondb import LemonDB
from lemondb.middleware import SidleMiddleware
from lemondb.plugin import SidlePlugin
db = LemonDB(
name = 'sidle_db',
middleware_cls = SidleMiddleware(password='password123'),
plugin_cls = SidlePlugin
)
db.insert({'name': 'John Doe'})
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
lemondb-0.0.2.tar.gz
(13.8 kB
view details)
File details
Details for the file lemondb-0.0.2.tar.gz
.
File metadata
- Download URL: lemondb-0.0.2.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 447457ee6259e1caf190ab3ddc04b0bc568d5926ec21da4c2263b34e4050440a |
|
MD5 | 37c941659f77496b1908addd80056ea9 |
|
BLAKE2b-256 | d9dd7099b20efda9fb753823290b84cea506797b39818d309967735216323d7f |