--- id: gremlinpython version: "3.8.1" license: Apache 2 license_treatment: permissive maintenance: active --- # gremlinpython — Gremlin-Python for Apache TinkerPop License: permissive · Maintenance: active · Downloads: 17.9M/mo ## 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 above — 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 pip install gremlinpython uv add gremlinpython 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_current - Install friction: low - Maintenance: active - Downloads: 17.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags graph database query language, gremlin traversal python client, tinkerpop graph queries, property graph traversal, remote graph database connection, graph query dsl python, gremlin server client, graph-database, query-language, remote-client [View on SkillFed](https://skillfed.io/packages/gremlinpython) · [View on PyPI](https://pypi.org/project/gremlinpython/)