Metadata-Version: 2.4
Name: neurograph-core
Version: 2.0.0
Summary: Virtuous-backed Python SDK for Neurograph Core
Author: Neurograph Development Team
License-Expression: LicenseRef-Neurograph-Proprietary
Project-URL: Repository, https://github.com/NeuroGraph-AI/core/
Keywords: Neurograph,Virtuous,SDK,API client
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7.2.1; extra == "dev"

# Neurograph Core Python SDK

`neurograph-core` v2 is the Virtuous-backed Python SDK for Neurograph Core.

This is a breaking major release from the legacy OpenAPI Generator SDK. The old
`neurograph.v1` package layout is not preserved; use `neurograph_core` imports.

## Install

```bash
pip install neurograph-core
```

## Usage

Python SDK callers should use a Core service token. Pass it as `token_auth`;
the generated client sends it as `Authorization: Bearer <service token>`.

```python
from neurograph_core import NEUROGRAPH_CORE_PROD_URL, create_client

client = create_client(
    base_url=NEUROGRAPH_CORE_PROD_URL,
    token_auth="<service token>",
)

resp = client.api_v1_clients_get(limit=100_000, offset=0)
for item in resp.data:
    print(item.id, item.name)
```

The SDK also exports `NEUROGRAPH_CORE_STAGING_URL` for staging callers. For
deployed services, prefer passing the selected URL from environment config:

```python
import os

from neurograph_core import create_client

client = create_client(
    base_url=os.environ["NEUROGRAPH_CORE_URL"],
    token_auth=os.environ["NEUROGRAPH_CORE_TOKEN"],
)
```

Use `api_key_auth` only for Firebase ID-token admin/browser contexts. Service
integrations should prefer `token_auth`.

Request and response dataclasses are exported from the package root:

```python
from neurograph_core import PersonaInstanceCreateRequest

request = PersonaInstanceCreateRequest(
    name="Example",
    persona_seed_id="seed_123",
    tag="test",
    personality_img_url="",
    personality_video_url="",
    metadata="{}",
    age=0,
    female=0,
    male=0,
    income="",
    value="",
    description="",
    summary_detail="",
    summary_headline="",
    positioning_statement="",
    personality_background="",
    personality_first_name="",
    personality_last_name="",
    personality_quote="",
    personality_gender="",
)

created = client.api_v1_persona_instance_post(body=request)
```

## Migration Notes

Legacy v1 usage:

```python
from neurograph.v1.configuration import Configuration
from neurograph.v1.api_client import ApiClient
import neurograph.v1.api as ng
```

New v2 usage:

```python
from neurograph_core import create_client

client = create_client(base_url=core_url, token_auth=core_key)
resp = client.api_v1_clients_get(limit=100_000, offset=0)
```
