Skip to content

DCDie/dhl-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Description

With dhl-express, you can use DHL Express API to create and manage your shipping labels.

Requirements

  • Python (3.8 or higher)

Installation

Install using pip

pip install dhl-express

Usage

Use the DHLService class to create a new instance of the service.

from dhl_express import DHLService

service = DHLService(
    api_key='YOUR_API_KEY',
    api_secret='YOUR_API_SECRET',
    test_mode=True
)

Validate shipment address using the validate_address method.

service.validate_address(
    params={
        'type': 'delivery',
        'strictValidation': 'true',
        'postalCode': '12345',
        'cityName': 'New York',
        'countryCode': 'US',
    }
)

Create a shipment using the create_shipment method.

service.create_shipment(
    **shipment_data
)

Get shipment status using the get_shipment_status method.

service.get_shipment_status(
    shipment_id='1234567890'
)

Get shipment proof using the get_shipment_proof method.

service.get_shipment_proof(
    shipment_id='1234567890'
)

P.S.

If you find bugs, need help, or want to talk to the developers, please write an issue on GitHub.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages