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.4.0.tar.gz (127.1 kB view details)

Uploaded Source

Built Distributions

pymgclient-1.4.0-cp313-cp313-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.13Windows x86-64

pymgclient-1.4.0-cp313-cp313-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.38+ x86-64manylinux: glibc 2.39+ x86-64

pymgclient-1.4.0-cp313-cp313-macosx_15_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pymgclient-1.4.0-cp313-cp313-macosx_14_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

pymgclient-1.4.0-cp313-cp313-macosx_12_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.13macOS 12.0+ ARM64

pymgclient-1.4.0-cp312-cp312-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.12Windows x86-64

pymgclient-1.4.0-cp312-cp312-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ x86-64manylinux: glibc 2.39+ x86-64

pymgclient-1.4.0-cp312-cp312-macosx_15_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pymgclient-1.4.0-cp312-cp312-macosx_14_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

pymgclient-1.4.0-cp312-cp312-macosx_12_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 12.0+ ARM64

pymgclient-1.4.0-cp311-cp311-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.11Windows x86-64

pymgclient-1.4.0-cp311-cp311-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ x86-64manylinux: glibc 2.39+ x86-64

pymgclient-1.4.0-cp311-cp311-macosx_15_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pymgclient-1.4.0-cp311-cp311-macosx_14_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

pymgclient-1.4.0-cp311-cp311-macosx_12_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

pymgclient-1.4.0-cp310-cp310-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.10Windows x86-64

pymgclient-1.4.0-cp310-cp310-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ x86-64manylinux: glibc 2.39+ x86-64

pymgclient-1.4.0-cp310-cp310-macosx_15_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

pymgclient-1.4.0-cp310-cp310-macosx_14_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

pymgclient-1.4.0-cp310-cp310-macosx_12_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 12.0+ ARM64

File details

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

File metadata

  • Download URL: pymgclient-1.4.0.tar.gz
  • Upload date:
  • Size: 127.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymgclient-1.4.0.tar.gz
Algorithm Hash digest
SHA256 6dfe026ffbfa9a81ad9b042589a536a3fab8bcb630b6c44f3d33ef97ed1bd1b4
MD5 e377b184ea2b7cb5823544c9ee51878a
BLAKE2b-256 6e585da9c14122ce01cd428f729206c79458f7f6d7ff997a80938fa4c9b63ea3

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pymgclient-1.4.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymgclient-1.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3ee8d8205537291b8d5e6193823bdd48d2db9992075b0565f7c4f789146624a5
MD5 aba8d01be236eb5fd69b6dab8dae81ff
BLAKE2b-256 bbf4098b11a1ab25498161a09f5e44fbc43ba8ec41ba5df2b100422627d247db

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp313-cp313-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp313-cp313-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 bf701b47a1d0c1eee2a8a16bde0d96a26669d2ef652ea1a32f9c1d1a6e8b5393
MD5 3124183062150a6eaa9de11e2130f14d
BLAKE2b-256 70080ba18b451b70fe76bf691b16f7db1dcce3cd2edd9d3bee941e688bb7c882

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3a0c7fa17dc046a82c3f48125cde82fdf20a3803cf361774fdac709072ed4201
MD5 01b7c3e282f687d9327b7117d06d86fc
BLAKE2b-256 66e315f242f8515ff4485dc6d19c6991f462d48838535e535e5f70c446f8c51c

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a87eec1fde175924a061d0f3ea8e4acedad444b33b82b1da0b7b320fc46e91e3
MD5 6313386bb04f2568782d407d4536edda
BLAKE2b-256 45a74269f217744924633cb6624a2855c6fe9e8cfcca243d0d17a2eb41a76029

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp313-cp313-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp313-cp313-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 4be6217832b778d7d9a20391de2c96259cac5ca152844191464a0be9b2e9630c
MD5 503a8bb9f7cd86625dcdb7712466141b
BLAKE2b-256 5f3eea749505e1b32350158ebd3a4b8b3f565426c833ce52adffd4149e0c902d

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pymgclient-1.4.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymgclient-1.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ac6e1668dda80cc2eb8240df018652cd0ada4df625bec945ff5c3e4d3825720b
MD5 a9adbde1bdd22c7a083f56ee4aadb1e4
BLAKE2b-256 cbe61e979ea5ea832d14ef4836b8488979b8e69eb467b7b6b66ff5865d725f7c

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp312-cp312-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp312-cp312-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 8c8029a303c85a7f3df8b8bb96d5dbe8b4c2cfde269ff9fbe24ef56e70f893cf
MD5 7b0fa6e0023c6ba4be32c3853be1e4da
BLAKE2b-256 3a8cd490b4c20aa5d703a1a52634a38619bd8f371fd42baba2b96b4957e9f4f8

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 412b89cef3407dde81c4b9fb9fdcc8890ec1f58e008ced844ec02e7a0169ced8
MD5 f4f4a7759724bd25d524f4b7eed79aa6
BLAKE2b-256 6c9bc9c729950576d9aa14858908c9859a9a9f2ddc5136f9b34fd22a3de016e6

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9be349aad6c3ac2c1c790eb122d8e037752af844a4d2f1b70987c0caf83cf3de
MD5 2a02b7e126a21a496cd6ff81e775b652
BLAKE2b-256 e792a3a4cbdc19722e0cbc3a5d7246791d80c19201bafe653b6c9558f400978e

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp312-cp312-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp312-cp312-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 fe84ee4c16cc5b41b650dbd811641c1f9cc5ceada9ef2784a869db8f10d85514
MD5 48014fee8ca0a940644b1b915e1a2804
BLAKE2b-256 208bc85a87bc9d152f38756e9553659a01188d0b85b6e0a6661ffa2295792de5

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pymgclient-1.4.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymgclient-1.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6e6d5a726c046edcedc8339cb2a1a57a310765cb5ac9e7c168246c79aad27cd3
MD5 3bd5c96af847b3a33da68d7f69e68835
BLAKE2b-256 629a0fa276662c693c9ffabcb9f372aa364f6faa01be7c389bb214bc1858541d

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp311-cp311-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp311-cp311-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 d9697b42273b301a402068d7fc492c274bebed2dda6f97f8dcffdc4b1efd9a21
MD5 de488ea08b51bc4810c926519534c8d7
BLAKE2b-256 6c2292a900c1a4f0ea4fe852dd5fb4912ee8a0d10f48f0ee8faaab3459dc20bb

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d2f6733639be05d02d66ddfa93e7b4bdad7b9eb637efbb8cfad588ff28f41fd5
MD5 635a9e5d486779369b445804918fe1f6
BLAKE2b-256 ec745fa072f306e646a49c73d8a82b9a4d6c96742aabaac2e92e3139b9da1a8d

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0a9b4b650fa6690207a78d56e378ff758407b3434ff46889a734fb75a6bddbc7
MD5 2d6c2ea30cce406437b1e498dae7323d
BLAKE2b-256 0c7ddb3db64a3f81d2a9a66cd4b6991d13b0c28d4cebb6ea38d6026fdddabd5b

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp311-cp311-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 d5bd99551a4878753f0de5b1b279ec791ad6a1e052900177670262769acc7b0f
MD5 33b454360445c8014d45c7a88e11684c
BLAKE2b-256 d9df2513d5fc507cb742a696cbe153533ce25bbb998ca3dadf682252432185f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymgclient-1.4.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for pymgclient-1.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 49c22cab44b5b3d04f3d020f26e01729f06c1f8b30d9556952fbac0ede67189e
MD5 0c6908ceb0519179c32afc0301c33b57
BLAKE2b-256 713ac87608c003d01d63f5b88ceaae63e0ecf39aaf849a3adaf4b9915265ae96

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp310-cp310-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp310-cp310-manylinux_2_38_x86_64.manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 7943464f2aedb5153bf16f36016c86e96344fed072086e05117ebd91b19f1ec2
MD5 5460822fd96568e7cee543d2545f6df1
BLAKE2b-256 e2374bfe16d9974cf60744918ae11c9ba542d3adb3031e99a65b166a43e4c2b8

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 bb2c9eee6e6b00d9b224ddd56b60ff2911dd9c8995d2a8ee1e89ae25dcc7efd7
MD5 d1ae58e3e68d50dff64b89be9eadbbac
BLAKE2b-256 d4bd6140ecb465971c9112ca2553e0ebb9f8d7c3b25c8d8c7610c804faf9ca9e

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 900147e52564598d581600f3527910df53ae0fd27253adc9dc8f08ff403352a7
MD5 28a12a18406d72ac52f9f593e381d8ee
BLAKE2b-256 ad66487ab8075eb047dd915c1e796eefa4edb78488bb04c30a4c90d2dd8ccd37

See more details on using hashes here.

File details

Details for the file pymgclient-1.4.0-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pymgclient-1.4.0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 f0970c273ce8a9f08c72efd19e866844ff56f79d954efa1e1ba06f7fbf84e502
MD5 58ebf4fd17bddc959108597bb4e2918b
BLAKE2b-256 4f5d73b2a41527d0a7fb660af22baf0ef780f7591256a5b8b6ec1c2e0bff9d77

See more details on using hashes here.

Supported by

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