Metadata-Version: 2.4
Name: vital-graph
Version: 0.0.15
Summary: VitalGraph
Author-email: Marc Hadfield <marc@vital.ai>
License: Apache License 2.0
Project-URL: Homepage, https://github.com/vital-ai/vital-graph
Project-URL: Repository, https://github.com/vital-ai/vital-graph
Project-URL: Documentation, https://github.com/vital-ai/vital-graph/docs
Project-URL: Bug Tracker, https://github.com/vital-ai/vital-graph/issues
Keywords: knowledge-graph,rdf,sparql,database,semantic-web
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: vital-ai-vitalsigns>=0.1.47
Requires-Dist: vital-ai-haley-kg>=0.1.24
Requires-Dist: python-dotenv
Requires-Dist: rdflib>=7.0.0
Requires-Dist: PyLD>=2.0.0
Requires-Dist: six>=1.7.0
Requires-Dist: pyoxigraph>=0.4.11
Requires-Dist: openai>=1.0.0
Requires-Dist: minio>=7.0.0
Provides-Extra: client
Requires-Dist: httpx>=0.27.0; extra == "client"
Requires-Dist: aiohttp>=3.9.0; extra == "client"
Requires-Dist: pydantic>=2.0.0; extra == "client"
Requires-Dist: PyYAML>=6.0; extra == "client"
Requires-Dist: tabulate>=0.9.0; extra == "client"
Requires-Dist: click-repl>=0.3.0; extra == "client"
Requires-Dist: aiofiles>=23.0.0; extra == "client"
Provides-Extra: server
Requires-Dist: fastapi[models,standard]>=0.104.0; extra == "server"
Requires-Dist: uvicorn; extra == "server"
Requires-Dist: SQLAlchemy[asyncio]>=2.0.23; extra == "server"
Requires-Dist: psycopg[binary,pool]>=3.1.13; extra == "server"
Requires-Dist: asyncpg>=0.29.0; extra == "server"
Requires-Dist: alembic>=1.12.0; extra == "server"
Requires-Dist: pgvector>=0.2.4; extra == "server"
Requires-Dist: aiofiles>=23.0.0; extra == "server"
Requires-Dist: Jinja2>=3.1.0; extra == "server"
Requires-Dist: starlette>=0.27.0; extra == "server"
Requires-Dist: itsdangerous>=2.1.0; extra == "server"
Requires-Dist: PyJWT>=2.8.0; extra == "server"
Requires-Dist: email-validator>=2.0.0; extra == "server"
Requires-Dist: click-repl>=0.3.0; extra == "server"
Requires-Dist: tabulate>=0.9.0; extra == "server"
Requires-Dist: pytidb[models]; extra == "server"
Requires-Dist: pytidb; extra == "server"
Requires-Dist: weaviate-client>=4.19.2; extra == "server"
Requires-Dist: datasketch>=1.6.0; extra == "server"
Requires-Dist: rapidfuzz>=3.0.0; extra == "server"
Requires-Dist: jellyfish>=1.0.0; extra == "server"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Requires-Dist: torch>=2.0.0; extra == "dev"
Requires-Dist: transformers>=4.30.0; extra == "dev"
Requires-Dist: nltk>=3.8.0; extra == "dev"
Requires-Dist: numpy>=1.24.0; extra == "dev"
Requires-Dist: sentencepiece>=0.1.99; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == "docs"
Requires-Dist: myst-parser>=2.0.0; extra == "docs"
Provides-Extra: all
Requires-Dist: vital-graph[client,dev,docs,server,test]; extra == "all"
Dynamic: license-file

# 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:

```bash
pip install vital-graph[client]
```

This installs dependencies for the VitalGraph client library:
- Basic RDF processing (rdflib, PyLD)
- Advanced graph processing (pyoxigraph) - now included by default
- AI capabilities (openai) - now included by default
- HTTP client (requests)
- Configuration management (PyYAML, pydantic)
- CLI tools (click-repl, tabulate)

### Server Installation

For running a complete VitalGraph server with database capabilities:

```bash
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)
- TiDB integration (pytidb[models], pytidb)

### Development Setup

For development with all tools:

```bash
pip install vital-graph[dev]
```

Includes pytest, black, mypy, and other development tools.

### Full Installation

For everything:

```bash
pip install vital-graph[all]
```

### Custom Combinations

You can combine multiple extras:

```bash
pip install vital-graph[client,dev]
pip install vital-graph[server,test,docs]
```

## Quick Start

### Client Usage

```python
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

```bash
# Start VitalGraph server
vitalgraphdb

# Or with custom config
vitalgraphdb --config /path/to/vitalgraphdb-config.yaml
```

## 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.server`): FastAPI-based graph database server
- **Database Layer** (`vitalgraph.db`): PostgreSQL integration with SPARQL translation
- **Admin Tools** (`vitalgraphadmin`): Database administration utilities

## Documentation

- [Installation Guide](docs/installation.md)
- [Client API Reference](docs/client-api.md)
- [Server Configuration](docs/server-config.md)
- [SPARQL Examples](docs/sparql-examples.md)

## License

Apache License 2.0
