Skip to main content

pacspace-sdk (Python)

Official Python SDK for the PacSpace Balance API.

Install

pip install pacspace-sdk

Quick Start

from pacspace_sdk import PacSpace

pac = PacSpace.init("pk_test_xxx")
# Every request goes to https://app.pacspace.io; the key selects the environment
# (pk_test_ sandbox, pk_live_ production). Pass sandbox_url= for a private sandbox host.

emit = pac.balance.emit("cust_123", -42, "usage")
status = pac.balance.wait_for_verified(emit["recordId"])
usage = pac.balance.usage()

adjustment = pac.balance.emit(
    "cust_123",
    -10,
    "adjustment",
    {"adjusts": {"referenceId": "inv_001"}},
)
entry = pac.records.emit(
    record="build-1",
    title="Handoff restated",
    occurred_at="2026-09-14T10:02:00Z",
    actor_id="ci",
    payloads=[{"alg": "sha-256", "digest": "bb" * 32, "byteLength": "1"}],
    amends={"recordKey": "0xab", "entry": 1},
    note="handoff restated",
    lifecycle="amended",
)

adjusts names the committed Balance entry this delta adjusts. amends names a committed records entry; the SDK sends seq on the wire.

Verify source selection

verification = pac.verify(
    "0xproof_root_here",
    source="both",  # "db" (default), "chain", or "both"
)

Webhook Verification

from pacspace_sdk import Webhooks

webhooks = Webhooks("whsec_xxx")
event = webhooks.verify(signature, timestamp, raw_body)

Metadata

Release files for pacspace-sdk 0.3.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 pacspace-sdk 0.3.0
File Size Uploaded Provenance Actions
pacspace_sdk-0.3.0.tar.gz 24.2 kB With provenance Details for pacspace_sdk-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pacspace-sdk 0.3.0
File Interpreter ABI Platform Actions
pacspace_sdk-0.3.0-py3-none-any.whl Python 3 none any Details for pacspace_sdk-0.3.0-py3-none-any.whl

Total release size: 48.2 kB

Release files / pacspace_sdk-0.3.0.tar.gz

Download URL pacspace_sdk-0.3.0.tar.gz
Size 24.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6c7a1191410ae0432bf10fd982f4978b02aa88e3384d4f7bed08fa9fd464c5a9
BLAKE2b-256 checksum
How to use checksums
c9549bda35a4e543be91a8b5f1b765de1fb2d6cd38cf16f248ac1b9aad02a7ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log

Release files / pacspace_sdk-0.3.0-py3-none-any.whl

Download URL pacspace_sdk-0.3.0-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e7ff07d80de087db597c7e054a5e0616b5c0ac94c6e55361a9a0b6e823ca72b
BLAKE2b-256 checksum
How to use checksums
8f78110bf37578d9b98af9230d8606ccee0fc7c3f85c61798dd5402b12bba94d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log

Security for pacspace-sdk 0.3.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 pacspace_sdk-0.3.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 Sep 21, 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