Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Tastypie MongoDB Resource

Project Description

MongoDB Resource for Tastypie

Allows you to create delicious APIs for MongoDB.

Settings

MONGODB_HOST = None
MONGODB_PORT = None
MONGODB_DATABASE = "database_name"

# optional:
MONGODB_USERNAME = None
MONGODB_PASSWORD = None

Example of Usage

from tastypie import fields
from tastypie.authorization import Authorization

from tastypie_mongodb.resources import MongoDBResource, Document

class DocumentResource(MongoDBResource):

    id = fields.CharField(attribute="_id")
    title = fields.CharField(attribute="title", null=True)
    entities = fields.ListField(attribute="entities", null=True)

    class Meta:
        resource_name = "documents"
        list_allowed_methods = ["delete", "get", "post"]
        authorization = Authorization()
        object_class = Document
        collection = "documents" # collection name

Contributors

Release History

This version
History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
tastypie-mongodb-resource-0.0.8.tar.gz
(3.1 kB) Copy SHA256 Hash SHA256
Source None Dec 26, 2013

Supported By

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