Metadata-Version: 2.4
Name: firmapanel-trade-country-data
Version: 0.3.0
Summary: Trade-focused country reference data for procurement, logistics, customs, sourcing, and import-export software.
Author: FirmaPanel
Maintainer: FirmaPanel
License-Expression: CC-BY-4.0
Project-URL: Homepage, https://firmapanel.com/tools
Project-URL: Repository, https://github.com/FirmaPanel/trade-country-data
Project-URL: Issues, https://github.com/FirmaPanel/trade-country-data/issues
Project-URL: Changelog, https://github.com/FirmaPanel/trade-country-data/blob/main/CHANGELOG.md
Project-URL: Documentation, https://github.com/FirmaPanel/trade-country-data#readme
Project-URL: Publisher, https://pypi.org/user/firmapanel/
Keywords: countries,customs,international-trade,iso-3166,logistics,procurement,reference-data,trade
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: ATTRIBUTION.md
Dynamic: license-file

# FirmaPanel Trade Country Data

The official Python distribution of
[FirmaPanel Trade Country Data](https://github.com/FirmaPanel/trade-country-data),
a trade-focused country reference dataset for procurement, logistics, customs,
sourcing, and import-export software.

Explore FirmaPanel's free procurement and import-export tools at
[firmapanel.com/tools](https://firmapanel.com/tools).

## Install

```bash
python -m pip install firmapanel-trade-country-data
```

The package supports Python 3.9 or later and has no runtime dependencies.

## Usage

Load one of the nine canonical datasets:

```python
from firmapanel_trade_country_data import load_dataset

countries = load_dataset("countries")
turkiye = next(record for record in countries["records"] if record["iso2"] == "TR")

print(turkiye["trade_group_ids"])
print(turkiye["customs_relationship_ids"])
```

Available dataset names are exposed through `DATASET_NAMES`. JSON Schemas can be
loaded using `load_schema()`, and `read_countries_csv()` returns the generated
country CSV as text.

```python
from firmapanel_trade_country_data import (
    DATASET_NAMES,
    DATASET_VERSION,
    load_schema,
    read_countries_csv,
)

print(DATASET_NAMES)
print(DATASET_VERSION)
country_schema = load_schema("country")
csv_text = read_countries_csv()
```

`dataset_file()` and `schema_file()` return `importlib.resources` Traversable
objects for consumers that need direct resource access.

## Versioning and license

Package `0.3.0` contains dataset snapshot `0.3.0`. Package versions may advance
independently for packaging-only changes; `DATASET_VERSION` always identifies
the bundled canonical snapshot.

The dataset is licensed under
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Retain attribution
when reusing it. See the repository's
[attribution guidance](https://github.com/FirmaPanel/trade-country-data/blob/main/ATTRIBUTION.md)
and [source registry](https://github.com/FirmaPanel/trade-country-data/blob/main/data/sources.json).
