Skip to main content

nebius-serverless

PyPI Python Docs License

Unofficial Python client for Nebius Serverless AI Jobs and Endpoints. Describe a container workload in Python or YAML, create it on a Nebius GPU or CPU, and wait for it from a script, a notebook, or CI.

Unofficial package. Not an official Nebius product, and Nebius does not support it. For the official Python SDK, see github.com/nebius/pysdk. Report problems in this project's GitHub issues.

Beta. 0.x releases may change the API.

Install

pip install nebius-serverless

Python 3.10 or later. It depends on nebius>=0.6.43,<0.7, PyYAML>=6, and rich>=13. The import name is nebius_serverless.

create() and jobs.get() need a Nebius CLI profile (nebius profile create), or in CI a service account or NEBIUS_IAM_TOKEN (Run in CI). ns.whoami() shows the account, and the project and region create() will use, without creating anything.

Run a job

import nebius_serverless as ns

spec = ns.JobSpec(
    ["nvidia-smi"],
    image="nvidia/cuda:13.1.1-runtime-ubuntu24.04",
    gpu="h100",
    timeout="1h",
)
job = spec.create()
job.wait()
job.display()

gpu="h100" asks Nebius for one H100, and Nebius picks the platform and preset in the project's region. create() returns once Nebius has accepted the job. job.wait() polls until the job ends and prints each new state. job.get() fetches once, job.cancel() requests cancellation, and ns.jobs.get(id) reloads a job from a saved id. create(dry_run=True) returns the request and creates nothing. The same recipe loads from YAML with ns.JobSpec.from_yaml("job.yaml"). Logs are nebius ai job logs <id>: this library does not stream them.

Serve an endpoint

An endpoint is a container that stays up and answers on a managed https:// URL. It bills for compute while it runs, until you stop or delete it.

spec = ns.EndpointSpec(
    image="vllm/vllm-openai:v0.19.1",
    command=["bash", "-c", "vllm serve Qwen/Qwen3-0.6B --port 8000"],
    gpu="h100",
    port=8000,
)
endpoint = spec.create()
endpoint.wait(probe="/v1/models")  # RUNNING, and the server answers
print(endpoint.url, endpoint.token)
endpoint.delete()

Endpoints require a bearer token by default: callers send Authorization: Bearer {endpoint.token}. A random token is generated on create, and endpoint.reveal_token() fetches it again later. For production, keep it in MysteryBox with token_secret=. auth="none" makes a public URL that anyone who has it can call, at your cost.

Documentation

The documentation site is mnrozhkov.github.io/nebius-serverless:

The runnable scripts are in examples/, and the pages themselves in docs/.

Work on the client

From a checkout, uv installs the package with the locked dependencies (nebius==0.6.43, PyYAML==6.0.3, rich==15.0.0) and the test and lint tools:

uv sync
uv run pytest
uv run python examples/quickstarts/job_quickstart.py
uv run --group docs mkdocs serve   # the documentation site, locally

License

Apache-2.0. Copyright 2026 Mikhail Rozhkov and Evgeny Zholkovskiy. See LICENSE and NOTICE.

Metadata

Release files for nebius-serverless 0.1.0

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

Source distribution (sdist)

Source distribution for nebius-serverless 0.1.0
File Size Uploaded Provenance Actions
nebius_serverless-0.1.0.tar.gz 69.4 kB With provenance Details for nebius_serverless-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nebius-serverless 0.1.0
File Interpreter ABI Platform Actions
nebius_serverless-0.1.0-py3-none-any.whl Python 3 none any Details for nebius_serverless-0.1.0-py3-none-any.whl

Total release size: 147.6 kB

Release files / nebius_serverless-0.1.0.tar.gz

Download URL nebius_serverless-0.1.0.tar.gz
Size 69.4 kB
Tags Source
SHA-256 checksum
How to use checksums
64386d2f8d5c7763899a06c7401d77b06829e03cf347bcaf8615fe27db4d3817
BLAKE2b-256 checksum
How to use checksums
7022809a8aaadd148645794e57059341d02327d13aba4c8fc426e16f110aca2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 / nebius_serverless-0.1.0-py3-none-any.whl

Download URL nebius_serverless-0.1.0-py3-none-any.whl
Size 78.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38b878a6cb65b528355fe4707c2149ebfb6e000223aad9ab63fd513f3ef931bc
BLAKE2b-256 checksum
How to use checksums
955abef246e4bd63bd243c07540d78fa8e9bd1bd143ff3ec911a394b927781b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 nebius-serverless 0.1.0

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

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