Metadata-Version: 2.4
Name: traverse-http
Version: 0.6.7
Summary: Official Python HTTP client for Traverse — Truespar's in-memory graph database. Cypher queries, schema introspection, CSV import, database management.
Project-URL: Homepage, https://truespar.com/traverse/docs
Project-URL: Documentation, https://truespar.com/traverse/docs
Author: Truespar
License-Expression: MIT
License-File: LICENSE
Keywords: cypher,database,graph,graph-database,traverse,truespar
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database :: Front-Ends
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: requests>=2.28
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# traverse-http

Official Python HTTP client for [Traverse](https://truespar.com/traverse/docs) — Truespar's in-memory graph database.

- Execute Cypher queries with parameterized values
- Database management (create, drop, rename, load, unload)
- Schema introspection (labels, types, properties, indexes, constraints)
- CSV and Cypher import with async task polling
- File management (upload, download, delete `.tvdb` files)
- User and alias management
- Typed response models with dataclass return types
- Python 3.10+, MIT licensed

## Installation

```bash
pip install traverse-http
```

## Quick Start

```python
from traverse_http import TraverseHttpClient

client = TraverseHttpClient("http://localhost:7691", api_key="tvs_your_key")

# Execute a query
result = client.query("MATCH (n:Person) RETURN n.name, n.age LIMIT 10")
for row in result.rows:
    print(row)

# List databases
databases = client.list_databases()
for db in databases:
    print(f"{db.name}: {db.node_count} nodes, {db.edge_count} edges")

# Get schema
schema = client.schema()
print(schema.labels)
```

## Database Management

```python
client.create_database("mydb")
client.rename_database("mydb", "production")
client.drop_database("production")  # requires --allow-drop-database on server
```

## CSV Import

```python
result = client.import_csv(
    file_path="people.csv",
    label="Person",
    database="mydb",
)
print(f"Imported {result.nodes_created} nodes")
```

## Documentation

- [Traverse documentation](https://truespar.com/traverse/docs)
- [Python SDK reference](https://truespar.com/traverse/docs/v1/python-sdk)

## License

MIT — see [LICENSE](LICENSE).
