Skip to main content

backend for dogpile.cache with reading and writing on mongodb

Project description

Install

Use pip:

pip install dogpile_mongo

Usage

See the example.

Code:

from dogpile.cache import make_region

db = MongoClient()['test']
region = make_region().configure(
     'mongo',
     # arguments are same as mongo backend.
     arguments={
         'db': db,
     }
)

region.set("test", b"value")
region.set_multi({"key1": b"value1", "key2": 100})
print(region.get("test"))
print(region.get_multi(["key1", "key2"]))

Result:

$ python main.py
b'value'
[b'value1', b'100']

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

dogpile_mongo-0.0.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

dogpile_mongo-0.0.1-py2-none-any.whl (3.5 kB view details)

Uploaded Python 2

File details

Details for the file dogpile_mongo-0.0.1.tar.gz.

File metadata

  • Download URL: dogpile_mongo-0.0.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.15+

File hashes

Hashes for dogpile_mongo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bb6527bd6bc1f1e9ba4e9225a84aeb4394a3bc483d6966f4ee092d2b7e7126fc
MD5 3730a9dbe64e991aa679719bafd60bfb
BLAKE2b-256 021fd3859d50a02f0190f8bacb28fc9653b56e31bd2652c88b2aac050906df1d

See more details on using hashes here.

File details

Details for the file dogpile_mongo-0.0.1-py2-none-any.whl.

File metadata

  • Download URL: dogpile_mongo-0.0.1-py2-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.15+

File hashes

Hashes for dogpile_mongo-0.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 99ab222023f60dc86ed502f0efb77e93580577454854e16599978d99b0ef599b
MD5 43ecd87da622e2e5f64d6af6c60c748a
BLAKE2b-256 eda497177acff62dadd334c05b2336bfca707b6e3af99baa6bc539e9feabb165

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