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

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.1.tar.gz (62.9 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.1-py3-none-any.whl (60.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neurograph_core-2.0.1.tar.gz
  • Upload date:
  • Size: 62.9 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.1.tar.gz
Algorithm Hash digest
SHA256 7f618c5ba565f59dfba446511e7d7ab3040cb638519ef903c29e6aac8c18ca26
MD5 1b4407bb53c2b58a28c4fa77b8a00d79
BLAKE2b-256 1f46a6df28e008519b0196401f0d3ce597c3e3b7fd58355147add2dc22b4fbeb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neurograph_core-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 60.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df51746699233502aaf4066a3b8cb1423732a2b59e205c3954c1dba1e86fab5d
MD5 c02e54429f9a3884e9e477911b43148c
BLAKE2b-256 3f05abb6cffcfb5dd910a6da6282615ff3e949883d2c05519e65eb4266bdc0ee

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