Metadata-Version: 2.4
Name: yv-languages
Version: 1.1.0
Summary: Languages package for YouVersion usage.
Home-page: https://gitlab.com/lifechurch/youversion/apis/libraries/yv-languages
Author: Bradley Belyeu
Author-email: bradley.belyeu@youversion.com
Platform: any
Requires-Python: >=3.11.0
Description-Content-Type: text/markdown
Requires-Dist: langcodes
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: platform
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# yv-languages

## Requirements

This project recommends Python 3.11 or higher.

## Installation

```bash
pip install yv-languages
```

## Usage

You can make any language tag string canonical like:

```python
import yv_languages

bcp = yv_languages.canonical("eng")

print(str(bcp))  # "en"
```

or with validation:

```python
import yv_languages

bcp = yv_languages.canonical("eng", should_validate=True)

print(str(bcp))  # "en"
```

You can also maximize a language tag using langcodes' likely subtags:

```python
import yv_languages

bcp = yv_languages.maximize("zh")

print(str(bcp))  # "zh-Hans-CN"
```

## Development

This project is tested with Python 3.13.

### Running tests

``` bash
pytest tests/
```

### Before committing any code

We have a pre-commit hook which should be setup.
You can symlink it to run before each commit by changing directory to the repo and running

``` bash
make githooks
```
