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
Ferrix Hovi (<https://github.com/ferrix>)
Alper Kanat (<https://github.com/tunix>)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for tastypie-mongodb-resource-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 057a8fc7e96e978e306ede9b839d20ada26d1b69c174214e3f72dfbd58e983fe |
|
MD5 | 115f5e1e090a0e6aeaed6e8a57944995 |
|
BLAKE2b-256 | 099d7069263d2675275c0b5976d9ec4acff8819dbf7c54cbb58000343f4b71c7 |