Another stupid library for using json as Database
Project description
AshenDB
AshenDB is a another stupid library for using json as Database. It mimics MongoDB functionalities.
Why AshenDB?
MongoDB : Needs a server to run. You can clone your MongoDB to AshenDB. AshenDB is highly inspired from MongoDB, it uses MongoDB like syntax, which makes it easy to use for beginners as well as for MongoDB users.
TinyDB : Too simple. Query and Update Operators such as $set, $inc are not supported. Check all the supported Operators in AshenDB. Also it is not thread safe.
JsonDB : It is not thread safe. Neither it supports mongodb like syntax.
Why not AshenDB?
It is immature. It doesn’t use separate server but uses json as a database. Which may be good for small or medium projects but for large and scalable projects it is recommended to use MongoDB with Redis as a cache.
Installation
It is available on PyPI. You can install it using pip.
pip install ashendb
Usage
>>> from ashendb import AshenDB
# Assuming you are inside a async function
>>> db = await AshenDB.get_db('test')
>>> db
<AshenDB: test>
>>> coll = await db.get_coll('users')
>>> coll
<Collection: users>
>>> doc = await coll.get_doc('user1')
>>> doc
<Document: user1>
>>> print(doc)
{'_id': 'user1'}
Documentation
Documentation is available at Read the Docs.
Contributing
Open an issue.
Fork the repository -> New Branch -> Make Changes -> Open a Pull Request.
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
Built Distribution
File details
Details for the file AshenDB-0.0.8.tar.gz
.
File metadata
- Download URL: AshenDB-0.0.8.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2bd476ae34863955b1068742f95416b4a61566ef5e28fd8a48953819cfbe888 |
|
MD5 | 6278d5bcfe8ac5b8207c05f551df68fd |
|
BLAKE2b-256 | ba433bcf50fa5ed117ad08dd669b30aad15f09088cd6d65b60d94918e0679a2f |
File details
Details for the file AshenDB-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: AshenDB-0.0.8-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d07ffb1fddecd51043f146c00490170d2b62f2bb40a982ae59a2a24dda10681b |
|
MD5 | d237177de0eefe6c80dcc2f9cd37beae |
|
BLAKE2b-256 | 7a27e14c68bc6490bc1bb27f4fe3191eb99f84abe8c9b7df0cfac62dcec4f177 |