Skip to main content

MySQL Storage layer for DStore

Project description

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


PyMan is available from the PyPi repository.

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

$ pip install dstore-mysql

Minimal Example

from dstore import Model, var, mod
from dstore_mysql import MySQLStore

class Car( Model ):
    _namespace = "cars.make"
    _vars = [
        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 = MySQLStore( self.models )
    "DSTORE_DB_HOST"  : "localhost",
    "DSTORE_DB_USER"  : "username",
    "DSTORE_DB_PASSWD": "password",
    "DSTORE_DB_DB"    : "dstoredb"

# Destroy all instances and shut down the application

Documentation: ReadTheDocs

Source Code: GitHub

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for DStore-MySQL, version 0.1.0a2
Filename, size File type Python version Upload date Hashes
Filename, size DStore_MySQL-0.1.0a2-py2.py3-none-any.whl (7.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size DStore-MySQL-0.1.0a2.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page