New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tastypie-mongodb-resource

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tastypie-mongodb-resource

Tastypie MongoDB Resource

  • 0.0.8
  • PyPI
  • Socket score

Maintainers
1

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)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc