Skip to main content

A Python package for ISO 6346 container information and validation.

Project description

ISO Container

PyPI Python License

A Python package based on ISO 6346 Container Codes.
This package provides functionalities to search for container information using ISO codes and to validate container numbers.

Installation

Install the package using pip:

pip install iso-container

Usage

Search Container Information

You can retrieve detailed container information using an ISO code:

from iso_container import get_container_info

# Example usage
container_info = get_container_info('22GP')
print(container_info)
# -> {'class': '20 GENERAL PURPOSE CONTAINER', 'type': 'STANDARD DRY', 'length': 20, 'height': 8.5}

Validate Container Numbers

Validate whether a container number is compliant with the ISO 6346 standard:

from iso_container import validate_container

# Example usage
is_valid = validate_container('CSQU3054383')
print('Valid Container Number' if is_valid else 'Invalid Container Number')
# -> Valid Container Number

API Reference

Function Returns
get_container_info(code) A dict with container details, or None if the code is unknown. The lookup is case-insensitive.
validate_container(number) True if the 11-character number passes the ISO 6346 check-digit rule, otherwise False.

Dataset

The dataset used in this package is derived from the ISO-Container-Codes repository, processed to enhance usability.

License

This project is licensed under the MIT License.

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

iso_container-1.1.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

iso_container-1.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file iso_container-1.1.0.tar.gz.

File metadata

  • Download URL: iso_container-1.1.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iso_container-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fd85464a15677d6dd316ce455b7da362d065463a0e80e3b3e86ccaecd995bbcf
MD5 6c50f067448f65c56f1b98fd0007c820
BLAKE2b-256 3cc2ea133d9b9af57449b5a64d0da66a8cb184935931197216f161541c6cbe62

See more details on using hashes here.

Provenance

The following attestation bundles were made for iso_container-1.1.0.tar.gz:

Publisher: publish.yml on Jiseoup/iso-container

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iso_container-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: iso_container-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iso_container-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80fba549fad93dac54c76df00f050028c5ec4311525885fd37e0fc8b01ffe9d4
MD5 4fe011a9f33d0311fd906a5319248bf4
BLAKE2b-256 160d0a916e91f87e89d057f0dd624713026f508fe8221e5eec7c34effc24a921

See more details on using hashes here.

Provenance

The following attestation bundles were made for iso_container-1.1.0-py3-none-any.whl:

Publisher: publish.yml on Jiseoup/iso-container

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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