Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

https://img.shields.io/coveralls/MarkLark/dstore-mongo.svg https://img.shields.io/travis/MarkLark/dstore-mongo/master.svg https://img.shields.io/pypi/v/dstore-mongo.svg https://img.shields.io/pypi/pyversions/dstore-mongo.svg

DStore-Mongo is a MongoDB storage layer for DStore. This allows you to use the same Model descriptions to Create, Read, Update and Delete from a Mongo DataBase.

Installing

DStore-Mongo is available from the PyPi repository.

This means that all you have to do to install DStore-Mongo is run the following in a console:

$ pip install dstore-mongo

Minimal Example

from dstore import Model, var, mod
from dstore_mongo import MongoStore

class Car( Model ):
    _namespace = "cars.make"
    _vars = [
        var.RowID,
        var.String( "manufacturer", 32, mods = [ mod.NotNull() ] ),
        var.String( "make", 32, mods = [ mod.NotNull() ] ),
        var.Number( "year", mods = [ mod.NotNull(), mod.Min( 1950 ), mod.Max( 2017 ) ] ),
    ]

# Create the MemoryStore instance, and add Models to it
store = MongoStore( self.models )
store.init_app()
store.set_config({
    "DSTORE_DB_HOST"  : "localhost",
    "DSTORE_DB_USER"  : "username",
    "DSTORE_DB_PASSWD": "password",
    "DSTORE_DB_DB"    : "dstoredb"
})
store.connect()
store.create_all()

# Destroy all instances and shut down the application
store.destroy_all()
store.disconnect()
store.destroy_app()

Documentation: ReadTheDocs

Source Code: GitHub

Release files for DStore-Mongo 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DStore-Mongo 0.1.0a1
File Size Uploaded
DStore-Mongo-0.1.0a1.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DStore-Mongo 0.1.0a1
File Interpreter ABI Platform
DStore_Mongo-0.1.0a1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 8.4 kB

Release files / DStore-Mongo-0.1.0a1.tar.gz

Download URL DStore-Mongo-0.1.0a1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
185f1b03e2e4eab270653c6785f623651a1150f7105d6a8904bcef8fe75b5c1c
BLAKE2b-256 checksum
How to use checksums
f6dd43c2ac341b052ba05a13a2d02e7dab77e470184f5463c60e0b1c1b8dbbe6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / DStore_Mongo-0.1.0a1-py2.py3-none-any.whl

Download URL DStore_Mongo-0.1.0a1-py2.py3-none-any.whl
Size 5.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d103694f1f42f20cb2aab27d4ecf9c4437e3eb1b0c7b252ff1e1c9e6d1f0007c
BLAKE2b-256 checksum
How to use checksums
81bea4fb4ae585174e835fc7915a43b0397d8dbd2f3529803aebf8880bdd6507
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page