Skip to main content

AdHoc Ediwheel XML API port to Python

Project description

Python EDIWHEEL - A Python package for data exchange in the tyre industry

DISCLAIMER: This is not an official EDIWHEEL package. It is a third-party implementation of the EDIWHEEL standard, and is in no way affiliated with any company or organization. Use at your own risk, no warranty is provided.

Summary

This package is a Python implementation of the EDIWHEEL standard for data exchange in the tyre industry. It is based on the EDIWHEEL standard.

This standard uses XML requests to make stock inquiries and to place orders. The responses are also in XML format.

Installation

The package can be installed using pip:

pip install ediwheel

Usage

To use this package, you will need to obtain API authentication credentials from a given supplier.

A config is instantiated as such:

from ediwheel import EdiConnectorConfig, EdiConnector

config = EdiConnectorConfig(
    host="https:/some_api_url.com",
    username="username",
    password="password",
    id="customer_id",
    timeout_s=10,
)

connector = EdiConnector(config)
connector.enquiry("EAN_CODE", "MANUFACTURER_CODE")

There is also a method available for batch queries, which performs better for large updates of stock. Usually, the request will time out for large batches, therefore one must split large lists into smaller batches.

results = connector.batch_enquiry(list_of_EANs, list_of_manufacturer_codes)

for ean, stock, delivery_date in results:
    print(ean, stock, delivery_date)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ediwheel-0.4.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ediwheel-0.4.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file ediwheel-0.4.0.tar.gz.

File metadata

  • Download URL: ediwheel-0.4.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.6

File hashes

Hashes for ediwheel-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4dfc1472d714dd4dba61ae4bbf14f733d189b63b1a10d6db019e1d8b891cf650
MD5 205e46b58613dec707e77e43170476ce
BLAKE2b-256 b1cc4855ebe7cc39724d99144bb75b1fdf4d7665f7874f3772b5562197bb70d8

See more details on using hashes here.

File details

Details for the file ediwheel-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ediwheel-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.6

File hashes

Hashes for ediwheel-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48b921c17e14dfe181efac6b30e412839a1a09cd96ae631023025d273909c752
MD5 f1fa811122ff2a1cc93855200dcd16bd
BLAKE2b-256 9c771d52463d30368b28cf45354905a99608f8c73669c541c84e9845c499effd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page