Skip to main content

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 files for tastypie-mongodb-resource 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tastypie-mongodb-resource 0.0.8
File Size Uploaded
tastypie-mongodb-resource-0.0.8.tar.gz 3.1 kB Details

Release files / tastypie-mongodb-resource-0.0.8.tar.gz

Download URL tastypie-mongodb-resource-0.0.8.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
de0cbc8d01cee8347d3995a95f18d24972b0eceb93f7c0d9baced6aba30dabfa
BLAKE2b-256 checksum
How to use checksums
eb0874cf1a8dfc012a1e3930ffcbc9d4295093c2f5742f765b0808b90248f3fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.8 This release

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page