{ "info": { "author": "manan", "author_email": "manan.yadav02@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: Unix", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Database", "Topic :: Database :: Front-Ends" ], "description": "# getsetpy\nPython connector for GetSetDB with official support.\n\nSome familiarity with GetSetDB would come a long way in using getsetpy as most of the API calls by the `space.Space` and `database.Database` inter-actors comes directly from it. To learn GetSetDB, refer to [A Tour of GetSetDB](https://medium.com/@mentix02/a-tour-of-getsetdb-8716c39e354d)\n\n## Installation\n```sh\n$ pip install getsetpy\n```\n\n## Usage\n\ngetsetpy provides an interface to GetSetDB by using inter-actors that provide a similar and easy to use API for sending commands to the Space or a particular Database.\n\n### Space API\nTo run Space commands, use the `space.Space` inter-actor - \n\n```python\nfrom getsetpy.space import Space\n\nspace = Space()\ndatabases = space.ls() # returns list of all databases\n\nspace.new('users') # creates a new database\nspace.delete('old_database') # deletes an old database\n\nspace.rename('users', 'people') # renames 'user' database to 'people'\n\ncommands = space.commands() # returns a list of commands for \"space\"\n\n```\n\n### Database API\nTo run commands for a specific Database, use the `database.Database` inter-actor - \n\n```python\nfrom getsetpy.database import Database\n\n# connects to the 'users' database\nusers = Database('users') \n# if it does not exist, it raises a DatabaseNotFound exception\n\n# returns a dictionary with all the user keys as values and a redundant number as the key\nusers = users.all() \n# returns an empty dictionary if no pairs are found\n# but if the users database was populated like this - \n# manan : yadav\n# bruce : wayne\n# martha : stewart\n# kunal : pahuja\n# peter : parker\n# donald : trump\n# barry : allen\n# sheldon : cooper\n# then the dictionary would look like\n# {1.0: 'manan', 2.0: 'bruce', 3.0: 'martha', 4.0: 'kunal', 5.0: 'peter', 6.0: 'donald', 7.0: 'barry', 8.0: 'sheldon'}\n\n# deletes the pair - donald : trump to database 'users'\nusers.delete('donald')\n\n# gets the value for key 'barry'\nusers.get('barry')\n# 'allen'\n\n# adds the pair - wonder : woman to database 'users'\nusers.set('wonder', 'woman')\n\n# returns a dictionary containg info about the database 'users'\n# like its size in bytes and the path to its file\nusers.info()\n# {'size': '136 bytes', 'path': '/tmp/gsdb/users.gsdb'}\n\n# returns the number of pairs in the 'users' database\nusers.count()\n# 8\n\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/getsetdb/getsetpy", "keywords": "getsetpy getsetdb connector database", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "getsetpy", "package_url": "https://pypi.org/project/getsetpy/", "platform": "", "project_url": "https://pypi.org/project/getsetpy/", "project_urls": { "Homepage": "https://github.com/getsetdb/getsetpy" }, "release_url": "https://pypi.org/project/getsetpy/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "official Python connector for GetSetDB", "version": "1.2.1" }, "last_serial": 4669170, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "9fbf3fa1f3edabb3c5788cbec72d055e", "sha256": "183b06293e1874b576bc8290917a0fcc451b3f719ea0786b94542ae2634d03ad" }, "downloads": -1, "filename": "getsetpy-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9fbf3fa1f3edabb3c5788cbec72d055e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6563, "upload_time": "2019-01-06T13:53:28", "url": "https://files.pythonhosted.org/packages/3a/1a/573dd8bbb31e3d8d71241afa2ffa4f5c6667b35f6da3f97e34c87f2564bd/getsetpy-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "498e1ae9d914ea4f229fa47f28ff2992", "sha256": "28d8b1afc6a12db109f460abdfcdf19b82cb89a7f55bea46591cfc50bbc5a717" }, "downloads": -1, "filename": "getsetpy-1.0.tar.gz", "has_sig": false, "md5_digest": "498e1ae9d914ea4f229fa47f28ff2992", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3847, "upload_time": "2019-01-06T13:53:30", "url": "https://files.pythonhosted.org/packages/92/2c/ad5b2c889d82db23f9ab2f0d14e30df37765a6de138670cad94fdb3c019e/getsetpy-1.0.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "3cceba6cc892db35c0a1b87b8bf611d2", "sha256": "089c20d89a1b18660ef68e9b5d412e482f877bfdc149428678ee82bae34db750" }, "downloads": -1, "filename": "getsetpy-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3cceba6cc892db35c0a1b87b8bf611d2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7477, "upload_time": "2019-01-06T18:49:26", "url": "https://files.pythonhosted.org/packages/3a/16/421541a28afef928c71811c80b1ec575325e4cce50c7539e89ec5075618d/getsetpy-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "81980bd84f9cee1c45770f658954b963", "sha256": "2ac2ba7adb137eefd3ec37731300633ef6ca1e61de17db725134c8496a4bffbe" }, "downloads": -1, "filename": "getsetpy-1.2.tar.gz", "has_sig": false, "md5_digest": "81980bd84f9cee1c45770f658954b963", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4985, "upload_time": "2019-01-06T18:49:28", "url": "https://files.pythonhosted.org/packages/b2/0a/4913f05a6887a6b3d0859cc832833908e304953137b06b0e0f9426ead440/getsetpy-1.2.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "c4bd199724cba36f994d75b1547afb2c", "sha256": "25ac41a2d53a092278f2983399172fdbac6cc395438d7447b0870a3a989cb286" }, "downloads": -1, "filename": "getsetpy-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c4bd199724cba36f994d75b1547afb2c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7540, "upload_time": "2019-01-07T16:01:22", "url": "https://files.pythonhosted.org/packages/b7/1c/2c95ff199d4e357403c21c43dce8bb4b671b07b17b6d9119421ab1ed460d/getsetpy-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "279fd8e098ea4be9580f225ecc7c4506", "sha256": "6bd191f083c7433173cb7d1d880b49a1060d8f3f3f3096f34d0a14f8e7417f08" }, "downloads": -1, "filename": "getsetpy-1.2.1.tar.gz", "has_sig": false, "md5_digest": "279fd8e098ea4be9580f225ecc7c4506", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5019, "upload_time": "2019-01-07T16:01:23", "url": "https://files.pythonhosted.org/packages/f5/6e/f7330d0df2badd34d600174c1d2d15d607e10b104c5ea492351f5d554555/getsetpy-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c4bd199724cba36f994d75b1547afb2c", "sha256": "25ac41a2d53a092278f2983399172fdbac6cc395438d7447b0870a3a989cb286" }, "downloads": -1, "filename": "getsetpy-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c4bd199724cba36f994d75b1547afb2c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7540, "upload_time": "2019-01-07T16:01:22", "url": "https://files.pythonhosted.org/packages/b7/1c/2c95ff199d4e357403c21c43dce8bb4b671b07b17b6d9119421ab1ed460d/getsetpy-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "279fd8e098ea4be9580f225ecc7c4506", "sha256": "6bd191f083c7433173cb7d1d880b49a1060d8f3f3f3096f34d0a14f8e7417f08" }, "downloads": -1, "filename": "getsetpy-1.2.1.tar.gz", "has_sig": false, "md5_digest": "279fd8e098ea4be9580f225ecc7c4506", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5019, "upload_time": "2019-01-07T16:01:23", "url": "https://files.pythonhosted.org/packages/f5/6e/f7330d0df2badd34d600174c1d2d15d607e10b104c5ea492351f5d554555/getsetpy-1.2.1.tar.gz" } ] }