{ "info": { "author": "Noboru Irieda", "author_email": "noboru@irieda.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", "Operating System :: MacOS", "Operating System :: POSIX", "Operating System :: Unix", "Topic :: Database" ], "description": "unqlitepy\n=============\n\nUnQLite for Python Binding\n\n## Install\n\n```sh\n> sudo pip install unqlitepy\n...\nSuccessfully installed UnQLitePy\nCleaning up...\n```\nor \n\n```sh\n> virtualenv sample\n> cd sample\n> bin/pip install git+https://github.com/nobonobo/unqlitepy.git\n...\nSuccessfully installed UnQLitePy\nCleaning up...\n```\n\n## Usage\n\n```python\nfrom unqlitepy import UnQLite\n\nwith UnQLite(':mem:') as db:\n db.store('test', 'hello!')\n print db.fetch('test') # -> hello!\n db.append('test', ' world!')\n print db.fetch('test') # -> hello! world!\n\n db.delete('test')\n for i in range(25):\n db.store('test{0}'.format(i), 'hello!')\n db.store('etst{0}'.format(i), 'hello!')\n if i%5==0:\n db.delete('etst{0}'.format(i))\n\n @UnQLite.FetchCallback\n def f(output, outlen, udata):\n output = (c_char*outlen).from_address(output).raw\n print locals()\n return UNQLITE_OK\n\n db.fetch_cb('test0', f)\n\n sample = (\n \"print 'hello!\\n';\"\n \"db_create('users'); /* Create the collection users */\"\n \"db_create('hoges');\"\n \" /* Store something */ \"\n \"db_store('users',{ 'name' : 'dean' , 'age' : 32 });\"\n \"db_store('hoges',{ 'name' : 'dean' , 'age' : 32 });\"\n \"db_store('users',{ 'name' : 'chems' , 'age' : 27 });\"\n \"db_store('hoges',{ 'name' : 'chems' , 'age' : 27 });\"\n \"print db_fetch_all('users')..'\\n';\"\n \"/*print db_reset_record_cursor('users')..'\\n';*/\"\n \"while( ($rec = db_fetch('users')) != NULL ){\"\n \" print $rec; print '\\n';\"\n \"}\"\n )\n\n with db.compile(sample) as vm:\n vm.execute()\n with vm.new_scalar() as sv, vm.new_array() as av:\n print sv, sv.is_scalar()\n print av, av.is_json_array()\n\n db.fetch_cb('users', f)\n\n with db.cursor() as cursor:\n cursor.first()\n cursor.seek('test20')\n while cursor.valid():\n print repr(cursor.key()), repr(cursor.value())\n cursor.next()\n```\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nobonobo/unqlitepy", "keywords": "database,kvs,unqlite", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "unqlitepy", "package_url": "https://pypi.org/project/unqlitepy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/unqlitepy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/nobonobo/unqlitepy" }, "release_url": "https://pypi.org/project/unqlitepy/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "UnQLite Binding for Python", "version": "0.3.0" }, "last_serial": 834291, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "8cfed4b8c5ef98788b97ab9a9cc7ac3d", "sha256": "64fc61edb9cec6d0c3513a5b3629647bb08a1b5ade887992dfec5ea29180628c" }, "downloads": -1, "filename": "unqlitepy-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8cfed4b8c5ef98788b97ab9a9cc7ac3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 417664, "upload_time": "2013-08-07T10:04:13", "url": "https://files.pythonhosted.org/packages/61/d6/85d11dde754edde502f6cf723095cddb0f2157a8bbc1f004afe3e625ea1c/unqlitepy-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8cfed4b8c5ef98788b97ab9a9cc7ac3d", "sha256": "64fc61edb9cec6d0c3513a5b3629647bb08a1b5ade887992dfec5ea29180628c" }, "downloads": -1, "filename": "unqlitepy-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8cfed4b8c5ef98788b97ab9a9cc7ac3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 417664, "upload_time": "2013-08-07T10:04:13", "url": "https://files.pythonhosted.org/packages/61/d6/85d11dde754edde502f6cf723095cddb0f2157a8bbc1f004afe3e625ea1c/unqlitepy-0.3.0.tar.gz" } ] }