{ "info": { "author": "Swapnil Bawaskar", "author_email": "sbawaskar@pivotal.io", "bugtrack_url": null, "classifiers": [], "description": "# py-gemfire-rest\n=================\n\nThis library enables your python applications to use GemFire as a datastore. (GemFire is a distributed key-value store. A short tutorial can be found at http://goo.gl/rF93fn). This library exposes Spring's CrudRepository like methods in an effort to simplify GemFire's APIs while still giving access to advanced GemFire features (details below). \n\n## Installation\n---------------\n\nUsing pip installation is simple\n\n $ sudo pip install gemfire-rest\n\nor from source:\n\n $ sudo python setup.py install\n\n## Quick Start\n--------------\n\n1. Start the GemFire REST service by [following the instructions](http://gemfire.docs.pivotal.io/latest/userguide/index.html#gemfire_rest/setup_config.html)\n2. Create a Region on the server (Region is a distributed ConcurrentMap in which GemFire stores the data). \n\n gfsh>create region --name=orders --type=PARTITION\n\n3. \n```python\n >>> from GemfireClient import *\n >>> client = GemfireClient(hostname=\"localhost\", port=8080)\n >>> myRepo = client.create_repository(\"orders\")\n >>> myRepo.save(order)\n```\n\nwhere the order object has an \"id\" instance variable. The library handles converting the object to/from json. \n\n## API Reference\n----------------\n\nThis library exercises [GemFire's REST APIs](http://gemfire.docs.pivotal.io/latest/userguide/index.html#gemfire_rest/book_intro.html) for enabling your python application to use GemFire as its datastore. To get started, we create a client by providing a hostname and port for an already running endpoint. \n```python\n client = GemfireClient(hostname=\"localhost\", port=8080)\n```\n\nFor each type of Object that we want to store in GemFire, we create a repository (Please not that you will have to create a Region on the server with the same name as the repository).\n```python\n orders = client.create_repository(\"orders\")\n```\nThe client provides a method to look up all the Regions that have been created on the server already:\n```python\n client.list_all_regions()\n```\n\nGemfireClient also has methods for querying and function execution which we will see later.\n\n### Repository\n--------------\n\nJust like Spring's CrudRepository interface, the following methods are available on the Repository\n```python\n save(entities) #saves one or more entities in GemFire\n find(ids) #finds entities with the given ids\n find_all() #returns all data in region\n exists(id) #checks to see if an entity with the given id exists\n delete(entities) #deletes the given entities from GemFire\n delete_all() #deletes all data in the GemFire region\n```\n\nAs the naming suggests, intention of these methods is pretty clear. One thing that needs to be highlighted here is that all entities need an identity; this library uses \"id\" instance variable as identity. So all entities that are stored in GemFire need to have an instance variable named \"id\".\n\n### Region\n----------\n\nFor advanced operations, we also provide access to Region, which defines the following methods:\n```python\n create(key, value) #will insert only if key does not exists\n update(key, value) #will update only if the key exists\n keys() # returns all keys in the region\n compare_and_set(key, oldvalue, newvalue) #sets the key to newvalue only if current value is equal ot oldvalue\n```\n\n### Querying\n------------\nGemfireClient provides API for running ad-hoc [OQL queries](http://gemfire.docs.pivotal.io/latest/userguide/index.html#developing/querying_basics/chapter_overview.html) on the server.\n```python\n adhoc_query(query_string) #OQL query string\n```\n\nFor faster performance, you will want to run prepared OQL queries. GemfireClient provides the following APIs for this:\n```python\n new_query(query_id, query_string) #registers and prepares the OQL query on the server\n run_query(query_id, query_args) #runs the query with specified parameters \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/gemfire/py-gemfire-rest", "keywords": "GemFire,key-value store", "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "gemfire-rest", "package_url": "https://pypi.org/project/gemfire-rest/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gemfire-rest/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/gemfire/py-gemfire-rest" }, "release_url": "https://pypi.org/project/gemfire-rest/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Python client for GemFire's REST service", "version": "1.0.2" }, "last_serial": 1230079, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "3e35cf978108c6b79efa2a2f4d952a68", "sha256": "4ad221fd80f7ec057454578f383d9e12fa5887909a24949dbb9100161b6d5445" }, "downloads": -1, "filename": "gemfire-rest-1.0.macosx-10.9-intel.exe", "has_sig": false, "md5_digest": "3e35cf978108c6b79efa2a2f4d952a68", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 72973, "upload_time": "2014-09-19T05:52:43", "url": "https://files.pythonhosted.org/packages/75/46/df914959761cbbe7057a6d692885f336a6746713e731f84e09e59cf540c6/gemfire-rest-1.0.macosx-10.9-intel.exe" }, { "comment_text": "", "digests": { "md5": "571c46feeb41173242db85c7c08449f2", "sha256": "dc4b2bf77035383da5158fe58dfeda7a4450df60fe9b536db4050bfeb8508843" }, "downloads": -1, "filename": "gemfire-rest-1.0.tar.gz", "has_sig": false, "md5_digest": "571c46feeb41173242db85c7c08449f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5066, "upload_time": "2014-09-19T05:52:39", "url": "https://files.pythonhosted.org/packages/3d/bd/6203e46049e81e2781c1620628bf5220beb6cb50faf7e871634f0e40a7e8/gemfire-rest-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "43b0a81db275519c2e104f99264102c9", "sha256": "b6b20b7346da49d02688095c46cc32038000abd640d61b6341a883a210ad1f17" }, "downloads": -1, "filename": "gemfire-rest-1.0.1.macosx-10.9-intel.exe", "has_sig": false, "md5_digest": "43b0a81db275519c2e104f99264102c9", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 72986, "upload_time": "2014-09-19T06:05:16", "url": "https://files.pythonhosted.org/packages/cd/82/8c92afbfb8cee6c7c6ccb3b10a1228e95496135f1097c866d19f7e8a61a4/gemfire-rest-1.0.1.macosx-10.9-intel.exe" }, { "comment_text": "", "digests": { "md5": "aa5fa2e11c93ccea6f90d7804cf554b4", "sha256": "fe2697a5ee8e17a7fd4c7e27dcfec9aa405e54267e5bab231bd9b30b58831e5c" }, "downloads": -1, "filename": "gemfire-rest-1.0.1.tar.gz", "has_sig": false, "md5_digest": "aa5fa2e11c93ccea6f90d7804cf554b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5359, "upload_time": "2014-09-19T06:05:12", "url": "https://files.pythonhosted.org/packages/72/6a/c616f4e43ffe3324c07d15c603089d565bde71aed6099802846a9fdc6f4f/gemfire-rest-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "c146a1a150ad2e704c60fa9965abbf44", "sha256": "ec777bcee7a209eff19933d8d3338efc2ab19e8c37148236cefa04c43e65b4d0" }, "downloads": -1, "filename": "gemfire-rest-1.0.2.macosx-10.9-intel.exe", "has_sig": false, "md5_digest": "c146a1a150ad2e704c60fa9965abbf44", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 72930, "upload_time": "2014-09-19T06:47:23", "url": "https://files.pythonhosted.org/packages/1d/69/f0a74cddb54875a3a9854d35ad31fcf37558efd063d9013a10e270112cf2/gemfire-rest-1.0.2.macosx-10.9-intel.exe" }, { "comment_text": "", "digests": { "md5": "53b63fcccbc98183deb8c40d8a4dabd3", "sha256": "b2331f9d5b02dfde0b62f4b1cff068a5a164ef201c2335ac8853309d4e088bd5" }, "downloads": -1, "filename": "gemfire-rest-1.0.2.tar.gz", "has_sig": false, "md5_digest": "53b63fcccbc98183deb8c40d8a4dabd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5345, "upload_time": "2014-09-19T06:47:20", "url": "https://files.pythonhosted.org/packages/aa/9a/7f6b528b05a76f8f61dddbe0610f90f103ecea3d11115996971748c32551/gemfire-rest-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c146a1a150ad2e704c60fa9965abbf44", "sha256": "ec777bcee7a209eff19933d8d3338efc2ab19e8c37148236cefa04c43e65b4d0" }, "downloads": -1, "filename": "gemfire-rest-1.0.2.macosx-10.9-intel.exe", "has_sig": false, "md5_digest": "c146a1a150ad2e704c60fa9965abbf44", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 72930, "upload_time": "2014-09-19T06:47:23", "url": "https://files.pythonhosted.org/packages/1d/69/f0a74cddb54875a3a9854d35ad31fcf37558efd063d9013a10e270112cf2/gemfire-rest-1.0.2.macosx-10.9-intel.exe" }, { "comment_text": "", "digests": { "md5": "53b63fcccbc98183deb8c40d8a4dabd3", "sha256": "b2331f9d5b02dfde0b62f4b1cff068a5a164ef201c2335ac8853309d4e088bd5" }, "downloads": -1, "filename": "gemfire-rest-1.0.2.tar.gz", "has_sig": false, "md5_digest": "53b63fcccbc98183deb8c40d8a4dabd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5345, "upload_time": "2014-09-19T06:47:20", "url": "https://files.pythonhosted.org/packages/aa/9a/7f6b528b05a76f8f61dddbe0610f90f103ecea3d11115996971748c32551/gemfire-rest-1.0.2.tar.gz" } ] }