VitalGraph
VitalGraph is a high-performance knowledge graph database and client library built on PostgreSQL with full SPARQL 1.1 support.
Installation
VitalGraph offers flexible installation options depending on your use case:
Client Only (Default - Lightweight)
For applications that only need to connect to existing VitalGraph servers:
pip install vital-graph[client]
This installs dependencies for the VitalGraph client library:
- Basic RDF processing (rdflib, PyLD)
- Advanced graph processing (pyoxigraph)
- AI capabilities (openai)
- HTTP client (httpx, aiohttp)
- Configuration management (PyYAML, pydantic)
- CLI tools (click-repl, tabulate)
Server Installation
For running a complete VitalGraph server with database capabilities:
pip install vital-graph[server]
This includes all server dependencies:
- FastAPI web framework and uvicorn server
- PostgreSQL drivers (psycopg, asyncpg)
- Database ORM (SQLAlchemy, alembic)
- Vector database support (pgvector)
- Authentication (PyJWT, email-validator)
- ML/vectorization (torch, transformers, sentencepiece)
- Fuzzy search (rapidfuzz, jellyfish, datasketch)
Development Setup
For development with all tools:
pip install vital-graph[dev]
Includes pytest, black, mypy, and other development tools.
Full Installation
For everything:
pip install vital-graph[all]
Custom Combinations
You can combine multiple extras:
pip install vital-graph[client,dev]
pip install vital-graph[server,test,docs]
Quick Start
Client Usage
from vitalgraph.client import VitalGraphClient
# Initialize client with config file
client = VitalGraphClient("path/to/config.yaml")
# Connect to server
await client.open()
# Execute SPARQL queries
results = await client.sparql.query("SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 10")
# Close connection
await client.close()
Server Usage
# Start VitalGraph server
vitalgraphdb
# Or with custom config
vitalgraphdb --config /path/to/vitalgraphdb-config.yaml
Data Import/Export
# Import RDF data (N-Triples, N-Quads, Turtle, JSONL, VitalSigns Block)
vitalgraphimport -s my_space -f data.nt
vitalgraphimport -s my_space -f entities.vital --format vital
# Export RDF data
vitalgraphexport -s my_space -f backup.nq
vitalgraphexport -s my_space -f entities.vital --format vital --entity-type-uri urn:PersonEntity
# See all options
vitalgraphimport --help
vitalgraphexport --help
Import/export is also available via the REST API (/api/data/import, /api/data/export) and the frontend Data Management page.
Features
- Full SPARQL 1.1 Support: SELECT, CONSTRUCT, ASK, DESCRIBE, UPDATE operations
- High Performance: PostgreSQL-backed with optimized query translation
- RESTful API: Complete REST API for all operations
- Client Library: Python client with authentication and session management
- Docker Support: Ready-to-use Docker containers
- Knowledge Graph Types: Built-in support for VitalSigns ontologies
- Real-time Updates: WebSocket support for live data updates
Architecture
VitalGraph consists of:
- Client Library (
vitalgraph.client): Lightweight REST API client - Server (
vitalgraph.api): FastAPI-based graph database server - SPARQL-to-SQL Engine (
vitalgraph.db.sparql_sql): Translates SPARQL 1.1 to PostgreSQL - Jena Sidecar (
vitalgraph-jena-sidecar): Java service for SPARQL algebra compilation - React Admin UI (
frontend): Web interface for space/graph/entity management - Admin Tools (
vitalgraphadmin): Database administration utilities - Import/Export CLIs (
vitalgraphimport,vitalgraphexport): Standalone data import/export tools - TypeScript Client (
vitalgraph-client-ts): TypeScript/JS client SDK
Documentation
License
Apache License 2.0
Metadata
Release files for vital-graph 0.0.41
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vital_graph-0.0.41.tar.gz | 8.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vital_graph-0.0.41-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.6 MB
Release files / vital_graph-0.0.41.tar.gz
| Download URL | vital_graph-0.0.41.tar.gz |
|---|---|
| Size | 8.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea7617ad4bc81be845e58ee76f75132f82e7b218c67b1dda68e94e7287103777
|
|
BLAKE2b-256 checksum How to use checksums |
93cad082e68c5604302aa82c1cd84fa53456f4720dda75263ea0b7b77807090f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / vital_graph-0.0.41-py3-none-any.whl
| Download URL | vital_graph-0.0.41-py3-none-any.whl |
|---|---|
| Size | 8.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea3960845318072c57ca499a505dfd2f0f81fc972a44aa7ce4d50c7f0e7ebe9a
|
|
BLAKE2b-256 checksum How to use checksums |
bc7fb2b2a9530472bc62f1970dd0a03f1c65290520f368b12528d52031fb7164
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|