bloodevil / ipython_mongo Goto Github PK
View Code? Open in Web Editor NEWipython mongo console
License: MIT License
ipython mongo console
License: MIT License
now we can use multi comparison about one field like below
{'test': 100}
{'test': 150}
{'test': 200}
%find db.collection {'test': > 120, 'test': < 170}
{'test': 150}
now we use autocompleted by ipython. but from now we add db and collections for easy to use.
for example. I offer the db list when I use %show_dbs after %connect_mongo but after connected mongo, I can see the all db names when I enter the tab(used for autocomplete)
for that I consider the other mongo-python-driver but pymongo.
add
%show_collections about each db
update changelog.
add
%insert
changed
%show_dbs : can see all databased about connected mongodb host
%show_collections : can see all collections about connected mongodb host's db
add test module about %mongo_connect, show_dbs, show_collections
%insert db-name collection-name {data}
%%insert db-name collection-name
{multi-line data}
data format
add mongo cursor auto complete to ipython.
<pymongo.cursor.Cursor at 0x34c9990> don't work autocomplete using tab key. but exist.
add autocomplete.
can u explain get result data to color text
%delete db.collection : delete collection
%delete db : delete db
%find db.collection {query}
%delete db.collection : delete collection
%delete db : delete db
related with #7 I used to eval method when create dynamic attribute to class.(collections)
find the other way to add dynamic attribute to class.
%find db.collection {query}
query can contain slash(/) like {'field': /test/}
not a cursor (pymongo return Cursor object) but print all data that want to see.
should be easy to read.
%count db.collection
number of documents
for #21 issue.
cleanup error messages.
Mongodb server shell and python mongodb driver query are different. and I made ipython_mongo for easy to use so little different from python mongodb driver. but we use python mongodb driver when we write the code in python. so show we need show pymongo query when i write the query in imongo like below:
%find db.collection {'test': > 10, 'test1': /a/}
-> db.collection.find({'test':{'$gt': 10}, 'test1': {'$regex': 'a'}})
instead $lt, lte, gt, gte, use <, >, <=, >=.
usage:
%find db.collection {'field1': > 3, 'field1': <10}
%find db.collection {'field1': > 3, 'field2': <=10}
Any plan?
%helpmongo find
%helpmongo db.collection.find()
%helpmongo
how to use
command list that can use.
eg) %helpmongo count : total number of data in cursor. eg) db.collection.count() db.collection.find().count()
%helpmongo find : ... eg) db.collection.find()
%helpmongo find detail : detail help message include all find parameter.
all information crawled from mongodb docs.
add
%show_dbs function.
when I use like query in mongodb python (pymongo), should use $regex not /.
originally I can use "/" in mongodb shell. and easy to use.
after load imongo extension. I want to use "/" rule in python.
refer to mongodb shell js code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.