Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 2.2.0 instead.
Reason given by maintainers: we make breaking changes before give it any users so from now any one can use 1.0.1 and higher versions only

Anis Partners for Python

The Python client for the Anis Partner API. It signs every request, verifies every response, and gives each operation a typed result. The details that can cause duplicate purchases or expose unverified credentials are handled explicitly: caller-owned order ids, recovery outcomes, and response verification have no silent shortcuts.

Disclaimer. This SDK is an optional helper provided free of charge under the MIT License, "as is", without warranty of any kind. Anis (Aniscom for Technical Services) accepts no responsibility or liability for its use or for any loss arising from it. You remain responsible for your own integration — recording orders before you send them, recovery, key custody and testing. The source code is public: read it to understand exactly what it does before you rely on it. You do not need an SDK — you can integrate directly with the Anis Partner API using the documentation at https://developers.anis.ly.

pip install anis-partners
# or
uv add anis-partners

Quick start

from anis_partners import AnisPartnersClient, ClientOptions, PemP256Signer

options = ClientOptions("https://<authority Anis gave you>")
signer = PemP256Signer.from_pem_file("/secure/partner-key.pem").for_key("<active key id>")

with AnisPartnersClient(options, signer) as anis:
    profile = anis.profile.get()
    wallets = list(anis.wallets.list())  # follows every cursor page
    print(profile.application.id if profile.application else "No application")
    print(f"Found {len(wallets)} wallets")

The async client returns the same results. Run the whole flow inside an event loop:

import asyncio

from anis_partners import AsyncAnisPartnersClient, ClientOptions, PemP256Signer


async def main() -> None:
    options = ClientOptions("https://<authority Anis gave you>")
    signer = PemP256Signer.from_pem_file("/secure/partner-key.pem").for_key("<active key id>")
    async with AsyncAnisPartnersClient(options, signer) as anis:
        profile = await anis.profile.get()
        wallets = [wallet async for wallet in anis.wallets.list()]
        print(profile.application.id if profile.application else "No application")
        print(f"Found {len(wallets)} wallets")


if __name__ == "__main__":
    asyncio.run(main())

For order creation and recovery, persist the operation id and exact request before calling the SDK. See Orders and recovery for the complete outcome rules.

Refusals built into the design

The caller supplies the order id. A dropped answer followed by a new id could buy twice, so the SDK never invents this identity. The five order result types distinguish a completed sale, processing, a replay, a definitive refusal, and an unknown outcome. Only the first completion returns credentials; a replay never repeats them.

An unknown result means the original sale may have completed. Resume with the same id and body. A new purchase uses a new id only after a definitive OrderNotPlaced result and a changed intent.

Response verification cannot be disabled. If a read response cannot be verified, its body is discarded and UnverifiableResponseError is raised. An unverifiable order answer is OrderOutcomeUnknown, because the sale may already have completed.

What is covered

The SDK covers all 19 published routes across profile, wallets, catalogue, orders, owned_cards, and diagnostics, plus the enrollment client. Public errors are generated from the error catalogue. Request, response, safety-code, and enrollment vectors are tested along with signed in-memory client flows and contract drift checks.

This package follows the published Partner SDK contract. Supported Python versions are 3.11–3.14.

Live verification

Verified end to end against a live Anis environment (October 2026).

Regenerating error types

src/anis_partners/errors/_codes.py is generated from contracts/error-catalogue.json. Regenerate it with:

uv run python tools/generate_errors.py

Do not edit the generated file by hand; the contract drift test checks it.

License

MIT © 2026 Aniscom for Technical Services (Anis).

Metadata

Release files for anis-partners 1.0.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 anis-partners 1.0.0
File Size Uploaded Provenance Actions
anis_partners-1.0.0.tar.gz 153.2 kB With provenance Details for anis_partners-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anis-partners 1.0.0
File Interpreter ABI Platform Actions
anis_partners-1.0.0-py3-none-any.whl Python 3 none any Details for anis_partners-1.0.0-py3-none-any.whl

Total release size: 239.3 kB

Release files / anis_partners-1.0.0.tar.gz

Download URL anis_partners-1.0.0.tar.gz
Size 153.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b50be577836d55d6bf57acece3faa925fa0e08046fb8c9a60c7633cccd4c02d1
BLAKE2b-256 checksum
How to use checksums
af6f34f80c37d7371644b3be8c99fb010e17170863bca61cdad809208700378a
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 Oct 6, 2026.

Transparency log

Release files / anis_partners-1.0.0-py3-none-any.whl

Download URL anis_partners-1.0.0-py3-none-any.whl
Size 86.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e5b2e8525d6160edcae20da75136205ad2f21a46805d402608372da4d1da811
BLAKE2b-256 checksum
How to use checksums
43fe8f420be0f094db20ce6e22df2433b8fff57a33ddd72a0204d2576e54b088
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 Oct 6, 2026.

Transparency log

Security for anis-partners 1.0.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 anis_partners-1.0.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 Oct 6, 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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

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