semvec/pypi-packages huggingface dataset:
countries-py 0.1.0
Return useful information for every country in the ISO 3166 standard.
Requires Python: <4.0,>=3.12

# Country Data Management

A Python package for managing and retrieving country-related data, including country information, subdivisions, and translated country names.

## Features

- Retrieve country data using ISO country codes
- Access country subdivisions (states, provinces, etc.)
- Get translated country names in different languages
- Handle data from JSON files stored in a structured directory format

## Installation

```bash
pip install countries-data
```

## Usage

### Initialize the Client

```python
from countries_py import CountriesData

countries_py = CountriesData()
```

### Get Country Data

```python
from countries_py import CountriesData

countries_py = CountriesData()
# Get data for a specific country using ISO code
country_data = countries_py.get_country_data_by_code("US")
```

### Get Subdivisions

```python
from countries_py import CountriesData

countries_py = CountriesData()

# Get all subdivisions for a country as list
subdivisions = countries_py.get_country_subdivisions_by_code("US")

# Get a specific subdivision by code
subdivision = countries_py.get_country_subdivision_by_codes("US", "CA")
```

### Get Translations

```python
from countries_py import CountriesData

countries_py = CountriesData()

# Get all country names in a specific language
spanish_names = countries_py.get_translated_countries_names_by_lang_code("es")

# Get a specific country name in a language
spanish_name = countries_py.get_translated_country_name_by_codes("es", "US")
```

## Data Format
TODO add data format here

## Error Handling

The package includes robust error handling:
- Returns `None` for non-existent country codes
- Returns `None` for non-existent subdivision codes
- Returns empty list `[]` for countries without subdivisions
- Returns empty dict `{}` for missing translation files
- Logs errors using the `loguru` logger

## Dependencies

- Python 3.6+
- loguru
- pathlib

## License

MIT License

Copyright (c) 2024

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
dynamic-library 0.2.0
Hook to load package-provided dynamic libraries
Requires Python: >=3.9

# dynamic-library

[![PyPI - Version](https://img.shields.io/pypi/v/dynamic-library.svg)](https://pypi.org/project/dynamic-library)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dynamic-library.svg)](https://pypi.org/project/dynamic-library)

-----

## Installation

```console
pip install dynamic-library
```

## License

`dynamic-library` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.