Skip to main content

Memgraph database adapter for Python language

Project description

pymgclient - Memgraph database adapter for Python language

pymgclient is a Memgraph database adapter for Python programming language compliant with the DB-API 2.0 specification described by PEP 249.

mgclient module is the current implementation of the adapter. It is implemented in C as a wrapper around mgclient, the official Memgraph client library. As a C extension, it is only compatible with the CPython implementation of the Python programming language.

pymgclient only works with Python 3.

Check out the documentation if you need help with installation or if you want to build pymgclient for yourself!

Documentation

Online documentation can be found on GitHub pages.

You can also build a local version of the documentation by running make from the docs directory. You will need Sphinx installed in order to do that.

Code sample

Here is an example of an interactive session showing some of the basic commands:

>>> import mgclient

# Make a connection to the database
>>> conn = mgclient.connect(host='127.0.0.1', port=7687)

# Create a cursor for query execution
>>> cursor = conn.cursor()

# Execute a query
>>> cursor.execute("""
        CREATE (n:Person {name: 'John'})-[e:KNOWS]->
               (m:Person {name: 'Steve'})
        RETURN n, e, m
    """)

# Fetch one row of query results
>>> row = cursor.fetchone()

>>> print(row[0])
(:Person {'name': 'John'})

>>> print(row[1])
[:KNOWS]

>>> print(row[2])
(:Person {'name': 'Steve'})

# Make database changes persistent
>>> conn.commit()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymgclient-1.3.1.tar.gz (125.6 kB view details)

Uploaded Source

Built Distributions

pymgclient-1.3.1-cp310-cp310-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.10 Windows x86-64

pymgclient-1.3.1-cp310-cp310-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

pymgclient-1.3.1-cp310-cp310-macosx_10_15_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

pymgclient-1.3.1-cp39-cp39-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.9 Windows x86-64

pymgclient-1.3.1-cp39-cp39-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

pymgclient-1.3.1-cp39-cp39-macosx_10_15_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9 macOS 10.15+ x86-64

pymgclient-1.3.1-cp38-cp38-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.8 Windows x86-64

pymgclient-1.3.1-cp38-cp38-macosx_11_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.8 macOS 11.0+ ARM64

pymgclient-1.3.1-cp38-cp38-macosx_10_15_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 macOS 10.15+ x86-64

pymgclient-1.3.1-cp37-cp37m-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.7m Windows x86-64

pymgclient-1.3.1-cp37-cp37m-macosx_10_15_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m macOS 10.15+ x86-64

File details

Details for the file pymgclient-1.3.1.tar.gz.

File metadata

  • Download URL: pymgclient-1.3.1.tar.gz
  • Upload date:
  • Size: 125.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1.tar.gz
Algorithm Hash digest
SHA256 a409ee9c7ac714a96a86f9eeca9e71f19f36f11390b3fdbac447d65462e05037
MD5 f87e7b45b6e5dc3ba226c3d5fee93b3d
BLAKE2b-256 c57470b392878d0777303107085a4f3854525b7e37c506a0b42550f6ea571ad1

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 af8edb3f5e57a6f35d6ec68dc147949ecdcc2020a910f7f961957fd224dcf235
MD5 eca4d2998aaff3bf6241f9b76550ff4e
BLAKE2b-256 af573d81cd4fd1b25b35b3f704b87198f4943624d7891aacb4e337990d4c50d1

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp310-cp310-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.10, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6b5c6a1eda2f7178befe6c7ad9d31ba14845e672f3ef20ddb9ff46424b893ab
MD5 139e80947f3b11c5ac570575538b609f
BLAKE2b-256 c83bbed9d92459a0c49a7646783519b32013c0af94ae251bf390a5393e271529

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp310-cp310-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.10, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6d013f878658296c3e8b360f0be41b9741907249874bcb30ef17fd0481d595d5
MD5 6a446d25d1c0afac951bf5f133766508
BLAKE2b-256 7b2cc49a3f2aecb9db98ffbf4456b779ac318367a82753226e3e6fce7941111d

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1f9aec0deff251b4c7f7acd763caad193330a072ab29e090e2b60925439eb6da
MD5 e6406b19d0432c0d82b98f638d82f051
BLAKE2b-256 e63f012997d1927f5c96124fbf2cc027a389add0bdb7f35e5625eac9fb1155b5

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 91faadc50d54ac4707e3b3239f77101d6610494658b1a16ecb4ef8976bb9aa0e
MD5 52303ac4911eb5b2956e443c4327f18c
BLAKE2b-256 0b19138579051058e2a42e1b1eb3857e2108d4a134bbd15ac5e0a3a9debe9e0f

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp39-cp39-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.9, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d08aef9bde5f89853cf028b72b547f364b797f5f2fd2d13510817b21d04d210d
MD5 ea5512f20e9db1f7bc0a522001949056
BLAKE2b-256 652201a2f071ad363448589952ee1394e911eac3d06d6b4f71079a95ffeb1c4b

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e30e03746b9a554b77801ac59ea0fd19fe85db11733d3350dfe1155f719c4e3a
MD5 7294bc71164bfe912055f1369a2173f2
BLAKE2b-256 6944158a97a309708c435891e7a83b4e8a10f8618ce29beca06dce057be296ba

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp38-cp38-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.8, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 79463f3578f0c4194c2f8f8d9386173ab2149ad16a0075af0deab840fbf7c482
MD5 45987f52609d1eb2392a56385244eeb1
BLAKE2b-256 cebcffab3f83de57ecc389139c7f6dde452e427ea5667383f1486fa0f6db7fc1

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp38-cp38-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.8, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b340a8f4987ae0ef2e5d519232ad98d2baf8deb47e1720e487de646ddfb8253d
MD5 d0347debd6d74d24eb5fb1dead822e28
BLAKE2b-256 e4613b2939de9e7e9e77aed059a6b1b584ddb305a7918a8b7658de48380190bc

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 1abd8dc4efbd5efd5c7074dd2efa88e89443cec23d04dfec1e4f6ff36861c67b
MD5 21618dd9cdd9edcf58f22fc186644df1
BLAKE2b-256 e07516c5026719f72ade6acf72f369927258d814e5c669988299f3075f604931

See more details on using hashes here.

File details

Details for the file pymgclient-1.3.1-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: pymgclient-1.3.1-cp37-cp37m-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.7m, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pymgclient-1.3.1-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ed8cf8eeb31319f6f4a76c59f90de68a7a004daae801d6f1eee20fc067230383
MD5 b436ae8d877fe3c12a534b58766078fe
BLAKE2b-256 5e38ec398afc1ec9173065441f9e47a56a4ab18bacd973156f7b75dc33f689c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page