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.1.2.tar.gz (19.1 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.1.2-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_sendparcel_inpost-0.1.2.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for python_sendparcel_inpost-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c79dd4d0de64ab01eca1e9645a90af16d45b7bdf7a7b7ca9c2fe7075630dd402
MD5 89348ca9d33477492ea6a11097f30657
BLAKE2b-256 b2db8e4f5788408f2638a7a9d7040559731575569ee87f3baf8b4118546fd3c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_sendparcel_inpost-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for python_sendparcel_inpost-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e8655c7d2c3609c419bc7c5d9ac5510504ac0a109a23d143da9535e9f03cfdc
MD5 44a6bc61f04f330437506f6f867fb83d
BLAKE2b-256 c0e88d8df91e2635386cc07348671c40606975ac90db8bbd0c721d329a0a4c05

See more details on using hashes here.

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