MONGODB access via IPython
Project description
ipython mongo magic
=============
```sql
In [1]: %install_ext https://github.com/Bloodevil/ipython_mongo/edit/master/imongo.py
In [2]: %load_ext imongo.py
```
import error when load_ext
=============
1. check sys.path
2. check imongo under '/usr/lib/python2.7/dist-packages/IPython/extensions'
Usage
=============
%mongo_connect [mongodb://localhost:27017]
```sql
In [1]: con = %mongo_connect
In [2]: con
Out[2]: MongoClient('localhost', 27017)
In [3]: %mongo_connect mongodb://127.0.0.1:27017
Out[3]: MongoClient(u'127.0.0.1', 27017)
```
%show_dbs
```sql
In [10]: %show_dbs
Out[10]:
[u'local',
u'tumblr',
u'admin',
u'movie',
u'theater',
u'a',
u'daa',
u'dbs',
u'test']
```
%show_collections [dbname]
```sql
In [11]: %show_collections movie
Out[11]: [u'system.indexes', u'kobis']
```
News
====
0.1
---
*Release date: 26-Aug-2014*
* Initial release
* Release to PyPI
=============
```sql
In [1]: %install_ext https://github.com/Bloodevil/ipython_mongo/edit/master/imongo.py
In [2]: %load_ext imongo.py
```
import error when load_ext
=============
1. check sys.path
2. check imongo under '/usr/lib/python2.7/dist-packages/IPython/extensions'
Usage
=============
%mongo_connect [mongodb://localhost:27017]
```sql
In [1]: con = %mongo_connect
In [2]: con
Out[2]: MongoClient('localhost', 27017)
In [3]: %mongo_connect mongodb://127.0.0.1:27017
Out[3]: MongoClient(u'127.0.0.1', 27017)
```
%show_dbs
```sql
In [10]: %show_dbs
Out[10]:
[u'local',
u'tumblr',
u'admin',
u'movie',
u'theater',
u'a',
u'daa',
u'dbs',
u'test']
```
%show_collections [dbname]
```sql
In [11]: %show_collections movie
Out[11]: [u'system.indexes', u'kobis']
```
News
====
0.1
---
*Release date: 26-Aug-2014*
* Initial release
* Release to PyPI
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ipython-mongo-0.1.0.tar.gz
(1.7 kB
view hashes)