Skip to main content

Pyramid Mongokit Extension

Project description

https://travis-ci.org/hadrien/pyramid_mongokit.png?branch=master https://pypip.in/d/pyramid_mongokit/badge.png

A simple Pyramid extension that registers a mongokit connection as an attribute of the request object.

Expects MONGO_URI in os.environ.

If provided as environment variables, MONGO_DB_PREFIX will be used as prefix for any databases and MONGO_DB_NAME for database name.

Source code & example on https://github.com/hadrien/pyramid_mongokit

Changelog

Development

  • Add register decorator to register documents to mongokit and generate indexes when doing a config.scan.

  • Add an introspectable for each registered document.

0.1.1

  • Add name when registring utility to zope registry to be compatible with zope.interface==4.1.0

0.1

  • Use MongoReplicaSetClient when specified by mongo uri.

  • Mongo Session lazily opened.

  • Add config directives to register and index documents and to get mongo connection.

0.0.6

  • Read preference set to secondary preferred by default at construct time.

0.0.5

  • Break compatibility with 0.0.4 as register_document does not generate indexes anymore.

  • Add generate_index function.

  • Break apart Connection classes: MongoConnection is not anymore tied to a single databases and SingleDbCOnnection is tied to a single database.

  • Add an example used for documenting and functional testing.

0.0.4

  • registering document ensures index are created.

0.0.0

  • Initial version

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

pyramid_mongokit-0.2-dev0.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file pyramid_mongokit-0.2-dev0.tar.gz.

File metadata

File hashes

Hashes for pyramid_mongokit-0.2-dev0.tar.gz
Algorithm Hash digest
SHA256 9fd4bc2a5e2d5f943a94f0015ad35f0f5cca4fded0a33c3bd030b00364235d6b
MD5 5afa4dc08ec9b1eb7adf8b091002af0a
BLAKE2b-256 3e16bce5d5b8240f5f771ae1567019618a37c5f8d22340be491b958fa79cb18e

See more details on using hashes here.

Supported by

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