Skip to main content

rtbnext

Static Badge PyPI License PyPI Version

Official Python SDK for the RTBNext API.

The RTBNext SDK provides a typed, asynchronous interface for accessing billionaire profiles, lists, filters, statistics, historical data and system information from the RTBNext API.

The SDK follows a consistent resource-oriented design: resources are loaded lazily, cached according to the configured cache mode, and expose typed helper methods for collections, time series and indexed data.

The package includes Python type information and is compatible with static type checkers such as Pyright, Pylance and mypy.

To find a list of all available API endpoints, please refer to the API Documentation. Also visit the API endpoint or review the SDK Documentation for additional details. For updates on current issues or maintenance, please refer to the System Status.

Installation

Install the package using pip:

pip install rtbnext

First usage

Every client application must identify itself when creating an SDK instance. This information is sent with API requests and helps to provide transparency about API consumers.

import asyncio

from rtbnext import ClientIdentity, rtbnext


async def main() -> None:
    async with rtbnext(
        client= ClientIdentity(
            name= "my-application",
            version= "1.0.0",
            contact= "https://example.com/contact"
        )
    ) as client:

        stats = await client.stats.global_.data()
        print( stats["count"] )


asyncio.run( main() )

The client identity consists of:

  • name — application or project name
  • version — application version
  • contact — optional contact URL
  • email — optional contact email address

Core concepts

Lazy resources

Resources are not downloaded when they are created. Data is loaded only when it is requested.

profile = client.profile.get( "bill-gates" )

# No request has been made yet.

data = await profile.meta.data()

Collections

Collection resources provide filtering, searching, sorting and paging helpers.

profiles = await client.profile.index.collection()

for profile in profiles.search( "bill" ).order_by( "networth", descending= True ).take( 5 ):
    print( item.raw["name"], item.raw["uri"] )

Time series

Historical data can be accessed through typed time-series resources.

history = await client.profile.get( "bill-gates" ).history.series()
print( history.latest )

Time series collections support date-based navigation and cursor operations:

history.seek( "2026-01-01" )

while ( point := history.next ) is not None:
    print( point["date"], point["networth"] )

Cache behavior

The SDK includes a configurable resource cache layer that follows HTTP cache semantics. Resources are cached according to the selected cache mode and server-provided cache headers.

Supported cache modes:

  • ttl — uses the server-defined cache lifetime (Cache-Control)
  • revalidate — performs conditional requests using validators such as ETag and Last-Modified
  • session — keeps resources during the lifetime of the SDK instance

The SDK does not bypass HTTP cache validation. Expired resources are refreshed according to the configured mode to prevent serving outdated data indefinitely.

A custom cache implementation can be provided by implementing the Cache protocol. This allows applications to integrate their own storage solutions, such as databases, filesystem caches or distributed cache systems.

The cache interface requires the following operations:

  • retrieve a cached resource state
  • store a resource state
  • delete a resource
  • clear the cache
  • report the current cache size

Requirements

  • Python 3.12+
  • httpx 0.28+

License

Copyright © 2026 RTBNext
Created and maintained by Paul Köhler (komed3).
Licensed under the MIT License.

Metadata

Release files for rtbnext 1.0.3

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

Source distribution (sdist)

Source distribution for rtbnext 1.0.3
File Size Uploaded Provenance Actions
rtbnext-1.0.3.tar.gz 25.4 kB With provenance Details for rtbnext-1.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 64.5 kB

Release files / rtbnext-1.0.3.tar.gz

Download URL rtbnext-1.0.3.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
722f4e71e91d364c5759ebe2c51baa0e2c5d2c6e57e2fbda564e74f09488f2c8
BLAKE2b-256 checksum
How to use checksums
5495f476cd90358f72dbdd0ee8f8c2eb227159c67b853528284aa5cd91fe4ebe
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 1, 2026.

Transparency log

Release files / rtbnext-1.0.3-py3-none-any.whl

Download URL rtbnext-1.0.3-py3-none-any.whl
Size 39.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3cf5e5bbb689dcc656ee48efa8ae2f4705fd19933f535eb52c1452beb4a43e82
BLAKE2b-256 checksum
How to use checksums
9e9a2d66aa4829fd527ca00db3164aa35104a90b2dadb295013fc239f6027539
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 1, 2026.

Transparency log

Security for rtbnext 1.0.3

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 rtbnext-1.0.3.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 1, 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