• Stars
    star
    707
  • Rank 63,603 (Top 2 %)
  • Language
    Python
  • License
    BSD 2-Clause "Sim...
  • Created over 12 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PyMongo support for Flask applications

Flask-PyMongo

PyMongo support for Flask applications

Quickstart

from flask import Flask, render_template
from flask_pymongo import PyMongo

app = Flask(__name__)
app.config["MONGO_URI"] = "mongodb://localhost:27017/myDatabase"
mongo = PyMongo(app)

@app.route('/')
def home_page():
    online_users = mongo.db.users.find({'online': True})
    return render_template('index.html', online_users=online_users)

More Info

More Repositories

1

professor

Painless profiling for MongoDB
Python
106
star
2

plog

A blog using Flask, Mongoengine, and MongoDB, as see on late.am
Python
36
star
3

keystone

A very simple, yet flexible, dynamic website framework
Python
27
star
4

dabble

Simple A/B testing framework for Python
Python
27
star
5

xrange

A pure-Python implementation of the xrange builtin
Python
17
star
6

flask-tweepy

Python
9
star
7

cookbook-preferred

Chef LWRP to dynamically set attributes.
Ruby
8
star
8

vienna-rss

Vienna is a freeware, open source RSS/Atom newsreader for the Mac OS X operating system.
C
6
star
9

nymwit

Nymwit is a word game in which players compete to come up with the most creative, popular, quirky, or notable acronym given a set of letters
Python
4
star
10

dtk

DTK is a curses 'GUI' toolkit for python programs
Python
4
star
11

browsershame

Web browsers use too many resources -- shame on you!
Python
3
star
12

wideload

C
3
star
13

delayserver

Threaded TCP echo server with customizable response latency
C
3
star
14

python-questions

Python
2
star
15

cookbook-disco

Chef Cookbook to install the Disco map-reduce framework
Ruby
2
star
16

sendlib

sendlib is a lightweight message serialization library, written in Python
Python
2
star
17

pymongodump

utility to dump and restore mongodb databases from python (with pymongo)
Python
2
star
18

revised

Automatic revision control for your Django models
2
star
19

keystone-heroku-demo

Hello/Howdy/Hiya, world! in Keystone
Python
2
star
20

shmdict

Python
1
star
21

cacheorbust

Read-behind HTTP API cache with memcached protocol support
C++
1
star
22

eventbrite

Client for Eventbrite's HTTP-based API
Python
1
star
23

simplest-python-project

Python
1
star
24

synk

Application event synchronization service with HTTP/JSON API
Python
1
star
25

shrt

A little URL shortener with Python, Flask, and MongoDB
Python
1
star