{ "info": { "author": "Marin Tomic", "author_email": "marin.tomic@memgraph.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Database", "Topic :: Database :: Front-Ends", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "pymgclient is a [Memgraph](https://memgraph.com/>) database adapter for Python\nprogramming language compliant with the DB-API 2.0 specification described by\nPEP 249.\n\nmgclient module is the current implementation of the adapter. It is implemented\nin C as a wrapper around [mgclient](https://github.com/memgraph/mgclient), the\nofficial Memgraph client library. As a C extension, it is only compatible with\nthe CPython implementation of the Python programming language.\n\npymgclient only works with Python 3.\n\n## Prerequisites\n\n### Build prerequisites\n\npymgclient is a C wrapper around the\n[mgclient](https://github.com/memgraph/mgclient) Memgraph client library. To\ninstall it from sources you will need:\n\n - Python 3.5 or newer\n - A C compiler supporting C11 standard\n - Python header files\n - mgclient header files\n\nOnce prerequisites are met, you can install pymgclient using `pip` to download it from PyPI:\n\n```\n$ pip3 install pymgclient\n```\n\nor using `setup.py` if you have downloaded the source package locally:\n\n```\n$ python3 setup.py build\n$ python3 setup.py install\n```\n\n### Runtime requirements\n\nmgclient Python module requires mgclient shared library at runtime (usually\ndistributed as `libmgclient.so`). The module relies on the host OS to find the\nlocation. If the library is installed in a standard location, there should be\nno problems. Otherwise, you will have to let the mgclient module how to find it\n(usually by setting the `LD_LIBRARY_PATH` environment variable).\n\nYou will also need [OpenSSL](https://www.openssl.org/) libraries required by\nthe [mgclient](https://github.com/memgraph/mgclient) C library.\n\n## Running the test suite\n\nOnce mgclient is installed, you can run the test suite to verify it\nis working correctly. From the source directory, you can run:\n\n```\n$ python3 -m pytest\n```\n\nTo run the tests, you will need to have Memgraph, pytest and pyopenssl\ninstalled on your machine. The tests will try to start the Memgraph binary from\nthe standard installation path (usually `/usr/lib/memgraph/memgraph`)\nlistening on port 7687. You can configure a different path or port by setting\nthe following environment variables:\n\n * `MEMGRAPH_PATH`\n * `MEMGRAPH_PORT`\n\n## Documentation\n\nOnline documentation can be found on [GitHub\npages](https://memgraph.github.io/pymgclient/).\n\nYou can also build a local version of the documentation by running `make` from\nthe `docs` directory. You will need [Sphinx](http://www.sphinx-doc.org/)\ninstalled in order to do that.\n\n## Code sample\n\nHere is an example of an interactive session showing some of the basic commands:\n\n```python\n>>> import mgclient\n\n# Make a connection to the database\n>>> conn = mgclient.connect(host='127.0.0.1', port=7687)\n\n# Create a cursor for query execution\n>>> cursor = conn.cursor()\n\n# Execute a query\n>>> cursor.execute(\"\"\"\n CREATE (n:Person {name: 'John'})-[e:KNOWS]->\n (m:Person {name: 'Steve'})\n RETURN n, e, m\n \"\"\")\n\n# Fetch one row of query results\n>>> row = cursor.fetchone()\n\n>>> print(row[0])\n(:Person {'name': 'John'})\n\n>>> print(row[1])\n[:KNOWS]\n\n>>> print(row[2])\n(:Person {'name': 'Steve'})\n\n# Make database changes persistent\n>>> conn.commit()\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/memgraph/pymgclient", "keywords": "", "license": "Apache2", "maintainer": "Marin Tomic", "maintainer_email": "marin.tomic@memgraph.com", "name": "pymgclient", "package_url": "https://pypi.org/project/pymgclient/", "platform": "linux", "project_url": "https://pypi.org/project/pymgclient/", "project_urls": { "Documentation": "https://memgraph.github.io/pymgclient", "Homepage": "https://github.com/memgraph/pymgclient", "Source": "https://github.com/memgraph/pymgclient" }, "release_url": "https://pypi.org/project/pymgclient/0.1.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Memgraph database adapter for Python language", "version": "0.1.0" }, "last_serial": 5312727, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e93b1950ad0fd9c88c53e39ec55d4de5", "sha256": "b881252d76c82329421a19bc3140016fb4bf4ce13740b68eae98e53c4598535e" }, "downloads": -1, "filename": "pymgclient-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e93b1950ad0fd9c88c53e39ec55d4de5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 30693, "upload_time": "2019-05-24T13:09:56", "url": "https://files.pythonhosted.org/packages/a0/06/2ae8f4e4c77513ff90055814b479473a5e3bf75ceb4cd68ed554567bf297/pymgclient-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e93b1950ad0fd9c88c53e39ec55d4de5", "sha256": "b881252d76c82329421a19bc3140016fb4bf4ce13740b68eae98e53c4598535e" }, "downloads": -1, "filename": "pymgclient-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e93b1950ad0fd9c88c53e39ec55d4de5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 30693, "upload_time": "2019-05-24T13:09:56", "url": "https://files.pythonhosted.org/packages/a0/06/2ae8f4e4c77513ff90055814b479473a5e3bf75ceb4cd68ed554567bf297/pymgclient-0.1.0.tar.gz" } ] }