Metadata-Version: 2.1
Name: bcv-api
Version: 1.0.1
Summary: Parses BCV html to get prices of currencies in VEF
Author-email: sivefunc <sivefunc@tuta.io>
License: bcv-api small library that access BCV to get prices of currencies.
        Copyright (C) 2024 Sivefunc
        
        This program is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.
        
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
        
        You should have received a copy of the GNU General Public License
        along with this program.  If not, see <https://www.gnu.org/licenses/>.
        
Project-URL: Homepage, https://gitlab.com/sivefunc/bcv-api
Keywords: bcv,exchange,api,venezuela,http
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: COPYING

# bcv-api
bcv-api is a small (fast ?) python library that connects to
[BCV](https://www.bcv.org.ve) to parse html and get the current price of
currencies in VEF. 
<img
    src="readme_res/logo.png"
    alt="bcv logo"
    width="100"
    height="100"/>

# Requeriments
- python3 >= 3.9
- urllib and typing (standard libraries)

# Using bcv-api
<img
    src="readme_res/exchange-rates.png"
    alt="exchange rates"
    width="200"
    height="200"/>

```python3
# importing BCV and creating object.
from bcv_api import BCV
bcv_con = BCV()

# Get a currency
eur = bcv_con.currencies[0]
print(eur, bcv_con.get_currency(eur))

# Get all currencies
for currency, price in bcv_con.get_currencies().items():
    print(currency, price)

# Use last html saved by get_currencies() to not use internet in this query.
cny = bcv_con.currencies[1]
print(cny, bcv_con.get_currency(cny, use_last_html=True))
```

# Installation
You can install BCV-api from [Pypi](https://pypi.org/project/bcv-api/)
```sh
pip install bcv-api
```

## Made by [Sivefunc](https://gitlab.com/sivefunc)
## Licensed under [GPLv3](LICENSE)
