This document discusses different options for using MongoDB with Django, including pymongo, MongoEngine, MongoKit, and Django-nonrel. PyMongo is the lowest-level but fastest option, while MongoEngine provides Django-like models for MongoDB. MongoKit offers more structure than PyMongo but similar querying. Django-nonrel integrates MongoDB support directly into Django but requires maintaining a fork. The authors debate the benefits of schemaless versus structured models for MongoDB and how to improve integration between Django and MongoDB.
Presentation on various definitions for JSON including JSON-RPC, JSPON, JSON Schema, JSONP and tools for working these definitions including Persevere client and server..
Presentation on various definitions for JSON including JSON-RPC, JSPON, JSON Schema, JSONP and tools for working these definitions including Persevere client and server..
jQuery is a JavaScript library which allows you to develop solutions with less code, in less time. You can build interactive prototypes for your prospective clients, or take an existing solution and add new dynamic behaviour with little effort.
We will see how jQuery can be used to quickly and concisely apply JavaScript behaviour to your web app. It will cover selectors, Ajax, DOM manipulation and more. The aim: to produce lean unobtrusive JavaScript with jQuery.
Things you should know about jQuery JavaScript library. A JavaScript library designed to hide painful cross-browser compatibility issues while presenting a solid, usable, API.
MongoDB .local Munich 2019: Tips and Tricks++ for Querying and Indexing MongoDBMongoDB
Query performance can either be a constant headache or the unsung hero of an application. MongoDB provides extremely powerful querying capabilities when used properly. As a member of the solutions architecture team I will share more common mistakes observed and some tips and tricks to avoiding them.
Every Click Counts (But All the Money Goes to Me)Avast
Today, social sites make up a big, open vector for people who want monetize their ideas. But sometimes those ideas are not as legitimate as one would hope. One of the more unscrupulous ways to “earn” money is to steal your identity, email accounts, and/or credit card details. Another way is to misuse your computer as a money-making machine for cybercriminals.
Presented at AVAR 2013 by Jan Sirmer and Lukas Hasik, Virus Analysts & Researchers at Avast Software.
Neo4j is a graph database (nodes and relationships) and is the perfect fit for some types of problem. Within that domain Neo4j is much, much faster than SQL and easier to query. Py2neo is a Python binding to Neo4j. The live presentation showed how to create word transformation puzzles e.g. getting from "stores" to "slaked" by one latter transformations where each intermediate step is a valid word. One solution is "stores"->"stored"->"stared"->"staked"->"slaked".
jQuery is a JavaScript library which allows you to develop solutions with less code, in less time. You can build interactive prototypes for your prospective clients, or take an existing solution and add new dynamic behaviour with little effort.
We will see how jQuery can be used to quickly and concisely apply JavaScript behaviour to your web app. It will cover selectors, Ajax, DOM manipulation and more. The aim: to produce lean unobtrusive JavaScript with jQuery.
Things you should know about jQuery JavaScript library. A JavaScript library designed to hide painful cross-browser compatibility issues while presenting a solid, usable, API.
MongoDB .local Munich 2019: Tips and Tricks++ for Querying and Indexing MongoDBMongoDB
Query performance can either be a constant headache or the unsung hero of an application. MongoDB provides extremely powerful querying capabilities when used properly. As a member of the solutions architecture team I will share more common mistakes observed and some tips and tricks to avoiding them.
Every Click Counts (But All the Money Goes to Me)Avast
Today, social sites make up a big, open vector for people who want monetize their ideas. But sometimes those ideas are not as legitimate as one would hope. One of the more unscrupulous ways to “earn” money is to steal your identity, email accounts, and/or credit card details. Another way is to misuse your computer as a money-making machine for cybercriminals.
Presented at AVAR 2013 by Jan Sirmer and Lukas Hasik, Virus Analysts & Researchers at Avast Software.
Neo4j is a graph database (nodes and relationships) and is the perfect fit for some types of problem. Within that domain Neo4j is much, much faster than SQL and easier to query. Py2neo is a Python binding to Neo4j. The live presentation showed how to create word transformation puzzles e.g. getting from "stores" to "slaked" by one latter transformations where each intermediate step is a valid word. One solution is "stores"->"stored"->"stared"->"staked"->"slaked".
In the Python community we are taught from the outset of learning the language that the Zen of Python serves as a guide for how we should construct our codebases and projects. Rather than go into the zen-like meanings of each statement, this talk will explore how individual koans are implemented via detailed displays of sophisticated code examples.
Natural Language Processing and Graph Databases in LumifyCharlie Greenbacker
Lumify is an open source platform for big data analysis and visualization, designed to help organizations derive actionable insights from the large volumes of diverse data flowing through their enterprise. Utilizing both Hadoop and Storm, it ingests and integrates virtually any kind of data, from unstructured text documents and structured datasets, to images and video. Several open source analytic tools (including Tika, OpenNLP, CLAVIN, OpenCV, and ElasticSearch) are used to enrich the data, increase its discoverability, and automatically uncover hidden connections. All information is stored in a secure graph database implemented on top of Accumulo to support cell-level security of all data and metadata elements. A modern, browser-based user interface enables analysts to explore and manipulate their data, discovering subtle relationships and drawing critical new insights. In addition to full-text search, geospatial mapping, and multimedia processing, Lumify features a powerful graph visualization supporting sophisticated link analysis and complex knowledge representation.
Charlie Greenbacker, Director of Data Science at Altamira, will provide an overview of Lumify and discuss how natural language processing (NLP) tools are used to enrich the text content of ingested data and automatically discover connections with other bits of information. Joe Ferner, Senior Software Engineer at Altamira, will describe the creation of SecureGraph and how it supports authorizations, visibility strings, multivalued properties, and property metadata in a graph database.
How to Write a Popular Python Library by AccidentDaniel Greenfeld
We gave this talk as the opening keynote speech at PyCon Singapore. The theme of the talk is that most complex projects begin from humble origins. That you should create your own projects, sharing your knowledge and expertise.
My keynote speech from EuroPython, this talk explores what it is like being a developer in a community filled with experts from around the world. The goal of the talk is to provide useful content for beginners and topics of discussion for more advanced developers, while also focusing on Python’s strengths. Video of this talk is at http://www.youtube.com/watch?v=7TImWbnUDeI
I give a talk through my Graph Database and Python learning journey at PyCon Australia 2015. It should be up on PyVideo soon enough.
Note: A great question was asked regarding why I didn't cover Postgres on the "what should I use" slide. That was a great question. Definitely consider Postgres, especially if you've got existing expertise in it. Rhys Elsemores talk (Just Use Postgres) at the same conference is excellent.
10 more things you can do with the Python programming language. Python is used in science, engineer, and forward thinking entrepreneurial projects like Instagram and Pinterest.
Django and Neo4j - Domain modeling that kicks assTobias Lindaaker
Presentation about using Neo4j from Django presented at OSCON 2010, Portland OR.
Sample code is available at: https://svn.neo4j.org/components/neo4j.py/trunk/src/examples/python/djangosites/blog/
Social phenomena is coming. We have lot’s of social applications that we are using every day, let’s say Facebook, twitter, Instagram. Lot’s of such kind apps based on social graph and graph theory. I would like to share my knowledge and expertise about how to work with graphs and build large social graph as engine for Social network using python and Graph databases. We'll compare SQL and NoSQL approaches for friends relationships.
Webinar: Build an Application Series - Session 2 - Getting StartedMongoDB
This session - presented by Matthew Bates, Solutions Architect & Consulting Engineer at MongoDB - will cover an outline of an application, schema design decisions, application functionality and design for scale out.
About the speaker
Matthew Bates is a Solutions Architect in the EMEA region for MongoDB and helps advise customers how to best use and make the most out of MongoDB in their organisations. He has a background in solutions for the acquisition, management and exploitation of big data in government and public sector and telco industries through his previous roles at consultancy firms and a major European telco. He's a Java and Python coder and has a BSc(Hons) in Computer Science from the University of Nottingham.
Next in the Series:
February 20th 2014
Build an Application Series - Session 3 - Interacting with the database:
This webinar will discuss queries and updates and the interaction between an application and a database
March 6th 2014
Build an Application Series - Session 4 - Indexing:
This session will focus on indexing strategies for the application, including geo spatial and full text search
March 20th 2014
Build an Application Series - Session 5 - Reporting in your application:
This session covers Reporting and Aggregation Framework and Building application usage reports
April 3th 2014
Operations for your application - Session 6 - Deploying the application:
By this stage, we will have built the application. Now we need to deploy it. We will discuss architecture for High Availability and scale out
April 17th 2014
Operations for your application - Session 7 - Backup and DR:
This webinar will discuss back up and restore options. Learn what you should do in the event of a failure and how to perform a backup and recovery of the data in your applications
May 6th 2014
Operations for your application - Session 8 - Monitoring and Performance Tuning:
The final webinar of the series will discuss what metrics are important and how to manage and monitor your application for key performance.
MongoDB, PHP and the cloud - php cloud summit 2011Steven Francia
An introduction to using MongoDB with PHP.
Walking through the basics of schema design, connecting to a DB, performing CRUD operations and queries in PHP.
MongoDB runs great in the cloud, but there are some things you should know. In this session we'll explore scaling and performance characteristics of running Mongo in the cloud as well as best practices for running on platforms like Amazon EC2.
MongoDB Introduction talk at Dr Dobbs Conference, MongoDB Evenings at Bangalo...Prasoon Kumar
MongoDB is a leading nosql database. It is horizonatally scalable, document datastore. In this introduction given at Dr Dobbs Conference, Bangalore and Pune in April 2014, I show schema design with an example blog application and Python code snippets. I delivered the same in the maiden MongoDB Evening event at Delhi and Gurgaon in May 2014.
When constructing a data model for your MongoDB collection for CMS, there are various options you can choose from, each of which has its strengths and weaknesses. The three basic patterns are:
1.Store each comment in its own document.
2.Embed all comments in the “parent” document.
3.A hybrid design, stores comments separately from the “parent,” but aggregates comments into a small number of documents, where each contains many comments.
Code sample and wiki documentation is available on https://github.com/prasoonk/mycms_mongodb/wiki.
An overview of the Django rapid application development framework. Topics include the history of the framework, an architectural overview, how to get started, and a brief comparison to Ruby on Rails.
An advanced forms presentation given with Miguel Araujo (marajop) at DjangoCon 2011. The transcript and slides is aimed at getting into Django Core, and Jacob Kaplan-Moss has stated this is his plan.
Admitting my flaws and turning them into virtues! This is a full length talk given it at DjangoCon US 2011, PyCon Australia 2011, and LA Django. The earliest version was a lightning talk given at the 2011 Hollywood hackathon.
Just to be clear, all of these things suck. Please DO NOT use these techniques! It was a joke, and if you attempt any of these things you are making a big mistake.
The slides printed for attendees of the Pycon 2010 Long Pinax Tutorial. James Tauber was the co-author and deserves tons of credit for his work. So does Brian Rosner and the rest of the Pinax team.
Why Django is created and maintained by myself, James Tauber, and others. Its purpose is to help individuals sell Django as a working platform. It is a work in progress, and will be updated periodically.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
1. Round Pegs
and
Square Holes
Django and MongoDB
by Daniel Greenfeld and Audrey Roy
2. Audrey / Danny
• Principals at Cartwheel
Web
Photo credit: Christopher Neugebauer
• Co-founders of
consumer.io
• Met at PyCon 2010
• Now affianced
@pydanny / @audreyr cartwheelweb.com
3. What is MongoDB?
• NoSQL
• Fast, Scalable, Indexable, Shardable
• Schema-less
@pydanny / @audreyr cartwheelweb.com
4. What is MongoDB?
• Written in C++
• Stores data in BSON (kinda like
JSON)
• Uses JavaScript internally for
scripting
• Has Python, Ruby, PHP, C, other
drivers
• Huge community
@pydanny / @audreyr cartwheelweb.com
5. MongoDB: SQL Analogy
• Collections are like tables
• Documents are like records (rows)
@pydanny / @audreyr cartwheelweb.com
6. What is a MongoDB queryset?
As served by pymongo
Minimalist view
@pydanny / @audreyr cartwheelweb.com
7. What is a MongoDB queryset?
As served by pymongo
A list
of dictionaries
Minimalist view
@pydanny / @audreyr cartwheelweb.com
8. What it looks like
list Minimalist view
collection = []
document = {
'_objectId': ObjectId('4f844e916c97c1000c000003'),
'username': 'pydanny',
'fiancee': {
'username': 'audreyr',
'location': 'Zurich'
}
}
collection = [document, ]
@pydanny / @audreyr cartwheelweb.com
9. What it looks like
list Minimalist view
dictiona
collection = []
document = {
'_objectId': ObjectId('4f844e916c97c1000c000003'),
'username': 'pydanny',
'fiancee': {
'username': 'audreyr',
'location': 'Zurich'
}
}
collection = [document, ]
@pydanny / @audreyr cartwheelweb.com
10. What it looks like
list Minimalist view
dictiona
collection = []
document = {
'_objectId': ObjectId('4f844e916c97c1000c000003'),
'username': 'pydanny',
'fiancee': {
'username': 'audreyr',
'location': 'Zurich'
}
}
collection = [document, ]
list of dictionaries!
@pydanny / @audreyr cartwheelweb.com
15. pymongo
http://api.mongodb.org/python/current/
Official Python binding for MongoDB
my_data with title
>>> from pymongo import Connection
>>> connection = Connection()
>>> my_data = {'rating': 3, 'title': 'I like ice cream'}
>>> connection.reviews.insert(my_data)
>>> your_data = {'rating': 3, 'subject': 'You like ice cream'}
>>> connection.reviews.insert(your_data)
@pydanny / @audreyr cartwheelweb.com
16. pymongo
http://api.mongodb.org/python/current/
Official Python binding for MongoDB
my_data with title
>>> from pymongo import Connection
>>> connection = Connection()
>>> my_data = {'rating': 3, 'title': 'I like ice cream'}
>>> connection.reviews.insert(my_data)
>>> your_data = {'rating': 3, 'subject': 'You like ice cream'}
>>> connection.reviews.insert(your_data)
your_data with subject
@pydanny / @audreyr cartwheelweb.com
17. pymongo
[
{'rating': 3,'title': 'I like ice cream'},
{'rating': 3, 'subject': 'You like ice cream'}
]
>>> connection = pymongo.Connection()
>>> db = connection.db
>>> for review in db.reviews.find({'rating': 3}):
... review['title']
>>> for review in db.reviews.find(
... {"title": {"$regex": "ice cream"} }
... ):
... review['title']
@pydanny / @audreyr cartwheelweb.com
18. pymongo
[
{'rating': 3,'title': 'I like ice cream'},
{'rating': 3, 'subject': 'You like ice cream'}
]
>>> connection = pymongo.Connection()
>>> db = connection.db
>>> for review in db.reviews.find({'rating': 3}):
... review['title']
>>> for review in db.reviews.find(
... {"title": {"$regex": "ice cream"} }
... ):
... review['title']
Finds all reviews
with a rating of 3
@pydanny / @audreyr cartwheelweb.com
19. pymongo
[
{'rating': 3,'title': 'I like ice cream'},
{'rating': 3, 'subject': 'You like ice cream'}
]
>>> connection = pymongo.Connection()
>>> db = connection.db
>>> for review in db.reviews.find({'rating': 3}):
... review['title']
>>> for review in db.reviews.find(
... {"title": {"$regex": "ice cream"} }
... ):
... review['title']
@pydanny / @audreyr cartwheelweb.com
20. pymongo
[
{'rating': 3,'title': 'I like ice cream'},
{'rating': 3, 'subject': 'You like ice cream'}
]
>>> connection = pymongo.Connection()
>>> db = connection.db
>>> for review in db.reviews.find({'rating': 3}):
... review['title']
>>> for review in db.reviews.find(
... {"title": {"$regex": "ice cream"} }
... ):
... review['title']
Only finds the document
with ‘title’ in it.
@pydanny / @audreyr cartwheelweb.com
21. pymongo
Pros
• Really fast, bare metal
• Lets you go schema-crazy
• Supported directly by 10gen
• They say “PyMongo to work with
recommended way
is the
MongoDB from Python.”
@pydanny / @audreyr cartwheelweb.com
22. pymongo
Cons
• “PyMongo introspection” is an
oxymoron
• Very low-level
• Lose out on ModelForms, Auth,
Admin, etc
• Syntax mapperclean as with an
object
not as
@pydanny / @audreyr cartwheelweb.com
24. MongoEngine
http://mongoengine.org/
Doesn’t this look
import mongoengine as me
like the Django
class Review(me.Document):
ORM?
title = me.StringField()
body = me.StringField()
author = me.StringField()
created = me.DateTimeField(default=datetime.utcnow)
rating = me.IntField()
@pydanny / @audreyr cartwheelweb.com
25. MongoEngine
Doesn’t this look
like a Django
query?
>>> from reviews.models import Review
>>> for review in Review.objects.all():
... review.title
@pydanny / @audreyr cartwheelweb.com
26. MongoEngine
Pros
• Looks similar to Django ORM code
• You can develop SUPER-QUICKLY
• Can use with django-mongonaut for
introspection
• Light schema, unenforced by the db
• Supports some inter-document
connections
@pydanny / @audreyr cartwheelweb.com
27. MongoEngine
Cons
• Some feel there’s too much structure
• Validation messages sometimes
unclear
• Using it with Django,introspection*on
the Django Admin’s
you lose out
and ModelForms
* django-mongonaut addresses this.
@pydanny / @audreyr cartwheelweb.com
28. mongoengine and
django-mongonaut
http://bit.ly/django-mongonaut
@pydanny / @audreyr cartwheelweb.com
33. MongoKit
http://namlook.github.com/mongokit/
Connect
to
from mongokit import Document, Connection reviews
collectio
connection = Connection()
n
@connection.register
class Review(Document): Review model
structure = { representing
'title':unicode, MongoDB
'body':unicode,
Expected 'author':unicode,
collection
fields 'created':datetime.datetime,
'rating':int
}
required_fields = ['title', 'author', 'created']
default_values = {'rating': 0,
'created': datetime.utcnow}
@pydanny / @audreyr cartwheelweb.com
34. MongoKit
http://namlook.github.com/mongokit/
>>> from mongokit import Connection
>>> connection = Connection()
>>> for review in connection.Review.find({'rating': 3}):
... review['title']
Identical to pymongo queries
@pydanny / @audreyr cartwheelweb.com
35. MongoKit
Pros
• Light schema, unenforced by the db
• Or can go all out schemaless!
• Speed
• Types are a mix of Python &
MongoDB
• Uses pymongo-style queries
@pydanny / @audreyr cartwheelweb.com
36. MongoKit
Cons
• Using itDjango Admin’s lose out
on the
with Django, you
introspection, ModelForms, auth,
etc
• Introspection is hard
@pydanny / @audreyr cartwheelweb.com
38. Django-nonrel
+ mongodb-engine
http://docs.django-nonrel.org
• A patch to Django thatORM NoSQL
support to the Django
adds
• Works with GAE, MongoDB, even SQL
DBs
@pydanny / @audreyr cartwheelweb.com
39. Django-nonrel
+ mongodb-engine
Pros
• Can use Django as you normally
would
• Mirrors the ORM functionality
• Introspection via djangotoolbox
@pydanny / @audreyr cartwheelweb.com
40. Django-nonrel
+ mongodb-engine
Cons
• Fork of the whole Django project.
• Dependent Django core (still on
parity with
on others to maintain
Django 1.3).
• Multi-db usage is confusing
@pydanny / @audreyr cartwheelweb.com
41. Summary
• pymongo is low-level and well-supported
by 10gen.
• MongoEngine is like schemaless Django
models.
• MongoKit is like pymongo with extra
structure.
• Django-nonrel is a fork of Django 1.3.
@pydanny / @audreyr cartwheelweb.com
43. Danny’s Thoughts
Can we build a “simple” bridge?
What about a single third-party app that lets you
combine critical Django apps and MongoDB?
• django.contrib.auth
• django.forms
• django-social-auth /
registration
• others...
@pydanny / @audreyr cartwheelweb.com
44. Danny’s Thoughts
I wonder, why add schemas to schema-less
when:
Relational Databases
South
High level Caching
tools*
allow you to develop fast moving
datastores with transactions and built-
in Djangoorsupport?
* cache-machine johnny-cache
@pydanny / @audreyr cartwheelweb.com
45. Danny’s Thoughts
Introspection Tool Idea
Treat introspection like MongoDB
Queries
Immediate introspection tool
(no ‘title’ then don’t show title)
@pydanny / @audreyr cartwheelweb.com
46. Audrey’s Thoughts
• Schemaless dbs promise
performance advantages
• Especially for distributed systems
• Tradeoff: ACID compliance
http://stackoverflow.com/questions/3856222/whats-the-attraction-of-schemaless-
database-systems
@pydanny / @audreyr cartwheelweb.com
47. Audrey’s Thoughts
“Schemaless database”
==
ACID-noncompliant database
OK when performance is more important than
being consistent 100% of the time.
@pydanny / @audreyr cartwheelweb.com
48. Audrey’s Thoughts
Schemaless Python models
!=
Schemaless MongoDB collections
I think MongoEngine is best unless your use case
calls for schema anarchy.
@pydanny / @audreyr cartwheelweb.com
50. Using Django With
MongoDB
• Big hurdles: ORM, Admin, ModelForms,
Auth
• Were built for relational data
• But the situation is improving rapidly
@pydanny / @audreyr cartwheelweb.com
51. What needs to be
done
• New introspection tools (working on it)
• django.forms bridge.
• django.contrib.admin bridge.
• Drop-in 1.5?)
(Django
replacement for Django Auth
• Creation of best practices document for
use of MongoDB with Django.
@pydanny / @audreyr cartwheelweb.com
52. Django Mongonaut
• Introspection tool for MongoEngine
• Works well so far
• Integrate graphing tools
• Make independent from mongoengine
• Contributors wanted:
• https://github.com/pydanny/django-
mongonaut
@pydanny / @audreyr cartwheelweb.com
53. Django Mongonaut
Based off of immediate
introspection - not
definition
@pydanny / @audreyr
Mockup cartwheelweb.com
54. Django Mongonaut
Based off of immediate
introspection - not
definition
SVG w/links
for examining
nested
structures
@pydanny / @audreyr
Mockup cartwheelweb.com
55. Final Summary
{
pymongo
mongoengine
Python/ mongokit
MongoDB tools django-nonrel
to consider django-mongodb
django-
mongonaut
@pydanny / @audreyr cartwheelweb.com
Editor's Notes
A: We have a specific time we have to present in, so please hold your questions and comments to the end.\n
A, D, A\n
D\n
D\n
A\n
D\n
D\n
D\n
A: Which is why we’re presenting here today rather than at LA Django - this is useful info for any Python developer.\n
A\n
D - Using a review system...\n
D\n
D\n
D: MongoDB queries are meant for schema-less data.\n
D: MongoDB queries are meant for schema-less data.\n
D: You can do crazy things like have every document in a collection have a completely different schema. \n
D: No introspection tools, just the shell. Certainly no admin. \n
A\n
A\n
A\n
A\n
A: If you use ReferenceFields all the time, you might as well be using SQL\n
A\n
D\n
D\n
D\n
D\n
D\n
D\n
D\n
A\n
A\n
A\n
A: According to posts on the mailing list, you should be able to use multiple databases. But I pored over the docs/mailing list and couldn’t find an example of, say, using Postgres for auth and MongoDB for a custom app\n
D, A, D, A\n
\n
D I’m in discussion with some other Python/MongoDB aficionados.\n
D I love normalization. I love what you can do with a schema. I love what you can do without a schema\n
D\n
A: Atomicity, consistency, isolation, durability. Properties that guarantee that a db transaction has been processed reliably.\n
A: Atomicity, consistency, isolation, durability. Properties that guarantee that a db transaction has been processed reliably.\nThere’s the very small risk that data you retrieve could be in a temporary inconsistent state.\n
A: NYT, Heroku, Intuit, IGN, Posterous, and others use Ruby’s MongoMapper\nIn the Ruby world, Mongo object mappers are much more prevalent.\n