pydgraph
Official Dgraph client implementation for Python
Decision gist · record as of 2026-08-14
Yes, if you are building an application that uses Dgraph as its database backend. The package is actively maintained, has low install friction, carries a permissive license, and provides comprehensive client functionality. Install only if you have a Dgraph cluster available and your use case aligns with graph database patterns; it is not useful as a standalone library.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running Dgraph server instance; Python >= 3.9 required.
- Low install friction with only two runtime dependencies (grpcio and protobuf).
- Actively maintained with a recent release; supports Python 3.9 through 3.14.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-02-25 (170 days) · last repo commit 2026-06-23 · 289 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 112,682 downloads/mo, #12,361 on PyPI
Alternatives
Verify before relying
pip install pydgraph
import pydgraph
client_stub = pydgraph.DgraphClientStub('localhost:9080')
client = pydgraph.DgraphClient(client_stub)
# Execute queries, mutations, and transactions via client methods- Performance characteristics and throughput limits for typical workloads
- Async/await support maturity and real-world usage patterns
- Retry and conflict-handling behavior under high contention
What it is and what it does
pydgraph is the official Python client library for Dgraph, a distributed graph database. It uses gRPC to communicate with Dgraph servers and provides a high-level API for querying, mutating, and managing graph data. The client handles transactions, authentication (including ACL and namespace support), and connection management, with support for both synchronous and asynchronous operations.
The library is designed for developers building applications that need to store and query graph-structured data. It abstracts away gRPC protocol details and provides Pythonic interfaces for common operations like running queries, executing mutations, performing upserts, and managing transactions with automatic retry logic for conflict resolution. The client supports multiple Dgraph server connections for load distribution and offers flexible connection configuration through connection strings or explicit stub initialization.
Use it for
- Build applications that query and mutate graph-structured data in a Dgraph cluster
- Implement transaction-based workflows with automatic conflict retry and rollback handling
- Connect to ACL-enabled Dgraph clusters with namespace isolation and token-based authentication
- Manage schema definitions and database alterations programmatically
- Distribute workload across multiple Dgraph servers in a cluster
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building an application that uses Dgraph as its database backend.
The package is actively maintained, has low install friction, carries a permissive license, and provides comprehensive client functionality. Install only if you have a Dgraph cluster available and your use case aligns with graph database patterns; it is not useful as a standalone library.
Install
pydgraph on PyPI
Before you install
Low install friction with only two runtime dependencies (grpcio and protobuf). Actively maintained with a recent release; supports Python 3.9 through 3.14. Protobuf version flexibility (4.23.0 through 6.x) accommodates both modern and legacy environments.
Requires a running Dgraph server instance; Python >= 3.9 required.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install pydgraph
import pydgraph
client_stub = pydgraph.DgraphClientStub('localhost:9080')
client = pydgraph.DgraphClient(client_stub)
# Execute queries, mutations, and transactions via client methods
Verify before relying
- Performance characteristics and throughput limits for typical workloads
- Async/await support maturity and real-world usage patterns
- Retry and conflict-handling behavior under high contention
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesgrpcioprotobuf |
| Maintenance | Actively maintained 170 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 112,682 / month, #12,361 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: DatabaseTopic :: Software Development |
Evidence: pydgraph-25.2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “dgraph python client”
- pydgraphOfficial Python client for Dgraph, a distributed graph database,…
- codewords-clientA Python client library for the Codewords API with built-in FastAPI…
- openapi-python-clientGenerates type-annotated Python HTTP clients from OpenAPI 3.0 and 3.1…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also python-graphql-client · gql · graphqlclient · graphene-file-upload · ydb · graphql-relay · graphene-pydantic · django-graphql-jwt · PyGreSQL · grpc-requests