Metadata-Version: 2.4
Name: iso-container
Version: 1.1.0
Summary: A Python package for ISO 6346 container information and validation.
Home-page: https://github.com/Jiseoup/iso-container
Author: JISUB LIM
Author-email: jseoup@gmail.com
License: MIT
Keywords: container,iso container,container validate,iso,iso6346
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# ISO Container
[![PyPI](https://img.shields.io/pypi/v/iso-container)](https://pypi.org/project/iso-container/)
![Python](https://img.shields.io/pypi/pyversions/iso-container)
![License](https://img.shields.io/pypi/l/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:
```bash
pip install iso-container
```

## Usage
### Search Container Information
You can retrieve detailed container information using an ISO code:
```python
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:

```python
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](https://github.com/datasets/ISO-Container-Codes) repository, processed to enhance usability.

## License
This project is licensed under the [MIT License](https://github.com/Jiseoup/iso-container/blob/main/LICENSE).
