My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information

IMPORTANT: Moved to Github

I've moved this project to github:

noSQLite is a lightweight zeroconf noSQL document-oriented forking Python SQLite networked authenticated XMLRPC database server. It's written using Python and SQLite to provide a very lightweight and easy way to use SQLite that offers somewhat similar functionality to MongoDB (at least the parts I use), but much more lightweight.

To install:

hg clone nosqlite
cd nosqlite
python develop

See for a demo in the context of Sage.

Here is a little demo.

>>> from nosqlite import client, server
>>> s = server(directory='/tmp/a')
>>> c = client(s.port)     # or do this from another session
>>> database = c.db
>>> collection =; collection
Collection ''
>>> collection.insert({'a':123, 'b':'hello'})
>>> list(collection)
[{'a': 123, 'b': 'hello'}]
>>> collection.insert([{'a':i} for i in range(5)])
>>> len(collection)
>>> collection.find_one(a=4)
{'a': 4}
>>> collection.find_one(a=123)
{'a': 123, 'b': 'hello'}
>>> list(collection.find('a<3'))
[{'a': 0}, {'a': 1}, {'a': 2}]
>>> collection.insert({'a':-1, 'foo':[1,(2,3),set([3,4])]})   # automatic pickling so store any Python object
>>> collection.find_one(a=-1)
{'a': -1, 'foo': [1, (2, 3), set([3, 4])]}
nosqlite server on port 8132 serving "/tmp/a/"
Connect with

	client(8132, 'username', 'xxx')

To securely connect from a remote client, setup an ssh tunnel by
typing on the client:

	ssh -L 8132:localhost:8132 deep.local


	client(8132, 'username', 'xxx')

To stop server, delete the server object, call the quit()
method, or kill pid 94181.
Powered by Google Project Hosting