Metadata-Version: 2.4
Name: country_capitals
Version: 1.0.1
Summary: Get the name of a country's capital city.
Project-URL: Homepage, https://github.com/KosayJabre/Country-Capitals
Author-email: Kosay Jabre <kosay.jabre@gmail.com>
License: This is free and unencumbered software released into the public domain.
        
        Anyone is free to copy, modify, publish, use, compile, sell, or
        distribute this software, either in source code form or as a compiled
        binary, for any purpose, commercial or non-commercial, and by any
        means.
        
        In jurisdictions that recognize copyright laws, the author or authors
        of this software dedicate any and all copyright interest in the
        software to the public domain. We make this dedication for the benefit
        of the public at large and to the detriment of our heirs and
        successors. We intend this dedication to be an overt act of
        relinquishment in perpetuity of all present and future rights to this
        software under copyright law.
        
        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 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.
        
        For more information, please refer to <https://unlicense.org>
License-File: LICENSE
Keywords: ISO 3166,ISO 3166-1,capitals,countries
Requires-Python: >=3.7
Requires-Dist: pycountry
Description-Content-Type: text/markdown

# Country-Capitals
[![PyPI Downloads](https://static.pepy.tech/badge/country-capitals)](https://pepy.tech/projects/country-capitals)

Get the name of a country's capital city. That's pretty much it.

## Installation
```
pip install country_capitals
```

## Usage
You can lookup capitals by country name, code, or ISO numbers. Including `fuzzy=True` will try to use use a fuzzy matching algorithm to find the country name.
```python
from country_capitals import get_capital

get_capital("Germany")
get_capital("Germ", fuzzy=True)
get_capital("DEU")
get_capital("DE")
get_capital("276")
```

For ISO 3166-1 codes specifically, you can use `get_capital_by_iso_code` or any of the more specific functions:
```python
from country_capitals import get_capital_by_iso_code, get_capital_by_numeric, get_capital_by_alpha2, get_capital_by_alpha3

get_capital_by_iso_code("DE")
get_capital_by_iso_code("DEU")
get_capital_by_iso_code("276")
# or
get_capital_by_alpha2("DE")
get_capital_by_alpha3("DEU")
get_capital_by_numeric("276")
```



## Development
Run the tests:
```
python -m unittest
```

Build the package:
```
python -m build
```
