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.3.2.tar.gz (33.6 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.3.2-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_sendparcel_inpost-0.3.2.tar.gz
  • Upload date:
  • Size: 33.6 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.3.2.tar.gz
Algorithm Hash digest
SHA256 2491699f4e27ec08967d72b1fc87af295eb86615262c50fd506bebb6f55211f1
MD5 163e1ceee854d183b7ef25661aeddbf0
BLAKE2b-256 a2268f50406e158f291e3dad97863de7c20f552dc0ede64d12118f2bb74a7c8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_sendparcel_inpost-0.3.2.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.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_sendparcel_inpost-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 639fe72d506c34772fa7c139d123430aaa6adcbcc0015cc0817cf3e47a358d8f
MD5 9a967942e36b6faaa296b8f8d124dcfb
BLAKE2b-256 ade622d6f266aaa1fceb2fd9bfb523d98aca3c9c757e04d8087360779344ee22

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_sendparcel_inpost-0.3.2-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