This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

mohawk-data-platform is a Django app for editing and publishing arbitrary JSON data in a form-based environment.

Features

  • Define structured models, with custom fields and validation.
  • Create, edit and update instances defined models using the Django admin interface.
  • Group models into applications for bulk access.
  • Access models, instances and applications via a simple JSON API.
  • Cross-origin API requests via CORS and JSONP.

Installation

  1. Checkout the latest mohawk-data-platform release and copy or symlink the data directory into your PYTHONPATH. If using pip, run pip install mohawk-data-platform.
  2. Add 'data' to your INSTALLED_APPS setting.
  3. Add url(r"^", include("data.urls", namespace="data")), to you urls.py file.
  4. Install and active the Django admin site, if not already present.

Admin usage

The bulk of the functionality for mohawk-data-platform is found within the admin UI. The basic workflow is:

  1. Create a Model, defining at least one Field.
  2. Create an Instance of that model.
  3. Optionally, create an Application.
  4. Edit the model, and add it to the application you created.

Any data you add to the system will be pubically-available via the API endpoints.

Model field reference

Fields added to a model take a number of optional config parameters, suppled as JSON documents. The available fields, and their configuration options, are listed below.

Fields which take choices expect them to be supplied as a list of [value, label] options:

{
    "choices": [
        ["#ff0000", "Red"],
        ["#0000ff", "Green"],
        ["#00ff00", "Blue"]
    ]
}

Text

A single-line of unicode text.

{
    "required": true,
    "choices": null
}

Integer

An integer number.

{
    "required": true,
    "choices": null
}

Float

A floating-point number.

{
    "required": true
}

Date

A date value.

{
    "required": true
}

Time

A time value.

{
    "required": true
}

Datetime

A combined date and time value.

{
    "required": true
}

Boolean

A true/false checkbox.

{}

File

An uploaded file.

{
    "required": true
}

Long text

Multiple lines of unicode text.

{
    "required": true
}

Model

A reference to an instance of a model.

{
    "required": true,
    "model_id": "<model_id>"  // The type of instance being referenced.
}

Multi model

A reference to multiple instances of a model.

{
    "required": true,
    "model_id": "<model_id>"  // The type of instance being referenced.
}

API endpoints

GET /<model_id>.json

Returns all online instances of the given model:

{
    "status": "OK",
    "message": "Instances of Your Model were successfully loaded.",
    "instances": [
        {
            "_date_created": "<timestamp>",
            "_date_modified": "<timestamp>",
            "_id": "<instance_id>",
            "_model": "<model_id>",
            "<field_name>": "<field_value>",
            ...
        },
        ...
    ]
}

GET /<model_id>/<instance_id>.json

Returns the given instance:

{
    "status": "OK",
    "message": "Instances of <model_name> were successfully loaded.",
    "instance": {
        "_date_created": "<timestamp>",
        "_date_modified": "<timestamp>",
        "_id": "<instance_id>",
        "_model": "<model_id>",
        "<field_name>": "<field_value>",
        ...
    }
}

GET /a/<application_id>.json

Returns all online instances within the given application:

{
    "status": "OK",
    "message": "Instances within application <application_name> were successfully loaded.",
    "instances": [
        {
            "_date_created": "<timestamp>",
            "_date_modified": "<timestamp>",
            "_id": "<instance_id>",
            "_model": "<model_id>",
            "<field_name>": "<field_value>",
            ...
        },
        ...
    ]
}

More information

The mohawk-data-platform project was developed at Mohawk, and is released as Open Source under the MIT license.

You can get the code from the mohawk-data-platform project site.

Contributors

The following people were involved in the development of this project.

Release History

Release History

0.9.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mohawk-data-platform-0.9.3.tar.gz (17.2 kB) Copy SHA256 Checksum SHA256 Source Apr 4, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting