Skip to main content

ParcelForce ExpressLink API Client

A Python client for the ParcelForce ExpressLink API.

Uses Combadge to handle SOAP requests via Pydantic models.

Installation

pip install parcelforce-expresslink

Settings

Required:

  • API Username
  • API Password
  • Account Number
  • Contract Number

Optional:

Get settings from EITHER:

Env File (direct)

ParcelforceSettings.from_env_file(path: str)

Env File (indirect)

ParcelforceSettings.from_env(env:str) (where env is the environment variable pointing to the env file)

Args

ParcelForceSettings.from_args(*, usrname: str, password: str, contract_num: str, account_num: str):

Usage

Create a client

    settings = ParcelforceSettings()
    client = ParcelforceClient(settings=settings)

Create a Recipient Contact

    recip_contact = Contact(
        contact_name="A Name",
        email_address="anaddress@adomain.com",
        mobile_phone="07123456789",
        business_name="A Business Name",
    )

Create a Recipient Address

    recip_address = AddressRecipient(
        address_line1="An AddressLine",
        town="A Town",
        postcode="AA1BB2",
        )

Create a Shipment

    shipment = Shipment(
        recipient_address=recip_address,
        recipient_contact=recip_contact,
        total_number_of_parcels=1,
        shipping_date=date.today(),
        )
    response: ShipmentResponse = client.request_shipment(shipment)
    print(f"Shipment Number: {response.shipment_num}, Status: {response.status}")

Metadata

Release files for parcelforce-expresslink 0.1.12

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

Source distribution (sdist)

Source distribution for parcelforce-expresslink 0.1.12
File Size Uploaded Provenance Actions
parcelforce_expresslink-0.1.12.tar.gz 17.0 kB Without provenance Details for parcelforce_expresslink-0.1.12.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parcelforce-expresslink 0.1.12
File Interpreter ABI Platform Actions
parcelforce_expresslink-0.1.12-py3-none-any.whl Python 3 none any Details for parcelforce_expresslink-0.1.12-py3-none-any.whl

Total release size: 41.7 kB

Security for parcelforce-expresslink 0.1.12

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.

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