Skip to main content

DStore Web API and JS Client using FLask

Project description

Flask-DStore is a Web API and Javascript Client. The API routes, logic and client code is automatically generated for you.


PyMan is available from the PyPi repository.

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

$ pip install dstore-flask

Minimal Example

from flask import Flask
from dstore import MemoryStore, Model, var, mod
from flask_dstore import API

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 app instances
app = Flask( __name__ )
store = MemoryStore( [ Car ] )
api = API( store, app )

# While inside the Flask app context, create all storage and add a car
with app.app_context():
    Car( manufacturer = "Holden", make = "Commodore", year = 2005 ).add()

# Run the Flask dev. server

# Now destroy all data
with app.app_context():


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 Flask-DStore, version 0.1.2
Filename, size & hash File type Python version Upload date
Flask_DStore-0.1.2-py2.py3-none-any.whl (7.8 kB) View hashes Wheel py2.py3
Flask-DStore-0.1.2.tar.gz (4.5 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page