python-dhl-germany


Namepython-dhl-germany JSON
Version 0.3.4.13 PyPI version JSON
download
home_page
SummaryPython Lib for DHL SOAP API (Germany)
upload_time2023-11-08 11:39:10
maintainer
docs_urlNone
author
requires_python>=3.9
license
keywords dhl python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python_dhl_germany

# New WSDL version
- Got to DHL Geschaeftskundenversand and download the zip:
https://entwickler.dhl.de/group/ep/wsapis/geschaeftskundenversand/current

- Create a new wsdl folder
- rename geschaeftskundenversand-api-x.x.x-wsdl to production.wsdl
- copy production.wsdl to test.wsdl
- open test.wsdl and patch
  - FROM: <soap:address location="https://cig.dhl.de/services/production/soap"/>
  - TO: <soap:address location="https://cig.dhl.de/services/sandbox/soap"/>
- set new version in setup.py -> data_files (array)

## install dev
- create venv: python -m venv venv
- activate venv:
  - Windows: venv/Scripts/activate
  - Linux / Mac: source venv/bin/activate
- pip install -r requirements.txt -r requirements_dev.txt
- pre-commit hook install: pre-commit install --hook-type pre-push
- create .env file and add DHL_AUTH_USER + DHL_AUTH_PASSWORD variables

## build and deploy
- python setup.py sdist bdist_wheel
- s3pypi --bucket pypi.fourzero.one

# usage

create dhl client:
```
dhl_client = DHL(
    "DHL_AUTH_USER", # test: DHL-Entwickler User / live: DHL App Name
    "DHL_AUTH_PASSWORD", # test: DHL-Entwickler PW / live: DHL App Token
    "API_USER", # test: 2222222222_01 / live: Geschäftskunden-Portal system user name
    "API_PASSWORD", # test: pass / live: Geschäftskunden-Portal system user pw
    is_test=True,
)
```

create shipment order:
```
shipper = {
    "name": "Something Something GmbH",
    "name2": "",
    "street": "Teststraße",
    "street_number": "32",
    "zip": "22222",
    "city": "Bremen",
    "country_code": "DE",
    "phone": "040251090",
    "email": "test@test.com",
    "contact_person": "Test User",
}

receiver = {
    "name": "Test Tester",
    "name2": "TestCompany",
    "street": "Teststraße",
    "street_number": "12",
    "zip": "28217",
    "city": "Bremen",
    "country_code": "DE",
    "careOfName": "",
}

order = {
    "customs": {
        "invoice_no": "1234567",
        "description": "Ziegelsteine",
        "place_of_commital": shipper["city"],
    },
    "positions": [
        {
            "name": "Test Product 1",
            "amount": 2,
            "price": 12.5,
            "weight": 0.15,
            "customs": {
                "country_code_origin": "DE",
                "customs_tariff_number": "49119900",
            },
        },
        {
            "name": "Test Product 2",
            "amount": 3,
            "price": 1.5,
            "weight": 100,
            "customs": {
                "country_code_origin": "DE",
                "customs_tariff_number": "49119900",
            },
        },
    ],
}

dhl_client.create_shipment_order(
    "ORDER_ID",
    shipper, # find example in integration test
    receiver, # find example in integration test
    6.0, # weight
    "V01PAK", # dhl product
    "22222222220101", # dhl account number
    order_to_ship=order, # find example in integration test
)
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "python-dhl-germany",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "DHL,Python",
    "author": "",
    "author_email": "Johannes Eimer <johannes.eimer@jep-dev.com>",
    "download_url": "https://files.pythonhosted.org/packages/d2/3e/39c321c56b048790ee4be7eccbbd60ff28d399d12d6df7af97eaeb642598/python_dhl_germany-0.3.4.13.tar.gz",
    "platform": null,
    "description": "# python_dhl_germany\n\n# New WSDL version\n- Got to DHL Geschaeftskundenversand and download the zip:\nhttps://entwickler.dhl.de/group/ep/wsapis/geschaeftskundenversand/current\n\n- Create a new wsdl folder\n- rename geschaeftskundenversand-api-x.x.x-wsdl to production.wsdl\n- copy production.wsdl to test.wsdl\n- open test.wsdl and patch\n  - FROM: <soap:address location=\"https://cig.dhl.de/services/production/soap\"/>\n  - TO: <soap:address location=\"https://cig.dhl.de/services/sandbox/soap\"/>\n- set new version in setup.py -> data_files (array)\n\n## install dev\n- create venv: python -m venv venv\n- activate venv:\n  - Windows: venv/Scripts/activate\n  - Linux / Mac: source venv/bin/activate\n- pip install -r requirements.txt -r requirements_dev.txt\n- pre-commit hook install: pre-commit install --hook-type pre-push\n- create .env file and add DHL_AUTH_USER + DHL_AUTH_PASSWORD variables\n\n## build and deploy\n- python setup.py sdist bdist_wheel\n- s3pypi --bucket pypi.fourzero.one\n\n# usage\n\ncreate dhl client:\n```\ndhl_client = DHL(\n    \"DHL_AUTH_USER\", # test: DHL-Entwickler User / live: DHL App Name\n    \"DHL_AUTH_PASSWORD\", # test: DHL-Entwickler PW / live: DHL App Token\n    \"API_USER\", # test: 2222222222_01 / live: Gesch\u00e4ftskunden-Portal system user name\n    \"API_PASSWORD\", # test: pass / live: Gesch\u00e4ftskunden-Portal system user pw\n    is_test=True,\n)\n```\n\ncreate shipment order:\n```\nshipper = {\n    \"name\": \"Something Something GmbH\",\n    \"name2\": \"\",\n    \"street\": \"Teststra\u00dfe\",\n    \"street_number\": \"32\",\n    \"zip\": \"22222\",\n    \"city\": \"Bremen\",\n    \"country_code\": \"DE\",\n    \"phone\": \"040251090\",\n    \"email\": \"test@test.com\",\n    \"contact_person\": \"Test User\",\n}\n\nreceiver = {\n    \"name\": \"Test Tester\",\n    \"name2\": \"TestCompany\",\n    \"street\": \"Teststra\u00dfe\",\n    \"street_number\": \"12\",\n    \"zip\": \"28217\",\n    \"city\": \"Bremen\",\n    \"country_code\": \"DE\",\n    \"careOfName\": \"\",\n}\n\norder = {\n    \"customs\": {\n        \"invoice_no\": \"1234567\",\n        \"description\": \"Ziegelsteine\",\n        \"place_of_commital\": shipper[\"city\"],\n    },\n    \"positions\": [\n        {\n            \"name\": \"Test Product 1\",\n            \"amount\": 2,\n            \"price\": 12.5,\n            \"weight\": 0.15,\n            \"customs\": {\n                \"country_code_origin\": \"DE\",\n                \"customs_tariff_number\": \"49119900\",\n            },\n        },\n        {\n            \"name\": \"Test Product 2\",\n            \"amount\": 3,\n            \"price\": 1.5,\n            \"weight\": 100,\n            \"customs\": {\n                \"country_code_origin\": \"DE\",\n                \"customs_tariff_number\": \"49119900\",\n            },\n        },\n    ],\n}\n\ndhl_client.create_shipment_order(\n    \"ORDER_ID\",\n    shipper, # find example in integration test\n    receiver, # find example in integration test\n    6.0, # weight\n    \"V01PAK\", # dhl product\n    \"22222222220101\", # dhl account number\n    order_to_ship=order, # find example in integration test\n)\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python Lib for DHL SOAP API (Germany)",
    "version": "0.3.4.13",
    "project_urls": null,
    "split_keywords": [
        "dhl",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aa2ec434bf8633b9453690d1ad4b72cc0f26e2ff71ab706e77cbf7c204bf8e92",
                "md5": "16ec8d03cf4fe3bd3c6256ee52e3fc57",
                "sha256": "ae483776b95ce033f954e0c5e3d8982d36986190969a5b240e1d9075bc1a2f00"
            },
            "downloads": -1,
            "filename": "python_dhl_germany-0.3.4.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "16ec8d03cf4fe3bd3c6256ee52e3fc57",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 76012,
            "upload_time": "2023-11-08T11:39:08",
            "upload_time_iso_8601": "2023-11-08T11:39:08.549236Z",
            "url": "https://files.pythonhosted.org/packages/aa/2e/c434bf8633b9453690d1ad4b72cc0f26e2ff71ab706e77cbf7c204bf8e92/python_dhl_germany-0.3.4.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d23e39c321c56b048790ee4be7eccbbd60ff28d399d12d6df7af97eaeb642598",
                "md5": "9ed2362b25513be5ea4345483b4978ce",
                "sha256": "03afd4e8899c08a8fa79984a6cea46c2c9cd6fd6884d4b65cb823d9fb19bf09e"
            },
            "downloads": -1,
            "filename": "python_dhl_germany-0.3.4.13.tar.gz",
            "has_sig": false,
            "md5_digest": "9ed2362b25513be5ea4345483b4978ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 65906,
            "upload_time": "2023-11-08T11:39:10",
            "upload_time_iso_8601": "2023-11-08T11:39:10.293195Z",
            "url": "https://files.pythonhosted.org/packages/d2/3e/39c321c56b048790ee4be7eccbbd60ff28d399d12d6df7af97eaeb642598/python_dhl_germany-0.3.4.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-08 11:39:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "python-dhl-germany"
}
        
Elapsed time: 0.27282s