Skip to main content

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


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)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mongo_emb-1.0.4-cp38-abi3-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.8+Windows x86-64

mongo_emb-1.0.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

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

Hashes for mongo_emb-1.0.4.tar.gz
Algorithm Hash digest
SHA256 970ab253a1f881e34dd4253347d350c4a84d1ac197f7494a88e27b957c1bee52
MD5 4f8b2f6d61125910a296f3af0c5f4c2b
BLAKE2b-256 c9cac6d403a330177d2a26ba77febea3ac307c1d432e14e35b0f8c4521aa45bb

See more details on using hashes here.

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

Hashes for mongo_emb-1.0.4-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2298697cc7c2875c2ae4fae3546f76eb4f4b1667ac5ce22ea8a7dae64fd6109e
MD5 18c3e6b9207875f176163555ca9f15aa
BLAKE2b-256 b6297d09b7ea5d20b9bfeef2037b67210e506bb5e96a40230e2ca30c92f05871

See more details on using hashes here.

File details

Details for the file mongo_emb-1.0.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mongo_emb-1.0.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f29d42da7f753184357332ccfebe68c92b598d532e2c2811d15d61dd6aa574c0
MD5 2a4d53eb0486f07271573e9c1ae9c599
BLAKE2b-256 d3e7b4d0ea6fe085711a33f073657e0095af51a44f6356dba859e4e9e0a46207

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page