Basic client for Parcelforce Expresslink API
Project description
Installation
pip install parcelforce-expresslink
Setup
Env File
(auto-read from os.environ['PARCELFORCE_ENV'])
required
PF_AC_NUM_1
PF_CONTRACT_NUM_1
PF_EXPR_USR
PF_EXPR_PWD
optional
PF_ENDPOINT = "https://expresslink.parcelforce.net/ws"
PF_WSDL = (bundled)
PF_BINDING ="{http://www.parcelforce.net/ws/ship/v14}ShipServiceSoapBinding"
tracking_url_stem = https://www.royalmail.com/track-your-item#/tracking-results/"
Usage
recip_address = AddressRecipient(
address_line1="An AddressLine",
town="A Town",
postcode="AA1BB2",
)
recip_contact = Contact(
contact_name="A Name",
email_address="anaddress@adomain.com",
mobile_phone="07123456789",
business_name="A Business Name",
)
shipment = Shipment(
recipient_address=recip_address,
recipient_contact=recip_contact,
total_number_of_parcels=1,
shipping_date=date.today(),
)
client = ParcelforceClient()
response: ShipmentResponse = client.request_shipment(shipment)
print(f"Shipment Number: {response.shipment_num}, Status: {response.status}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parcelforce_expresslink-0.1.7.tar.gz.
File metadata
- Download URL: parcelforce_expresslink-0.1.7.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
791f6c4deaae1230d01ca17afa8ae08e2a177f4ef151ab03e0c932fd461fcbf4
|
|
| MD5 |
f3976f52de05e0bafd55412448f576da
|
|
| BLAKE2b-256 |
e2d21bdbd6e85edffaab5d537e43d1eef627dd774c3a19fd2b44d0c7604dcec4
|
File details
Details for the file parcelforce_expresslink-0.1.7-py3-none-any.whl.
File metadata
- Download URL: parcelforce_expresslink-0.1.7-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ee0188b5144a9e56c48750f3ab8abac543e7db54cb174c1d1a5c21a1ed67b5c
|
|
| MD5 |
55d8ecf86e788da23ab2b5a432331625
|
|
| BLAKE2b-256 |
84951d03582ddf2f65f25f52932db612a2872c06922a8186c0de56013f6e6c9f
|