Skip to main content

RESOURCERA resource gauge logo

RESOURCERA

Know your resources. Admit work with confidence.
Resource intelligence, capacity estimation, and resource-aware concurrency for Python applications.

CI status Documentation status Python 3.12, 3.13, 3.14 and 3.15 Typed package Apache License 2.0 Asyncio and Trio supported

Documentation · Quickstart · Examples · Agent skills · Contributing


RESOURCERA is an embeddable, async-first library that observes local resources, estimates capacity for a workload, and helps cooperating application tasks make explainable admission decisions. It is framework-neutral and does not require an accelerator SDK.

What you can do

Capability How it helps
Observe Inspect CPU, memory, disk, network, container limits, and visible accelerators with explicit freshness and capability states.
Estimate Describe workload requirements and identify the limiting resource without treating missing data as free capacity.
Admit Bound concurrent work with explainable acceptance or rejection and optional finite waiting.
Coordinate Hold logical leases within an interpreter or between cooperating processes on one machine.
Control overhead Use bounded, adaptive sampling with observable self-overhead safeguards.

RESOURCERA is not a dashboard, distributed execution engine, or physical resource isolation mechanism. Measurements and estimates are observations, not guarantees.

Installation

Python 3.12, 3.13, 3.14, and 3.15 are supported (3.12 or newer is required). Install from a checkout:

python -m pip install .

The intended distribution name is resourcera once a release is published. For optional NVIDIA NVML telemetry, install .[nvidia] from a checkout and provide a compatible driver and NVML library. RESOURCERA never installs SDKs or drivers.

Quickstart

import anyio

from resourcera import AdmissionRejectedError, ResourceManager


async def main():
    async with ResourceManager(scope="machine") as resources:
        snapshot = await resources.snapshot()
        print("Available memory:", snapshot.memory.available_bytes.value, "bytes")

        try:
            async with resources.admission({"memory": "64MiB"}) as decision:
                print("Admitted:", decision.lease_id)
                await anyio.sleep(0.01)  # Your workload goes here.
        except AdmissionRejectedError as error:
            print("Not admitted:", error.decision.reason)


anyio.run(main)

The manager owns its sampling and lease lifecycle. CPU and throughput rates need two samples; unavailable, stale, or failed required measurements reject admission. Keep the admission context open while the work runs.

How it fits together

RESOURCERA resource intelligence architecture

Start with the quickstart, then explore capacity estimates, admission, and coordination guarantees. Platform-specific accelerator capabilities and their limitations are described in the accelerator guide.

Agent skills

The repository includes two optional Agent Skills: resourcera for using the public API safely, and resourcera-provider for building isolated accelerator providers. They are instructions for compatible coding agents, not runtime dependencies. See the installation guide.

Project

Metadata

Release files for resourcera 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 resourcera 0.1.0
File Size Uploaded Provenance Actions
resourcera-0.1.0.tar.gz 1.1 MB Without provenance Details for resourcera-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.2 MB

Release files / resourcera-0.1.0.tar.gz

Download URL resourcera-0.1.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
4f261c5fe4d67a4b184a40fbd3092e28b9422f56b49acd95b39e582fd01ed8f6
BLAKE2b-256 checksum
How to use checksums
c1782f173d7c3bd3ac3d91e4b54233897a1063bc9fc8f60fdf050b4739012aec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / resourcera-0.1.0-py3-none-any.whl

Download URL resourcera-0.1.0-py3-none-any.whl
Size 64.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c38405d1d49d91d546007038860e194bece4bebf303898c3a6b090a406b8b0cd
BLAKE2b-256 checksum
How to use checksums
4157497c1deec546d0687acc6983e5821d5fafe621f18387867d210d5b4220e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for resourcera 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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