Skip to main content

InPost ShipX provider for python-sendparcel.

Project description

python-sendparcel-inpost

InPost ShipX provider package for the python-sendparcel ecosystem.

Alpha notice: this package tracks the still-changing python-sendparcel core.

What it provides

  • InPostLockerProvider for locker shipments
  • InPostCourierProvider for courier shipments
  • ShipXClient for direct async ShipX API access
  • ShipX-to-sendparcel status normalization helpers

Contract

This package follows the cleaned core contract:

  • create_shipment(...) -> ShipmentCreateResult
  • create_label(...) -> LabelInfo
  • handle_callback(...) -> ShipmentUpdateResult
  • fetch_shipment_status(...) -> ShipmentUpdateResult
  • cancel_shipment(...) -> bool

Providers do not mutate shipment state directly. They translate ShipX responses into normalized results that the core flow applies.

Installation

uv add python-sendparcel-inpost

or:

pip install python-sendparcel-inpost

Configuration

Key Type Description
token str ShipX API bearer token
organization_id int ShipX organization ID
sandbox bool Use sandbox API
base_url str Optional API base override
timeout float Request timeout in seconds

Status normalization

ShipX statuses are normalized to sendparcel shipment statuses.

  • recognized ShipX statuses produce {"status": ...}
  • tracking numbers are included when available
  • unknown ShipX statuses do not invent fake sendparcel statuses

That means callback and polling updates can safely return only tracking data when ShipX introduces a new status the mapper does not know yet.

Labels

Labels are returned as payloads.

  • PDF labels are returned as base64 content in LabelInfo["content_base64"]
  • no label URL is persisted by the core contract

Development

uv sync --extra dev
uv run pytest
uv run ruff check src tests
uv run mypy src tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_sendparcel_inpost-0.2.0.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_sendparcel_inpost-0.2.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file python_sendparcel_inpost-0.2.0.tar.gz.

File metadata

  • Download URL: python_sendparcel_inpost-0.2.0.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for python_sendparcel_inpost-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6bbcb6ab7b4aacce9554011d1e2eb311fbac71b5ed1c9b58d1dec8725c6f3a1e
MD5 52bbc38d8dad9a3f4c228aa42ea2ae03
BLAKE2b-256 6102d2aa42108eb69280472278d375960e7cd72d237119a9227de6d82b5ab2e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_sendparcel_inpost-0.2.0.tar.gz:

Publisher: release.yml on python-sendparcel/python-sendparcel-inpost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_sendparcel_inpost-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_sendparcel_inpost-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b9002b0c9acbce9327b188545d93736f69388ef60030df4d6ee442809963d6e
MD5 ca2200c9cddc6e6a473481cdb8e95ad3
BLAKE2b-256 e1eea72df2f0f43cfb0995c972330c616eee7ecb4e5172e3c8effbd019d2c209

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_sendparcel_inpost-0.2.0-py3-none-any.whl:

Publisher: release.yml on python-sendparcel/python-sendparcel-inpost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page