traverse-http
Python client for the HTTP API of a Traverse server:
queries in openCypher or GQL, database and file management, aliases, schema, CSV and Cypher
import, and users. Python 3.10+, one dependency (requests).
To run Traverse inside your own process instead, use traverse-embedded.
Installation
pip install traverse-http
Quick start
The server prints its API key at startup (API key tvs_...), or takes one from
TRAVERSE_API_KEY.
from traverse_http import TraverseHttpClient
client = TraverseHttpClient("http://localhost:7691", api_key="tvs_your_key")
client.query("CREATE (:Person {name: 'Alice', age: 34}), (:Person {name: 'Bob', age: 28})")
result = client.query(
"MATCH (p:Person) WHERE p.age > $age RETURN p.name AS name ORDER BY name",
parameters={"age": 30},
)
print(result.columns, result.rows) # ['name'] [['Alice']]
# ISO/IEC 39075 GQL instead of openCypher
result = client.query("MATCH (p:Person) FILTER p.age > 30 RETURN p.name AS name", dialect="gql")
for db in client.list_databases():
print(db.name, db.aliases)
schema = client.get_schema()
print(schema.labels, schema.relationship_types)
Each call takes an optional database= to target a database other than the default one.
Databases, files and aliases
client.create_database("staging")
client.rename_database("staging", "registry")
client.drop_database("registry") # unless the server runs with TRAVERSE_ALLOW_DROP_DATABASE=false
# upload a .tvdb file built offline (for example with traverse-embedded), load it and point an
# alias at it; queries against the alias move to the new data in one step
with open("registry_v2.tvdb", "rb") as f:
client.upload_file("registry_v2", f.read())
client.load_database("registry_v2", "registry_v2.tvdb")
client.create_alias("registry", "registry_v2") # later: client.alter_alias("registry", "registry_v3")
CSV import
from traverse_http import ColumnMapping, EdgeEndpoint
people = "id,name,age\n1,Alice,34\n2,Bob,28\n"
result = client.import_csv(
people,
"Person",
[ColumnMapping("id", type="integer"), ColumnMapping("name"), ColumnMapping("age", type="integer")],
)
print(result.nodes_created) # 2
knows = "from,to,since\n1,2,2019\n"
result = client.import_csv_edges(
knows,
"KNOWS",
source=EdgeEndpoint(label="Person", column="from", property="id"),
target=EdgeEndpoint(label="Person", column="to", property="id"),
columns=[ColumnMapping("since", type="integer")],
)
print(result.edges_created) # 1
Column types are string (the default), integer, float and boolean; property= stores a
column under another name.
Errors
A failed request raises TraverseHttpException, with the HTTP status in status_code.
License
Copyright 2026 The Intelligence Company AB (publ). Licensed under MIT or Apache-2.0, at your option.
Metadata
Release files for traverse-http 0.9.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| traverse_http-0.9.2.tar.gz | 23.2 kB | Without provenance | Details for traverse_http-0.9.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| traverse_http-0.9.2-py3-none-any.whl | Python 3 | none | any | Details for traverse_http-0.9.2-py3-none-any.whl |
Total release size: 36.9 kB
Release files / traverse_http-0.9.2.tar.gz
| Download URL | traverse_http-0.9.2.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aaf8fe17b9aaab4449e96548e5ca1eb725642f25d5106311d554712a6f337177
|
|
BLAKE2b-256 checksum How to use checksums |
17583b42298863f14c69320c16f91a62e7c55d6442ee1cf92489026bc7d99859
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / traverse_http-0.9.2-py3-none-any.whl
| Download URL | traverse_http-0.9.2-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9bd0fb138a881c30b45edd642843a4e8c7273cc88676f0296d80d9de85d6c5f
|
|
BLAKE2b-256 checksum How to use checksums |
e9f5adbc1728ee46eb6db2c66d726e6b3e3a3b62e118ff96692d750f29d3c23a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for traverse-http 0.9.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.