Metadata-Version: 2.4
Name: lang2country
Version: 1.0.1
Summary: Detect language and country from text
Author: Kiarash
Author-email: kiatimasi@gmail.com
Requires-Python: >=3.8
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
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
Requires-Dist: langdetect (>=1.0.9,<2.0.0)
Description-Content-Type: text/markdown

# lang2country
A Python package to detect language and country from text.

---
## Project Installation
### Install dependencies using Poetry
```bash 
    poetry install
```
### Running Tests:
This project uses the standard `unittest` framework. You can run all tests using Poetry
```bash 
    poetry run python -m unittest discover tests
```

## PKG Installation
Install using pip:
```bash 
    pip install lang2country
```

## PKG Building and Uploading
1️⃣ Update version on pyproject.toml
```bash 
    [project]
    name = "lang2country"
    version = "1.0.0"
```
2️⃣ Building
```bash 
    poetry build
```
3️⃣ Publishing on Pypi
```bash 
    poetry config pypi-token.pypi pypi-YOUR_TOKEN_HERE
    poetry publish
```

## PKG Usage
1️⃣ Detect Language

```bash 
    from lang2country import detect_language
    
    lang = detect_language("Hello my name is lang2country")
    print(lang)
    # Output: en
```

2️⃣ Detect Country

```bash 
    from lang2country import detect_country
    
    country = detect_country("Hello my name is lang2country")
    print(country)
    # Output: United States
```

## Dependency
This package uses:

```
python >=3.8
langdetect >=1.0.9
