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.0.tar.gz (29.4 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.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_sendparcel_inpost-0.3.0.tar.gz
  • Upload date:
  • Size: 29.4 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.0.tar.gz
Algorithm Hash digest
SHA256 c2e01fbe2c8b29da79f602cbda923101f01205b2eae5d1b30763cd21e857863d
MD5 a296637d770d12e85755829d426ea58a
BLAKE2b-256 9456aa2b00e779adc86b6592817b0f6ae85884bf0840f7ec5ba881ab0b955333

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for python_sendparcel_inpost-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d77398dbece0f8bc3aff4e94f9c2318af193b3ceee0fa394c699ddc36f5133b6
MD5 0d35dc9801eb5384a210008f07df13e3
BLAKE2b-256 306668be2252d57051a0b463b72c6645ef1c3d50971fafe7163a3db7dcff202a

See more details on using hashes here.

Provenance

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