A Python package for ISO 6346 container information and validation.
Project description
ISO Container
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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd85464a15677d6dd316ce455b7da362d065463a0e80e3b3e86ccaecd995bbcf
|
|
| MD5 |
6c50f067448f65c56f1b98fd0007c820
|
|
| BLAKE2b-256 |
3cc2ea133d9b9af57449b5a64d0da66a8cb184935931197216f161541c6cbe62
|
Provenance
The following attestation bundles were made for iso_container-1.1.0.tar.gz:
Publisher:
publish.yml on Jiseoup/iso-container
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iso_container-1.1.0.tar.gz -
Subject digest:
fd85464a15677d6dd316ce455b7da362d065463a0e80e3b3e86ccaecd995bbcf - Sigstore transparency entry: 2164316947
- Sigstore integration time:
-
Permalink:
Jiseoup/iso-container@ac417535b2f9d5e03d3e57fe4e43bc7d0097b590 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/Jiseoup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac417535b2f9d5e03d3e57fe4e43bc7d0097b590 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80fba549fad93dac54c76df00f050028c5ec4311525885fd37e0fc8b01ffe9d4
|
|
| MD5 |
4fe011a9f33d0311fd906a5319248bf4
|
|
| BLAKE2b-256 |
160d0a916e91f87e89d057f0dd624713026f508fe8221e5eec7c34effc24a921
|
Provenance
The following attestation bundles were made for iso_container-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on Jiseoup/iso-container
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iso_container-1.1.0-py3-none-any.whl -
Subject digest:
80fba549fad93dac54c76df00f050028c5ec4311525885fd37e0fc8b01ffe9d4 - Sigstore transparency entry: 2164316957
- Sigstore integration time:
-
Permalink:
Jiseoup/iso-container@ac417535b2f9d5e03d3e57fe4e43bc7d0097b590 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/Jiseoup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac417535b2f9d5e03d3e57fe4e43bc7d0097b590 -
Trigger Event:
release
-
Statement type: