Skip to main content

Karrio

puprlship-tests License Codacy Badge

karrio is a multi-carrier shipping SDK.

The key features are:

  • Unified API: A standardized set of models representing the common shipping data (Address, Parcel, Shipment...)
  • Intuitive API: A library that abstracts and unifies the typical shipping API services (Rating, Shipping, Tracking...)
  • Multi-carrier: Integrate karrio once and connect to multiple shipping carrier APIs
  • Custom carrier: A framework to integrate a shipping carrier services within hours instead of months

Requirements

Python 3.11+

Installation

# install karrio core
pip install karrio

# eg: install the karrio canadapost extention
pip install karrio.canadapost
Additional carrier extensions
  • karrio.aramex
  • karrio.australiapost
  • karrio.canadapost
  • karrio.canpar
  • karrio.dhl-express
  • karrio.dhl-universal
  • karrio.dicom
  • karrio.fedex
  • karrio.purolator
  • karrio.royalmail
  • karrio.sendle
  • karrio.sf-express
  • karrio.tnt
  • karrio.ups
  • karrio.usps
  • karrio.usps-international
  • karrio.yanwen
  • karrio.yunexpress

Usage

Rates Fetching
  • Fetch shipping rates
import karrio.sdk as karrio
from karrio.core.models import Address, Parcel, RateRequest
from karrio.mappers.canadapost.settings import Settings


# Initialize a carrier gateway
canadapost = karrio.gateway["canadapost"].create(
    Settings(
        username="6e93d53968881714",
        password="0bfa9fcb9853d1f51ee57a",
        customer_number="2004381",
        contract_id="42708517",
        test=True
    )
)

# Fetching shipment rates

# Provide the shipper's address
shipper = Address(
    postal_code="V6M2V9",
    city="Vancouver",
    country_code="CA",
    state_code="BC",
    address_line1="5840 Oak St"
)

# Provide the recipient's address
recipient = Address(
    postal_code="E1C4Z8",
    city="Moncton",
    country_code="CA",
    state_code="NB",
    residential=False,
    address_line1="125 Church St"
)

# Specify your package dimensions and weight
parcel = Parcel(
    height=3.0,
    length=6.0,
    width=3.0,
    weight=0.5,
    weight_unit='KG',
    dimension_unit='CM'
)

# Prepare a rate request
rate_request = RateRequest(
    shipper=shipper,
    recipient=recipient,
    parcels=[parcel],
    services=["canadapost_xpresspost"],
)

# Send a rate request using a carrier gateway
response = karrio.Rating.fetch(rate_request).from_(canadapost)

# Parse the returned response
rates, messages = response.parse()

print(rates)
# [
#     RateDetails(
#         carrier_name="canadapost",
#         carrier_id="canadapost",
#         currency="CAD",
#         transit_days=2,
#         service="canadapost_xpresspost",
#         discount=1.38,
#         base_charge=12.26,
#         total_charge=13.64,
#         duties_and_taxes=0.0,
#         extra_charges=[
#             ChargeDetails(name="Automation discount", amount=-0.37, currency="CAD"),
#             ChargeDetails(name="Fuel surcharge", amount=1.75, currency="CAD"),
#         ],
#         meta=None,
#         id=None,
#     )
# ]

Resources

Join us on Discord

Metadata

Release files for karrio 2026.1.33

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for karrio 2026.1.33
File Interpreter ABI Platform Actions
karrio-2026.1.33-py3-none-any.whl Python 3 none any Details for karrio-2026.1.33-py3-none-any.whl

Release files / karrio-2026.1.33-py3-none-any.whl

Download URL karrio-2026.1.33-py3-none-any.whl
Size 215.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40fd7da5ff708633e86102d68cb8ae8a2bb3c115e4469ce94faba841e6bda961
BLAKE2b-256 checksum
How to use checksums
94807b6d4aea0347dc24611c7639fb7020ed56a117c754c7ece518974613042c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for karrio 2026.1.33

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

2026.1.33 This release

1 release file No 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