No project description provided
Project description
mongo_emb
install
pip install mongo_emb
embed mongodb implemented by rust with python api
from mongo_emb import PyMongoEmb
db = PyMongoEmb("db23")
col = db['test']
data = [{"foo": "ba", "titi": "kpkp"}]
col.insert_one(data[0])
print(col.len())
col.update_one({"_id": '68f73fe7790a4a5d60d08dba'}, {"$set": {"xx": 12}}, upsert=True)
for i in col.find({}):
print (i)
col.delete_one({'titi': 'kpkp'})
print(col.len())
Current methods supported for collection
- delete_one
- delete_many
- find
- find_one
- insert_many
- insert_one
- len
- name
- update_many (with upsert option)
- update_one (with upsert option)
- aggregate
embed kv store implemented by rust redb with python api
from mongo_emb import PyRedb
db = PyRedb("./test.rdb", "test")
db.write("foo", "xxx")
db.read("foo")
db.keys()
db.delete("foo")
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
mongo_emb-1.0.4.tar.gz
(16.0 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mongo_emb-1.0.4.tar.gz.
File metadata
- Download URL: mongo_emb-1.0.4.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
970ab253a1f881e34dd4253347d350c4a84d1ac197f7494a88e27b957c1bee52
|
|
| MD5 |
4f8b2f6d61125910a296f3af0c5f4c2b
|
|
| BLAKE2b-256 |
c9cac6d403a330177d2a26ba77febea3ac307c1d432e14e35b0f8c4521aa45bb
|
File details
Details for the file mongo_emb-1.0.4-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: mongo_emb-1.0.4-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2298697cc7c2875c2ae4fae3546f76eb4f4b1667ac5ce22ea8a7dae64fd6109e
|
|
| MD5 |
18c3e6b9207875f176163555ca9f15aa
|
|
| BLAKE2b-256 |
b6297d09b7ea5d20b9bfeef2037b67210e506bb5e96a40230e2ca30c92f05871
|
File details
Details for the file mongo_emb-1.0.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mongo_emb-1.0.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f29d42da7f753184357332ccfebe68c92b598d532e2c2811d15d61dd6aa574c0
|
|
| MD5 |
2a4d53eb0486f07271573e9c1ae9c599
|
|
| BLAKE2b-256 |
d3e7b4d0ea6fe085711a33f073657e0095af51a44f6356dba859e4e9e0a46207
|