{ "info": { "author": "Ding Li", "author_email": "dingmaotu@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Database :: Front-Ends" ], "description": "# gsql_client\n\n## Introduction\n\nIf you are using TigerGraph, you probably know that there are only one way to remotely execute\n your GSQL scripts: gql_client.jar. This jar is an interactive console and you can not programmatically\n access GSQL server (until 2.4 TigerGraph introduces JDBC based access). But we love Python,\n right?\n\nSo here we are: a Python version of gsql_client, removing all interactive features. gsql_client.jar\nactually uses http to interact with GSQL server. So can Python. TigerGraph already open sourced their\n[client implementation](https://github.com/tigergraph/ecosys/tree/master/clients/com/tigergraph), but only\nfor versions later than 2.3.0. I originally wrote this for 2.2.3, so there are minor differences.\n\n## Installation\n\nCopy gsql_client folder to your project or install with pip:\n\n```shell script\npip install gsql_client\n```\n\nThis package has no external dependency and it is compatible with both Python 2 and 3.\n\n> Note:\n>\n> if you submit large gsql files or long running commands, using remote client may receive\n> IncompleteRead exception as TigerGraph nginx service does not properly configure the `proxy_read_timeout`\n> for `/gsqlserver` path. So you may need to edit `{TIGERGRAPH_HOME}/tigergraph/config/nginx/nginx_1.conf`\n> and add this option (like for `/admin/websocket` or `/websocket`).\n\n## TODO\n\nMaybe I could create a main function to launch an interactive shell (using stdlib cmd module), so that\nwe can use `python -m gsql_client` just as `java -jar gsql_client.jar`. It is best to keep them compatible\n(for both command line options and behaviors).\n\n## Usage\n\nIt contains mainly 2 classes: gsql_client.Client as a remote GSQL server client and\ngsql_client.RESTPP for directly interact with RESTPP server.\n\n```python\nfrom gsql_client import Client, RESTPP\n\n# default port 14240, you can use 10.0.0.1:29383 to specify another port\nclient = Client(\"10.0.0.1\")\n# for versions later than 2.4.0, it is mandatory to specify the version like this:\nclient = Client(\"10.0.0.1\", version=\"v2_4_0\")\n# or the login would fail with incompatible server/client version\n# you can directly specify the commit hash of the client (used for compatibility check) by:\nclient = Client(\"10.0.0.1\", version=\"v2_6_0\", commit=\"somehexhashstring\")\n\nclient.login() # returns True for success; exceptions and False for failure\nres = client.command(\"ls\") # also returns the result as a list of lines\nclient.command(\"clear graph store\", \"y\") # needs answer\nclient.run_file(\"yourfile.gsql\")\nclient.version()\nclient.help()\nclient.quit()\n\nrestpp = RESTPP(\"10.0.0.1\") # default port 9000\n\n# no need to login\n# but you can use restpp.requesttoken(secret) to setup token based authentication:\nsecret = client.get_secret(\"my_graph\", create_alias=\"my_graph_query_secret\")\n\n# use=True for directly using the requested token\ntoken = restpp.request_token(secret, use=True)\n# or with set_token\nrestpp.set_token(token)\n\n# same as type `select * from MyVertex` in gsql shell\nrestpp.select_vertices(\"my_graph\", \"MyVertex\")\nrestpp.query(\"my_graph\", \"my_query\", param1 = 1) # run your query\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/dingmaotu/gsql_client", "keywords": "tigergraph,gsql,restpp,client", "license": "", "maintainer": "", "maintainer_email": "", "name": "gsql-client", "package_url": "https://pypi.org/project/gsql-client/", "platform": "", "project_url": "https://pypi.org/project/gsql-client/", "project_urls": { "Homepage": "https://github.com/dingmaotu/gsql_client" }, "release_url": "https://pypi.org/project/gsql-client/0.1.2/", "requires_dist": null, "requires_python": ">=2.7", "summary": "GSQL and RESTPP Python remote clients for TigerGraph", "version": "0.1.2" }, "last_serial": 5889994, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "944c8b712f7f9f6038af0db98927c6aa", "sha256": "abc9b68752ed311ca536c20147ba5e29ec6e84fa0341d8d8592359b134f8ccd8" }, "downloads": -1, "filename": "gsql_client-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "944c8b712f7f9f6038af0db98927c6aa", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 10958, "upload_time": "2019-09-04T13:53:58", "url": "https://files.pythonhosted.org/packages/70/34/d74d32c942b183f430b59eb97ebd971d6760ac6d2f6361f91385a14730ff/gsql_client-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cbe74e4be986e19b97f17758ac30aeab", "sha256": "551a817bc96ef6dbaab3fd69b597ba73e0b6af6077949ed1a39e2929a3a816f1" }, "downloads": -1, "filename": "gsql_client-0.1.0.tar.gz", "has_sig": false, "md5_digest": "cbe74e4be986e19b97f17758ac30aeab", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 11171, "upload_time": "2019-09-04T13:54:02", "url": "https://files.pythonhosted.org/packages/e5/ee/f6ea127d680f8c54f3b2510652ab1e9dc91e8d7df917382c34e8d681ba8f/gsql_client-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "f1ea2f06eaa46989044b2f7c7dd92458", "sha256": "5f1a90f360752375ac575e1a185e0ea2508e564f69d89474a7ae225f6c955bdd" }, "downloads": -1, "filename": "gsql_client-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f1ea2f06eaa46989044b2f7c7dd92458", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 11600, "upload_time": "2019-09-20T05:51:48", "url": "https://files.pythonhosted.org/packages/1e/1b/d13012e0dacaef4da56e5b70b9ccf728b81e6392d6d1386fb4b02338efc4/gsql_client-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ee436bef184947a64b3eb155e4d10b7", "sha256": "edd5b2aa6a9c7de731bc97520728e28d7f7eec59b28ebf19e7872a91bdfe7521" }, "downloads": -1, "filename": "gsql_client-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4ee436bef184947a64b3eb155e4d10b7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 11842, "upload_time": "2019-09-20T05:51:50", "url": "https://files.pythonhosted.org/packages/ea/5e/ac5fcdf87659225f0e141ea028564ddbc9a19443fb1063c4c04c41d5d07b/gsql_client-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b7f1396441a1d8d81072dbdf372bf333", "sha256": "b74053547b02d7e01f94e54f11527c13e50c573bd88881fc6584c9f3acc85960" }, "downloads": -1, "filename": "gsql_client-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b7f1396441a1d8d81072dbdf372bf333", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 15867, "upload_time": "2019-09-26T10:41:28", "url": "https://files.pythonhosted.org/packages/fa/46/00b405666490b99aa925a435d2115df005ed931d29ffc6374e1e71cebdab/gsql_client-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "74974b980e74cda0a6a7fc87b5477b1f", "sha256": "82b6adef2b819cdd53ce9e06730f3675e6fde04828ff513956529fe1463ce64a" }, "downloads": -1, "filename": "gsql_client-0.1.2.tar.gz", "has_sig": false, "md5_digest": "74974b980e74cda0a6a7fc87b5477b1f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 13260, "upload_time": "2019-09-26T10:41:31", "url": "https://files.pythonhosted.org/packages/d5/29/4cc7436fec669f5c9a6a9ea89a28cdc84f08a5b54b102b8ddd4d3118379d/gsql_client-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b7f1396441a1d8d81072dbdf372bf333", "sha256": "b74053547b02d7e01f94e54f11527c13e50c573bd88881fc6584c9f3acc85960" }, "downloads": -1, "filename": "gsql_client-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b7f1396441a1d8d81072dbdf372bf333", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 15867, "upload_time": "2019-09-26T10:41:28", "url": "https://files.pythonhosted.org/packages/fa/46/00b405666490b99aa925a435d2115df005ed931d29ffc6374e1e71cebdab/gsql_client-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "74974b980e74cda0a6a7fc87b5477b1f", "sha256": "82b6adef2b819cdd53ce9e06730f3675e6fde04828ff513956529fe1463ce64a" }, "downloads": -1, "filename": "gsql_client-0.1.2.tar.gz", "has_sig": false, "md5_digest": "74974b980e74cda0a6a7fc87b5477b1f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 13260, "upload_time": "2019-09-26T10:41:31", "url": "https://files.pythonhosted.org/packages/d5/29/4cc7436fec669f5c9a6a9ea89a28cdc84f08a5b54b102b8ddd4d3118379d/gsql_client-0.1.2.tar.gz" } ] }