SlideShare a Scribd company logo
1 of 19
Download to read offline
Django with Mongo using
      Mongoengine




          Artem Dudarev
#donetskpy, #cncdnua, February 2012
Other ways to use Mongo with Django
Which Python API should be used with Mongo DB and
Django?
     • PyMongo
--
     • Mongoengine
--
     • Django MongoDB Engine
     • MongoDB backend for Django-nonrel
Django
Django
The Web framework for perfectionists with deadlines.
Using Django
 • Disqus
  • Many newspapers: Washington Post, Guardian,
    Lawrence.com.
In Donetsk
 • Steelkiwi
 • MLSDev
Mongo
Mongo (from "humongous") is a scalable,
high-performance, open source NoSQL database.
Using Mongo
 • Foursquare
  • Catch
In Donetsk
 •?
Mongoengine
MongoEngine is a Document-Object Mapper (think ORM,
but for document databases) for working with MongoDB
from Python.
Mongoengine example
from mongoengine import (Document, EmbeddedDocument,
        ListField, StringField, IntField)

class Metadata(EmbeddedDocument):
    tags = ListField(StringField())
    revisions = ListField(IntField())

class WikiPage(Document):
    title = StringField(required=True)
    text = StringField()
    metadata = EmbeddedDocumentField(Metadata)
Mongoengine example (cont.)
>>> page.title = “Hello, World!”
>>> for page in WikiPage.objects:
>>>     print page.title
— Игорь Афонов, #cncdnua #32
«Делайте велосипеды, но то так, что
   бы хотелось на них ездить.»

     — Игорь Давыденко, #kyivpy #5
Tumblr
 • http://wearethe99percent.tumblr.com/
 • http://dearphotograph.com/
 • http://stockingisthenewplanking.com/


 • http://dudarev.tumblr.com/
Tumblr (cont.)
http://mashable.com/2011/11/14/tumblr-infographic/
 • 35M tumblogs
 • 45% photos
 • Top 5 tags: GIF, LOL, Fashion, Art, Vintage
 • 218% growth (from June to June)
 • $800M valuation
Mumblr
 • Harry Marr - developer of Mongoengine
  • Mumblr - Tumblr clone
Starting with Python (virtualenv, pip)
git clone https://github.com/hmarr/django-mumblr.git mumblr
cd mumblr
virtualenv .
source bin/activate
pip install -r requirements.txt
cd example
Mumblr (starting Mongo)
http://www.mongodb.org/display/DOCS/Quickstart+Unix
curl http://downloads.mongodb.org/linux...tgz > mongo.tgz
tar xzf mongo.tgz
sudo chown `id -u` /data/db
sudo chown `id -u` /data/db/*
./mongodb-linux-i686-2.0.2/bin/mongod


./mongodb-linux-i686-2.0.2/bin/mongo
use mumblr-example
db.dropDatabase()
Mumblr (adding user)
ls mumblr/management/commands/
python manage.py adduse
python manage.py runserver
Points
 • Django is an excellent framework for not too
   complicated sites
 • MongoDB is #1 NoSQL database - try it
 • Djangists may find Mongoengine convenient
 • Do reinvent the wheel
 • Make it easy for others to start using it
Credits
Logos
 • Django
 • Mongo
 • Mongoengine
Comics
 • How to Write a CV
  • The Hard Life Of A NoSQL Coder
rst2pdf
 • rst2pdf
 • style by Alexis Métaireau was partially used

More Related Content

What's hot

ElasticSearch: Найдется все... и быстро!
ElasticSearch: Найдется все... и быстро!ElasticSearch: Найдется все... и быстро!
ElasticSearch: Найдется все... и быстро!Alexander Byndyu
 
Django tech-talk
Django tech-talkDjango tech-talk
Django tech-talkdtdannen
 
Building Your First MongoDB App ~ Metadata Catalog
Building Your First MongoDB App ~ Metadata CatalogBuilding Your First MongoDB App ~ Metadata Catalog
Building Your First MongoDB App ~ Metadata Cataloghungarianhc
 
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web TechnologyInternet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web TechnologyAyes Chinmay
 
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Ayes Chinmay
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBMarakana Inc.
 
Agile Schema Design: An introduction to MongoDB
Agile Schema Design: An introduction to MongoDBAgile Schema Design: An introduction to MongoDB
Agile Schema Design: An introduction to MongoDBStennie Steneker
 
Building Your First Application with MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDBMongoDB
 
Building Apps with MongoDB
Building Apps with MongoDBBuilding Apps with MongoDB
Building Apps with MongoDBNate Abele
 
Using Mongoid with Ruby on Rails
Using Mongoid with Ruby on RailsUsing Mongoid with Ruby on Rails
Using Mongoid with Ruby on RailsNicholas Altobelli
 
REST Web API with MongoDB
REST Web API with MongoDBREST Web API with MongoDB
REST Web API with MongoDBMongoDB
 
MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema DesignMongoDB
 
Web Scraping in Python with Scrapy
Web Scraping in Python with ScrapyWeb Scraping in Python with Scrapy
Web Scraping in Python with Scrapyorangain
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012sullis
 
Django Overview
Django OverviewDjango Overview
Django OverviewBrian Tol
 
Building web applications with mongo db presentation
Building web applications with mongo db presentationBuilding web applications with mongo db presentation
Building web applications with mongo db presentationMurat Çakal
 

What's hot (20)

ElasticSearch: Найдется все... и быстро!
ElasticSearch: Найдется все... и быстро!ElasticSearch: Найдется все... и быстро!
ElasticSearch: Найдется все... и быстро!
 
Django tech-talk
Django tech-talkDjango tech-talk
Django tech-talk
 
Building Your First MongoDB App ~ Metadata Catalog
Building Your First MongoDB App ~ Metadata CatalogBuilding Your First MongoDB App ~ Metadata Catalog
Building Your First MongoDB App ~ Metadata Catalog
 
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web TechnologyInternet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
 
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
Internet and Web Technology (CLASS-8) [jQuery and JSON] | NIC/NIELIT Web Tech...
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDB
 
Agile Schema Design: An introduction to MongoDB
Agile Schema Design: An introduction to MongoDBAgile Schema Design: An introduction to MongoDB
Agile Schema Design: An introduction to MongoDB
 
Web Scrapping with Python
Web Scrapping with PythonWeb Scrapping with Python
Web Scrapping with Python
 
Building Your First Application with MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDB
 
ActiveRecord vs Mongoid
ActiveRecord vs MongoidActiveRecord vs Mongoid
ActiveRecord vs Mongoid
 
Building Apps with MongoDB
Building Apps with MongoDBBuilding Apps with MongoDB
Building Apps with MongoDB
 
Using Mongoid with Ruby on Rails
Using Mongoid with Ruby on RailsUsing Mongoid with Ruby on Rails
Using Mongoid with Ruby on Rails
 
REST Web API with MongoDB
REST Web API with MongoDBREST Web API with MongoDB
REST Web API with MongoDB
 
MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema Design
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
 
Introduction to JSON & AJAX
Introduction to JSON & AJAXIntroduction to JSON & AJAX
Introduction to JSON & AJAX
 
Web Scraping in Python with Scrapy
Web Scraping in Python with ScrapyWeb Scraping in Python with Scrapy
Web Scraping in Python with Scrapy
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012
 
Django Overview
Django OverviewDjango Overview
Django Overview
 
Building web applications with mongo db presentation
Building web applications with mongo db presentationBuilding web applications with mongo db presentation
Building web applications with mongo db presentation
 

Viewers also liked

Django with MongoDB using MongoEngine
Django with MongoDB using MongoEngineDjango with MongoDB using MongoEngine
Django with MongoDB using MongoEngineRakesh Kumar
 
Илья Шаляпин, Евгений Генералов: Разработка через тестирование в Python и Djn...
Илья Шаляпин, Евгений Генералов: Разработка через тестирование в Python и Djn...Илья Шаляпин, Евгений Генералов: Разработка через тестирование в Python и Djn...
Илья Шаляпин, Евгений Генералов: Разработка через тестирование в Python и Djn...it-people
 
Making Django and NoSQL Play Nice
Making Django and NoSQL Play NiceMaking Django and NoSQL Play Nice
Making Django and NoSQL Play NiceAlex Gaynor
 
MongoDB for Beginners
MongoDB for BeginnersMongoDB for Beginners
MongoDB for BeginnersEnoch Joshua
 

Viewers also liked (7)

Django with MongoDB using MongoEngine
Django with MongoDB using MongoEngineDjango with MongoDB using MongoEngine
Django with MongoDB using MongoEngine
 
2056
20562056
2056
 
Donetsk.py - fabric
Donetsk.py -  fabricDonetsk.py -  fabric
Donetsk.py - fabric
 
Илья Шаляпин, Евгений Генералов: Разработка через тестирование в Python и Djn...
Илья Шаляпин, Евгений Генералов: Разработка через тестирование в Python и Djn...Илья Шаляпин, Евгений Генералов: Разработка через тестирование в Python и Djn...
Илья Шаляпин, Евгений Генералов: Разработка через тестирование в Python и Djn...
 
Making Django and NoSQL Play Nice
Making Django and NoSQL Play NiceMaking Django and NoSQL Play Nice
Making Django and NoSQL Play Nice
 
MongoDB for Beginners
MongoDB for BeginnersMongoDB for Beginners
MongoDB for Beginners
 
Mongo db
Mongo dbMongo db
Mongo db
 

Similar to Django with Mongo using Mongoengine

Mongo NYC PHP Development
Mongo NYC PHP Development Mongo NYC PHP Development
Mongo NYC PHP Development Fitz Agard
 
APIs in production - we built it, can we fix it?
APIs in production - we built it, can we fix it?APIs in production - we built it, can we fix it?
APIs in production - we built it, can we fix it?Martin Gutenbrunner
 
Python and Startup
Python and StartupPython and Startup
Python and Startuppycontw
 
Our Adventure with MongoDB
Our Adventure with MongoDBOur Adventure with MongoDB
Our Adventure with MongoDBEthan Gunderson
 
Python. Why to learn?
Python. Why to learn?Python. Why to learn?
Python. Why to learn?Oleh Korkh
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)Evan Lin
 
OpenFest 2012 : Leveraging the public internet
OpenFest 2012 : Leveraging the public internetOpenFest 2012 : Leveraging the public internet
OpenFest 2012 : Leveraging the public internettkisason
 
Intro to jQuery Mobile for Php meetup may 2012
Intro to jQuery Mobile for Php meetup may 2012Intro to jQuery Mobile for Php meetup may 2012
Intro to jQuery Mobile for Php meetup may 2012Luther Goh Lu Feng
 
國民雲端架構 Django + GAE
國民雲端架構 Django + GAE國民雲端架構 Django + GAE
國民雲端架構 Django + GAEWinston Chen
 
Mongodb at-gilt-groupe-seattle-2012-09-14-final
Mongodb at-gilt-groupe-seattle-2012-09-14-finalMongodb at-gilt-groupe-seattle-2012-09-14-final
Mongodb at-gilt-groupe-seattle-2012-09-14-finalMongoDB
 
Building Your First MongoDB Application
Building Your First MongoDB ApplicationBuilding Your First MongoDB Application
Building Your First MongoDB ApplicationTugdual Grall
 
How I become Go GDE
How I become Go GDEHow I become Go GDE
How I become Go GDEEvan Lin
 
MongoDB at Gilt Groupe
MongoDB at Gilt GroupeMongoDB at Gilt Groupe
MongoDB at Gilt GroupeMongoDB
 
Big data analysis in python @ PyCon.tw 2013
Big data analysis in python @ PyCon.tw 2013Big data analysis in python @ PyCon.tw 2013
Big data analysis in python @ PyCon.tw 2013Jimmy Lai
 
Python Performance Profiling: The Guts And The Glory
Python Performance Profiling: The Guts And The GloryPython Performance Profiling: The Guts And The Glory
Python Performance Profiling: The Guts And The Gloryemptysquare
 

Similar to Django with Mongo using Mongoengine (20)

Mongo NYC PHP Development
Mongo NYC PHP Development Mongo NYC PHP Development
Mongo NYC PHP Development
 
APIs in production - we built it, can we fix it?
APIs in production - we built it, can we fix it?APIs in production - we built it, can we fix it?
APIs in production - we built it, can we fix it?
 
Python and Startup
Python and StartupPython and Startup
Python and Startup
 
Google Hacking 101
Google Hacking 101Google Hacking 101
Google Hacking 101
 
Presentasi jlp
Presentasi jlpPresentasi jlp
Presentasi jlp
 
Our Adventure with MongoDB
Our Adventure with MongoDBOur Adventure with MongoDB
Our Adventure with MongoDB
 
Python. Why to learn?
Python. Why to learn?Python. Why to learn?
Python. Why to learn?
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
 
OpenFest 2012 : Leveraging the public internet
OpenFest 2012 : Leveraging the public internetOpenFest 2012 : Leveraging the public internet
OpenFest 2012 : Leveraging the public internet
 
Intro to jQuery Mobile for Php meetup may 2012
Intro to jQuery Mobile for Php meetup may 2012Intro to jQuery Mobile for Php meetup may 2012
Intro to jQuery Mobile for Php meetup may 2012
 
國民雲端架構 Django + GAE
國民雲端架構 Django + GAE國民雲端架構 Django + GAE
國民雲端架構 Django + GAE
 
Mongodb at-gilt-groupe-seattle-2012-09-14-final
Mongodb at-gilt-groupe-seattle-2012-09-14-finalMongodb at-gilt-groupe-seattle-2012-09-14-final
Mongodb at-gilt-groupe-seattle-2012-09-14-final
 
Building Your First MongoDB Application
Building Your First MongoDB ApplicationBuilding Your First MongoDB Application
Building Your First MongoDB Application
 
How I become Go GDE
How I become Go GDEHow I become Go GDE
How I become Go GDE
 
MongoDB at Gilt Groupe
MongoDB at Gilt GroupeMongoDB at Gilt Groupe
MongoDB at Gilt Groupe
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
Big data analysis in python @ PyCon.tw 2013
Big data analysis in python @ PyCon.tw 2013Big data analysis in python @ PyCon.tw 2013
Big data analysis in python @ PyCon.tw 2013
 
Python Performance Profiling: The Guts And The Glory
Python Performance Profiling: The Guts And The GloryPython Performance Profiling: The Guts And The Glory
Python Performance Profiling: The Guts And The Glory
 
Mongo chicago
Mongo chicagoMongo chicago
Mongo chicago
 
Scrapy
ScrapyScrapy
Scrapy
 

More from dudarev

Refactor Yourself with Balalaika
Refactor Yourself with BalalaikaRefactor Yourself with Balalaika
Refactor Yourself with Balalaikadudarev
 
Who are we?
Who are we?Who are we?
Who are we?dudarev
 
CL metaprogramming
CL metaprogrammingCL metaprogramming
CL metaprogrammingdudarev
 
Functional Programming in Python
Functional Programming in PythonFunctional Programming in Python
Functional Programming in Pythondudarev
 
GeoTree - библиотека для гео-данных в Google App Engine
GeoTree - библиотека для гео-данных в Google App Engine GeoTree - библиотека для гео-данных в Google App Engine
GeoTree - библиотека для гео-данных в Google App Engine dudarev
 
Mobile applications with HTML and Javascript
Mobile applications with HTML and JavascriptMobile applications with HTML and Javascript
Mobile applications with HTML and Javascriptdudarev
 
Favorite android apps
Favorite android appsFavorite android apps
Favorite android appsdudarev
 
Donetsk Twitter
Donetsk TwitterDonetsk Twitter
Donetsk Twitterdudarev
 

More from dudarev (9)

Ololog
OlologOlolog
Ololog
 
Refactor Yourself with Balalaika
Refactor Yourself with BalalaikaRefactor Yourself with Balalaika
Refactor Yourself with Balalaika
 
Who are we?
Who are we?Who are we?
Who are we?
 
CL metaprogramming
CL metaprogrammingCL metaprogramming
CL metaprogramming
 
Functional Programming in Python
Functional Programming in PythonFunctional Programming in Python
Functional Programming in Python
 
GeoTree - библиотека для гео-данных в Google App Engine
GeoTree - библиотека для гео-данных в Google App Engine GeoTree - библиотека для гео-данных в Google App Engine
GeoTree - библиотека для гео-данных в Google App Engine
 
Mobile applications with HTML and Javascript
Mobile applications with HTML and JavascriptMobile applications with HTML and Javascript
Mobile applications with HTML and Javascript
 
Favorite android apps
Favorite android appsFavorite android apps
Favorite android apps
 
Donetsk Twitter
Donetsk TwitterDonetsk Twitter
Donetsk Twitter
 

Recently uploaded

WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 

Recently uploaded (20)

WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

Django with Mongo using Mongoengine

  • 1. Django with Mongo using Mongoengine Artem Dudarev #donetskpy, #cncdnua, February 2012
  • 2. Other ways to use Mongo with Django Which Python API should be used with Mongo DB and Django? • PyMongo -- • Mongoengine -- • Django MongoDB Engine • MongoDB backend for Django-nonrel
  • 4. Django The Web framework for perfectionists with deadlines. Using Django • Disqus • Many newspapers: Washington Post, Guardian, Lawrence.com. In Donetsk • Steelkiwi • MLSDev
  • 5.
  • 6.
  • 7. Mongo Mongo (from "humongous") is a scalable, high-performance, open source NoSQL database. Using Mongo • Foursquare • Catch In Donetsk •?
  • 8. Mongoengine MongoEngine is a Document-Object Mapper (think ORM, but for document databases) for working with MongoDB from Python.
  • 9. Mongoengine example from mongoengine import (Document, EmbeddedDocument, ListField, StringField, IntField) class Metadata(EmbeddedDocument): tags = ListField(StringField()) revisions = ListField(IntField()) class WikiPage(Document): title = StringField(required=True) text = StringField() metadata = EmbeddedDocumentField(Metadata)
  • 10. Mongoengine example (cont.) >>> page.title = “Hello, World!” >>> for page in WikiPage.objects: >>> print page.title
  • 12. «Делайте велосипеды, но то так, что бы хотелось на них ездить.» — Игорь Давыденко, #kyivpy #5
  • 13. Tumblr • http://wearethe99percent.tumblr.com/ • http://dearphotograph.com/ • http://stockingisthenewplanking.com/ • http://dudarev.tumblr.com/
  • 14. Tumblr (cont.) http://mashable.com/2011/11/14/tumblr-infographic/ • 35M tumblogs • 45% photos • Top 5 tags: GIF, LOL, Fashion, Art, Vintage • 218% growth (from June to June) • $800M valuation
  • 15. Mumblr • Harry Marr - developer of Mongoengine • Mumblr - Tumblr clone Starting with Python (virtualenv, pip) git clone https://github.com/hmarr/django-mumblr.git mumblr cd mumblr virtualenv . source bin/activate pip install -r requirements.txt cd example
  • 16. Mumblr (starting Mongo) http://www.mongodb.org/display/DOCS/Quickstart+Unix curl http://downloads.mongodb.org/linux...tgz > mongo.tgz tar xzf mongo.tgz sudo chown `id -u` /data/db sudo chown `id -u` /data/db/* ./mongodb-linux-i686-2.0.2/bin/mongod ./mongodb-linux-i686-2.0.2/bin/mongo use mumblr-example db.dropDatabase()
  • 17. Mumblr (adding user) ls mumblr/management/commands/ python manage.py adduse python manage.py runserver
  • 18. Points • Django is an excellent framework for not too complicated sites • MongoDB is #1 NoSQL database - try it • Djangists may find Mongoengine convenient • Do reinvent the wheel • Make it easy for others to start using it
  • 19. Credits Logos • Django • Mongo • Mongoengine Comics • How to Write a CV • The Hard Life Of A NoSQL Coder rst2pdf • rst2pdf • style by Alexis Métaireau was partially used