Skip to main content
NexusConfig is a frozen dataclass holding every value required to construct a client. Pass it to NexusClient.create() or AsyncNexusClient.create() (both accept the same instance).

Field reference

API key types

Calling get_secret(...) with a public key raises NexusPublicKeyError synchronously, before the network call.

Where to keep the API key

Anywhere your existing config pipeline puts secrets - environment variables, AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault, or a local .env file in dev. The SDK never logs the raw key.
For Pydantic / pydantic-settings users:

Choosing the TTL

The TTL is a tradeoff between staleness window and redundant network traffic. With SSE enabled (default), changes propagate in milliseconds regardless of the TTL - the TTL only matters as a safety net if the stream falls back.

Disabling SSE

Useful in environments where outbound long-lived connections are blocked (some serverless platforms, certain corporate proxies).