Skip to main content

runZero Python SDK

PyPI - Python Version PyPI License

This project is currently in beta and subject to change.

Overview

This is a Python API client for runZero - a product that provides asset discovery and network visibility to help you build and maintain a comprehensive inventory of your cyber assets. runZero customers can use this project to interact with their environment using runZero and Python.

Note: the APIs used with this client require a Platform license.

This project seeks to do only what is necessary to make interactions with runZero in your own Python code feel more like any other local, Pythonic API. It uses code generated from the runZero API, lightly wraps parts of it, and makes Python objects and functions discoverable, consistent, and easy to use. We want you to concentrate on working with runZero, not HTTP.

Installation

This project is published to PyPI and can be installed using your local Python package manager.

pip install runzero-sdk

Usage

There are several examples of using the SDK for common tasks under the /examples directory in the repo.

General usage of the SDK involves creating a runzero.Client() for handling authentication, then passing that Client to resource managers, such as the runzero.CustomAssets(), runzero.Sites(), runzero.OrgsAdmin(), and more.

A typical code flow would look like the following:

import runzero
import runzero.api as rz

client = runzero.Client()
client.oauth_login(MY_CLIENT_ID, MY_CLIENT_SECRET)

orgs = rz.OrgsAdmin(client=client).get_all()
print(f"retrieved {len(orgs)} from our runZero account")

Modules

The runzero-sdk package contains the following modules to group functionality.

runzero.api

The api module contains all the http handlers for interacting with runZero api resources such as Sites, Orgs, Tasks, Custom Integrations, etc.

runzero.types

The types module contains all the pydantic classes required for interacting with the runZero API resources such as Import Assets, Sites, Tasks, etc.

Custom Import Asset field mappings

The following fields are available to be set for custom integration asset imports. Any field which matches the below field names, either directly or via remapping, will be inserted into the corresponding ImportAsset field and validated to ensure it meets the outlined constraints.

Any field which does not match the fields below will be placed under the custom_attributes field. Please see the ImportAsset schema definition for more details: #/components/schemas/ImportAsset

  • id - this str field is required to be set for all custom integration assets and is the unique identifier for the asset. This ID should remain consistent across multiple imports of the same asset. runZero will combine assets with the same ID into a single asset and prevent combining assets with different IDs.
  • runZeroID - a uuid field representing the unique identifier of an existing runZero asset to merge into.
  • network_interfaces - this field is an array of objects representing the network interfaces of the asset. Please see the API Schema for details. #/components/schemas/ImportAsset/properties/networkInterfaces.
  • hostnames - a List[str] field of all the hostnames associated with the asset. Each hostname has a maximum length of 260 characters and the list has a maximum of 100 hostnames.
  • domain - a str field representing the domain associated with the asset. Maximum length of 260 characters.
  • first_seen_ts - a datetime.datetime field representing the first time an asset was seen.
  • last_seen_ts - a datetime.datetime field representing the last time an asset was seen.
  • os - a str field which describes the operating system on the asset. Maximum length of 1024 characters.
  • os_version - a str field which describes the version of the operating system running on the asset. Maximum length of 1024 characters.
  • manufacturer - a str field which declares the manufacturer of the asset. Maximum length of 1024 characters.
  • model - a str field which describes the manufacturers model of the asset. Maximum length of 1024 characters.
  • tags - a List[str] field for all the tags to be associated with the asset in the runZero platform. Maximum of 100 tags and each tag has a maximum length of 1024 characters.
  • device_type - a str field declaring the device type of the asset. Maximum length of 1024 characters.

Feature requests and bug reports

To report a bug or request a new feature in the SDK, please open a support request using the in-product link. This will let us deduplicate and prioritize requests in parallel to already planned enhancements.

When preparing to report a bug, please try to determine whether it's related to the SDK or the runZero product itself. For improvements to or issues with the SDK, please include as much detail as possible about the problem you're looking to solve. For improvements to or issues with the runZero platform, please explore our documentation to see if there's related guidance or to verify that something isn't working as intended before opening a support request.

Contributing a bug fix or feature

We look forward to being able to accept contributions from the community! However, until the project is stable enough, we'd rather you open an issue and have a discussion with the maintainers. Since we're actively working on this project, the fix may be forthcoming, or the area being improved may have a lot of change planned.

This project does not currently support the full runZero API. The broader runZero API documentation includes both human- and machine-generated API documentation.

runZero's OpenAPI spec is updated as the platform is expanded. The information published there can help you generate code if you have a need to use parts of the API not covered in this project.

Metadata

Release files for runzero-sdk 0.8.8

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

Source distribution (sdist)

Source distribution for runzero-sdk 0.8.8
File Size Uploaded
runzero_sdk-0.8.8.tar.gz 47.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for runzero-sdk 0.8.8
File Interpreter ABI Platform
runzero_sdk-0.8.8-py3-none-any.whl Python 3 none any Details

Total release size: 103.8 kB

Release files / runzero_sdk-0.8.8.tar.gz

Download URL runzero_sdk-0.8.8.tar.gz
Size 47.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7ad07c49ed0da66bb90187cda2cf3b3b756a32f55a4b879323e99ced420ccb3c
BLAKE2b-256 checksum
How to use checksums
3c30819c822ad052080e6533826bdc5b143a1f83e9233b79f1b195cfdb7580fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 23, 2026.

Transparency log

Release files / runzero_sdk-0.8.8-py3-none-any.whl

Download URL runzero_sdk-0.8.8-py3-none-any.whl
Size 56.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c1f13205fe60bf6d739a3c51ca637f4119049a108fb184520586a0e8d11e21f
BLAKE2b-256 checksum
How to use checksums
35e878d4c5d34dd225c9782c7462e6e4afcb6fcc0ed0a758b214889fda58dc64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.8 This release

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

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