Skip to main content

Virtuous-backed Python SDK for Neurograph Core

Project description

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

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>.

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:

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:

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:

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

New v2 usage:

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)

Project details


Release history Release notifications | RSS feed

This version

2.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neurograph_core-2.0.0.tar.gz (55.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neurograph_core-2.0.0-py3-none-any.whl (52.9 kB view details)

Uploaded Python 3

File details

Details for the file neurograph_core-2.0.0.tar.gz.

File metadata

  • Download URL: neurograph_core-2.0.0.tar.gz
  • Upload date:
  • Size: 55.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for neurograph_core-2.0.0.tar.gz
Algorithm Hash digest
SHA256 3a9817063d2cfc60229adafc677de92efcdd9136acd113c972a4de1e3fdce949
MD5 e12127df5eb0c21dcc873f31acc31620
BLAKE2b-256 3cfd2d40e7bcd1f862ba1ef05822671498214fe7bd86eba80ce61cecee02b992

See more details on using hashes here.

File details

Details for the file neurograph_core-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: neurograph_core-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 52.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for neurograph_core-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a139a9dc09d0f7f5316e26fa37bbe52c6f542abbc182b8c6923940db0af6ec2d
MD5 281dc095a2765596a7aee7b826eeaf9b
BLAKE2b-256 221339ce3c388b25da3eab0c1235ddb78c8789c98ea6cc6453ba7dd0ed9af078

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page