![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
MongoMonkey is a simple ODM for mongo. The key idea was to use standard pymongo api, without overriding it.
from pymongo import Connection
from mongomonkey import Model, Field, list_of
class Book(Model):
title = Field(unicode)
page_count = Field(int)
class Author(Model):
name = Field(unicode)
books = Field(list_of(Book))
connection = Connection()
db = connection.test_database
collection = db.test_collection
book1 = Book(title=u"Alice's Adventures in Wonderland", page_count=191)
author = Author(name=u"Lewis Carroll")
# Accessing by field attribute
author.books = [book1]
# Accessing like dict item
author['books'].append({u"title": u"A Tangled Tale", u"page_count": 152})
# Saving object
collection.save(author) # By default pymongo would attach '_id' to this document.
# Retrieving object
author = collection.find_one(as_class=Author)
from mongomonkey import Model, Field, list_of
class Node(Model):
title = Field(unicode)
# You can use 'self' to point on currently creating Model
child1 = Field('self')
# Also you can use a name of a model to point on it
child2 = Field('Node')
# Printing instance of Node
print Node(title=u"root", child1=Node(title=u"Child1"), child2=Node(title=u"Child2"))
If you have any question, ideas or improvements feel free to fork or add an issue on github http://github.com/xonatius/mongo-monkey
FAQs
A MongoDB object-document mapping layer for Python
We found that mongomonkey demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.