Skip to main content

Nuclia Python Client

In order to install

pip install nuclia

Authentication

Nuclia

You can login with your Nuclia user How to sign-up via

nuclia auth login

Nuclia Knowledgebox

You can login to a specific knowledgebox if you have a Service Token (How to get a Service Token) or your NucliaDB is deployed on-premise

nuclia auth kb --url KB_URL --token SERVICE_TOKEN

KB_URL its the url of the Knowledge Box. On the cloud service you can retrieve it on the dashboard. On the on-premise/community deployment its the url mapped to it.

Nuclia Understanding API

You can login with a Nuclia Understanding API key to process files, predict and train using our system

nuclia auth nua --key ZZZZ

Guardrails

Account guardrail policies can be managed with the synchronous or asynchronous SDK:

from nuclia_models.accounts.guardrails import CreateGuardrailPolicy
from nuclia.sdk import NucliaGuardrails

guardrails = NucliaGuardrails()
policy = guardrails.create(
    CreateGuardrailPolicy(
        name="Safety policy",
        instruction="Flag requests that ask for dangerous instructions.",
        query="Does the request violate the safety policy?",
        enabled=True,
        blocking=True,
    ),
    zone="europe-1",
)

Enabled account policies are evaluated automatically for Predict chat requests. Content can also be evaluated directly against a configured or inline policy:

from nuclia_models.predict.guardrails import GuardrailRequest
from nuclia.sdk import NucliaPredict

result = NucliaPredict().guardrail(
    GuardrailRequest(
        content="Content to evaluate",
        policy_id=str(policy.id),
    )
)

Policy violations always block chat generation. The blocking setting controls failure handling: evaluation failures fail closed when enabled and fail open when disabled.

Documentation

You can find the documentation here

For internal use

Find more information on the internal CI setup here

Metadata

Release files for nuclia 4.15.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nuclia 4.15.1
File Size Uploaded Provenance Actions
nuclia-4.15.1.tar.gz 372.1 kB With provenance Details for nuclia-4.15.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nuclia 4.15.1
File Interpreter ABI Platform Actions
nuclia-4.15.1-py3-none-any.whl Python 3 none any Details for nuclia-4.15.1-py3-none-any.whl

Total release size: 535.5 kB

Release files / nuclia-4.15.1.tar.gz

Download URL nuclia-4.15.1.tar.gz
Size 372.1 kB
Tags Source
SHA-256 checksum
How to use checksums
896dad6eb3b29bbb447ca281a232e080162bebbf81997b7b407f40dc96cdae87
BLAKE2b-256 checksum
How to use checksums
11a34a436c4fdc49e4d98bc4c16e8a88c30bc0002e822ca3fbfd316b9cee37c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / nuclia-4.15.1-py3-none-any.whl

Download URL nuclia-4.15.1-py3-none-any.whl
Size 163.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03dba862deb6af7e30564034bcdf7d9d6cf41825dbd72cb4de123c8b8f90ae11
BLAKE2b-256 checksum
How to use checksums
0b5215902dd2e68e7b2c19545717760f1d5933cefaf1258964566e3a28683859
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for nuclia 4.15.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nuclia-4.15.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.15.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page