--- id: pymgclient version: "1.6.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # pymgclient — Memgraph database adapter for Python language License: permissive · Maintenance: active · Downloads: 138.6K/mo ## What it is and what it does pymgclient wraps the official Memgraph C client library to provide a Python interface compliant with PEP 249's DB-API 2.0 standard. It is implemented as a C extension for CPython and supports Python 3.9 and later. The adapter enables developers to connect to a Memgraph graph database, execute Cypher queries, and retrieve results using familiar database cursor patterns—making it suitable for applications that need to interact with graph data stored in Memgraph. The package depends on pyopenssl for secure connections, networkx for graph operations, and tzdata for timezone handling. It is actively maintained with recent releases and no known security vulnerabilities. The C extension approach means installation requires compilation on some platforms, though prebuilt wheels are provided for common architectures across multiple Python versions. Use it for: - Build Python applications that query and manipulate graph data stored in Memgraph using standard DB-API patterns. - Integrate Memgraph as a backend for knowledge graphs, recommendation engines, or relationship-heavy data models in Python services. - Develop ETL pipelines that read from or write to Memgraph using familiar cursor-based transaction semantics. - Create graph analytics workflows where Python code needs to execute Cypher queries and process node/edge results. - Prototype or deploy graph-based applications without learning a custom client API, leveraging DB-API 2.0 familiarity. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pymgclient is a Python adapter for Memgraph graph database, implementing the DB-API 2.0 specification to enable query execution and result fetching through a standard cursor interface. Yes, if you are building a Python application against Memgraph and want a standards-compliant DB-API 2.0 interface. The package is actively maintained, has no known vulnerabilities, and provides prebuilt wheels for common platforms. Install friction is moderate due to C extension compilation, but wheels mitigate this for standard architectures. Suitable for production use with a running Memgraph instance. ## Install pip install pymgclient uv add pymgclient poetry add pymgclient ## Installing pymgclient Before you install: Medium install friction due to C extension compilation; prebuilt wheels available for Python 3.10, 3.11, 3.12, 3.13 on macOS (arm64), Linux (x86_64, aarch64), and Windows. Maintenance is active with recent releases and no known vulnerabilities. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects. Quickstart: pip install pymgclient import pymgclient conn = pymgclient.connect(host='127.0.0.1', port=7687) cursor = conn.cursor() cursor.execute('CREATE (n:Person {name: "John"}) RETURN n') row = cursor.fetchone() conn.commit() Requires a running Memgraph database instance; C extension requires CPython (not PyPy or other implementations). Verify before relying: - Performance characteristics and query latency compared to direct client library use - Thread-safety guarantees and concurrent connection handling behavior - Support for Memgraph-specific query features beyond standard DB-API 2.0 ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 138.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags memgraph python client, graph database adapter, db-api 2.0 database driver, memgraph query execution, python graph database connector, graph-database, db-api-2.0, c-extension [View on SkillFed](https://skillfed.io/packages/pymgclient) · [View on PyPI](https://pypi.org/project/pymgclient/)