skillfed

gremlinpython

Gremlin-Python for Apache TinkerPop

gremlinpython v3.8.1 17.9M downloads/30d#1,099 on PyPI
Permissive license Apache 2 Active released

What it is and what it does

Gremlin-Python is the official Python binding for Apache TinkerPop's Gremlin graph traversal language. It allows you to express complex queries on property graphs using a functional, chainable syntax that mirrors Gremlin's Java and Groovy variants. The package connects to remote TinkerPop-enabled servers over WebSocket and executes traversals server-side, returning results back to your Python code.

The package relies on five async-focused runtime dependencies (nest_asyncio, aiohttp, aenum, isodate, async-timeout) to handle non-blocking I/O and protocol handling. It's designed for developers familiar with Gremlin who want to work in Python without learning a new query syntax, and it maintains close parity with the reference Gremlin documentation despite being Python-specific.

Use it for:

  • Query a remote property graph to find all vertices connected to a given node and extract their properties.
  • Build graph traversals to analyze relationships in a social network or knowledge graph stored on a server.
  • Programmatically create, update, and delete vertices and edges in a remote graph database using Gremlin syntax.
  • Integrate graph queries into a Python application that connects to remote graph database providers.
  • Write complex multi-step graph algorithms using Gremlin's functional composition model.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Gremlin-Python is a Python client for Apache TinkerPop that lets you write graph traversals to query and manipulate property graphs on remote TinkerPop-enabled servers using a functional, chainable syntax.

Yes, if you need to query or manipulate a remote property graph and want to use Gremlin's expressive traversal language in Python. The package is actively maintained, has low install friction, carries a permissive license, and ranks in the top 5000 PyPI packages. Install it only if you have a TinkerPop-enabled server to connect to; it is not useful standalone.

Install

gremlinpython on PyPI

pip

pip install gremlinpython

uv

uv add gremlinpython

poetry

poetry add gremlinpython

Installing gremlinpython

Before you install

Low install friction; pure Python wheel with five async-focused runtime dependencies. Actively maintained as of 129 days ago. Requires Python 3.10 or later.

License in practice

Apache 2 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

from gremlin_python.process.anonymous_traversal import traversal
from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection

g = traversal().with_remote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
result = g.V().both()[1:3].to_list()

Requires a running TinkerPop-enabled graph server accessible via WebSocket at the specified endpoint.

Verify before relying

  • Whether async/await patterns are natively supported or only via nest_asyncio wrapper
  • Performance characteristics and latency overhead for large result sets
  • Compatibility with specific graph database backends beyond Gremlin Server

Package facts

License Apache 2 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — nest_asyncio, aiohttp, aenum, isodate, async-timeout
Maintenance actively maintained — 129 days since the last release
First released
Downloads 17,877,594/month — #1,099 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: gremlinpython-3.8.1-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3

Tags

graph database query languagegremlin traversal python clienttinkerpop graph queriesproperty graph traversalremote graph database connectiongraph query dsl pythongremlin server client
graph-databasequery-languageremote-client

More Database packages

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

redis

Python client library for connecting to and…

permissive · top 1,000 on PyPI

ydb

YDB Python SDK is the official client library…

permissive · top 1,000 on PyPI

snowflake-connector-python

Connects Python applications to Snowflake data…

permissive · top 1,000 on PyPI

sqlparse

sqlparse tokenizes SQL text into a tree of…

permissive · top 1,000 on PyPI

dbt-adapters

Provides base adapter protocols and shared…

permissive · top 1,000 on PyPI

apache-airflow-providers-apache-tinkerpop

Integrates Apache TinkerPop graph computing and…

permissive · top 15,000 on PyPI

apache-airflow-task-sdk

Provides Python interfaces and task execution…

permissive · top 5,000 on PyPI

pyone

Provides Python bindings to the OpenNebula…

permissive · top 15,000 on PyPI

apache-airflow-providers-apache-kylin

Integrates Apache Kylin OLAP analytics with…

permissive · top 15,000 on PyPI

pyiceberg-core

Provides a Rust-powered core implementation for…

permissive · top 5,000 on PyPI

apache-airflow-providers-cohere

Integrates Cohere's language model APIs into…

permissive · top 15,000 on PyPI

snowflake-cli-labs

This package has been renamed and is now a…

permissive · top 15,000 on PyPI

apache-airflow-providers-common-compat

Provides compatibility code and utilities for…

permissive · top 5,000 on PyPI

apache-airflow-providers-grpc

Integrates gRPC communication into Apache…

permissive · top 15,000 on PyPI

pyiceberg

PyIceberg provides programmatic access to…

permissive · top 1,000 on PyPI