Metadata-Version: 2.4
Name: gia-sdk
Version: 0.1.0
Summary: Python SDK and CLI for Gia Cloud
Author: Gia
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://gia.cloud
Project-URL: Documentation, https://github.com/usegia/gia-core/tree/main/docs
Project-URL: Source, https://github.com/usegia/gia-core
Keywords: semantic-search,graph-database,search,sdk,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: boto3>=1.34.0
Requires-Dist: fastapi>=0.115.0
Requires-Dist: gia-evidence-finder>=0.1.0
Requires-Dist: psycopg[binary]>=3.2.0
Requires-Dist: pyjwt[crypto]>=2.10.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: uvicorn[standard]>=0.30.0
Provides-Extra: claim-ml
Requires-Dist: safetensors>=0.6.0; extra == "claim-ml"
Requires-Dist: sentencepiece>=0.2.0; extra == "claim-ml"
Requires-Dist: torch<3.0,>=2.9.0; extra == "claim-ml"
Requires-Dist: transformers[sentencepiece]<5.0,>=4.57.0; extra == "claim-ml"
Dynamic: license-file

# Gia SDK

Gia is a trainable semantic graph database. The `gia-sdk` Python distribution
installs both the public Python SDK and the `gia` command-line interface used
to create, apply, query, benchmark, and inspect Gia-backed application
projects.

```sh
pip install gia-sdk
gia --help
```

Application code imports the SDK from the `gia` package:

```python
from gia import Gia

gia = Gia.from_env()
response = gia.query_response(
    "billing invoice webhook retry ticket",
    target="ticket",
    schema_name="project_management",
    schema_version="v2",
    profile="linear_ticket_search",
    profile_version="v1",
    persist_trace=True,
)
print(response.results)
print(response.trace_id)
```

The CLI uses public uppercase environment variables in application projects:

```sh
GIA_API_URL=https://api.gia.cloud
GIA_API_KEY=gia_development_or_production_environment_key
GIA_TIMEOUT_SECONDS=30
```

For the cloud-first project workflow, sign in, create or link a project, apply
the manifest, create an app dotenv, and then use the same dotenv from both CLI
and SDK code:

```sh
gia login
gia project create . --template project-management --name "Project Management" --dotenv .env.local

set -a
. ./.env.local
set +a

gia query "billing invoice webhook retry ticket" \
  --target ticket \
  --schema-name project_management \
  --schema-version v2 \
  --profile linear_ticket_search \
  --profile-version v1 \
  --persist-trace
```

More complete operational guidance lives in
[`docs/guides/gia-bootstrap.md`](docs/guides/gia-bootstrap.md).
