Skip to main content

antistock-api

A typed Python wrapper for the Antistock Developer API.

Covers all 88 endpoints across 17 resource groups (orders, products, customers, charges, coupons, FAQs, fraud rules, telegram broadcasts/users, tickets, warehouses, and more).

Install

pip install antistock-api

Requires Python 3.11+.

Quick start

from antistock_api import AntistockClient, OrderStatus

with AntistockClient('your-jwt-token') as client:
    me = client.user.get_current()

    for order in client.orders.iter_all(
        shop_id = 'shop-uuid',
        status_filter = OrderStatus.COMPLETED,
        page_size = 100,
    ):
        print(order)

    client.products.create(
        shop_id = 'shop-uuid',
        body = {'name': 'New product', 'price': 10},
    )

Features

  • Full coverage — every endpoint in the OpenAPI spec, organized by resource (client.orders, client.products, client.warehouses, etc.)
  • Typed — full from __future__ import annotations type hints, py.typed marker, enums for every spec enum
  • Pagination — every list endpoint has a paired iter_all(...) generator that walks all pages
  • Auth — bearer token (string) or callable TokenProvider for dynamic refresh
  • Errors — typed exception hierarchy (AntistockAuthenticationError, AntistockNotFoundError, AntistockRateLimitError, etc.)
  • Retries — exponential backoff on 429 and 5xx, honors Retry-After
  • Context manager — with AntistockClient(...) as client: for clean session shutdown

Auth

from antistock_api import AntistockClient

client = AntistockClient('your-jwt-token')

def get_token() -> str:
    return load_token_from_secrets_manager()

client = AntistockClient(get_token)

Configuration

from antistock_api import AntistockClient

client = AntistockClient(
    'your-jwt-token',
    base_url = 'https://business-api.antistock.io',
    timeout_seconds = 30.0,
    max_retries = 3,
    retry_backoff_seconds = 0.5,
)

Errors

from antistock_api import (
    AntistockClient,
    AntistockNotFoundError,
    AntistockRateLimitError,
)

try:
    client.orders.get('shop-uuid', 'missing-id')

except AntistockNotFoundError as E:
    print('order not found:', E.errors)

except AntistockRateLimitError as E:
    print('rate limited, retry after', E.retry_after_seconds)

License

MIT

Metadata

Release files for antistock-api 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 antistock-api 0.1.0
File Size Uploaded Provenance Actions
antistock_api-0.1.0.tar.gz 14.5 kB With provenance Details for antistock_api-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 42.5 kB

Release files / antistock_api-0.1.0.tar.gz

Download URL antistock_api-0.1.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
412d561e6b0b1b0e5f441d713973e8dee5f871f424b63d6e8a74fc58f657e03e
BLAKE2b-256 checksum
How to use checksums
8774fa5d5c4f4470c281d99409d0a1731f7bd0101d314278fdd2fa9c124eedfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 28, 2026.

Transparency log

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

Download URL antistock_api-0.1.0-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2478dbf63da2644882ee1a81c9b51db8291eaf5670431cfc077b465848e353dc
BLAKE2b-256 checksum
How to use checksums
c3cda587b0f0fa74d09334f8f00edf2b9a0bc2bf54014718ec6fcf8fb1dd6384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 28, 2026.

Transparency log

Security for antistock-api 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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for antistock_api-0.1.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 Apr 28, 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

0.1.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