# venrate
Venrate is a library to get the exchange rate from currency A to currency B from different platforms like [BCV](https://www.bcv.org.ve).
<div align="center">
<img
src="https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/logo.png"
alt="venrate logo"
width="200"
height="100"/>
</div>
# Requeriments
- python3 >= 3.9
- requests >= 2.32.3
- dataclasses and typing (standard libraries)
# Installation
You can install venrate from [Pypi](https://pypi.org/project/venrate/)
```sh
pip install venrate
```
# Using venrate.
## Exchange rate from 'Bolivares' to 'US Dollars' in all platforms.
```python3
# importing venrate and creating object.
from venrate import Venrate
venrate = Venrate()
for p_name, platform in venrate.platforms.items():
currency_from = platform.currency_from
currency_to = platform.currency_to
rate = venrate.get_rate(
p_name,
currency_from,
currency_to,
use_last_response=False,
timeout=10, # This is a requests.request option
verify=True # This is a requests.request option
)
print(f"{p_name} rate from '{currency_from}' to '{currency_to}' is"
" " f"'{rate}'")
```
## Exchange rate from 'Bolivares' to 'US Dollars' using BCV.
```python3
# importing venrate and creating object
from venrate import Venrate
venrate = Venrate()
platform_name = 'BcV' # Name is case insensitive
bcv_rate = venrate.get_rate(
platform_name,
use_last_response=False,
timeout=10,
verify=False # Lately BCV it's giving SSL errors
)
print(bcv_rate)
# Successfull requests.Response are saved, so you can use it later.
bcv_rate = venrate.get_rate(
platform_name,
use_last_response=True,
timeout=10,
verify=False # Lately BCV it's giving SSL errors
)
print(bcv_rate)
```
## Default currency names that platforms uses
```python3
# importing venrate and creating object
from venrate import Venrate
venrate = Venrate()
for p_name, platform in venrate.platforms.items():
currency_from = platform.currency_from
currency_to = platform.currency_to
print(p_name, currency_from, currency_to)
# Why know this?
# Platforms could have different naming for currencies
# Binance for example uses USDT
# MonitorDolar, BCV and Yadio uses USD
```
# :notebook: Notes <a name="notes"></a>
- It's still a very premature library, it lacks:
- Documentation
- Tests
- More platforms
- More methods or new idea of superclass that results useful to use.
- There are platforms like MonitorDolar that only does BS to USD so if you try using different currencies or different ordering it will throw the same rate.
# Supported platforms
<table>
<tr>
<td>Name</td>
<td>Image</td>
</tr>
<tr>
<td>Binance</td>
<td><img src="https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/binance.png" width="100" height="100"></td>
</tr>
<tr>
<td>BCV</td>
<td><img src="https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/bcv.png" width="100" height="100"></td>
</tr>
<tr>
<td>MonitorDolar</td>
<td><img src="https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/monitordolar.png" width="100" height="100"></td>
</tr>
<tr>
<td>Yadio</td>
<td><img src="https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/yadio.png" width="100" height="100"></td>
</tr>
</table>
# Made by :link: [Sivefunc](https://gitlab.com/sivefunc)
# Licensed under :link: [GPLv3](https://codeberg.org/Sivefunc/venrate/src/branch/main/LICENSE)
Raw data
{
"_id": null,
"home_page": null,
"name": "venrate",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "bcv, exchange, api, venezuela, http, monitordolar, binance, yadio",
"author": null,
"author_email": "sivefunc <sivefunc@tuta.io>",
"download_url": "https://files.pythonhosted.org/packages/cd/19/52980e92e402bfe5556956838554ac79a0de161fe54c31581e8284572f36/venrate-1.0.4.tar.gz",
"platform": null,
"description": "# venrate\nVenrate is a library to get the exchange rate from currency A to currency B from different platforms like [BCV](https://www.bcv.org.ve).\n\n<div align=\"center\">\n<img\n src=\"https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/logo.png\"\n alt=\"venrate logo\"\n width=\"200\"\n height=\"100\"/>\n</div>\n\n# Requeriments\n- python3 >= 3.9\n- requests >= 2.32.3\n- dataclasses and typing (standard libraries)\n\n# Installation\nYou can install venrate from [Pypi](https://pypi.org/project/venrate/)\n```sh\npip install venrate\n```\n\n# Using venrate.\n## Exchange rate from 'Bolivares' to 'US Dollars' in all platforms.\n```python3\n# importing venrate and creating object.\nfrom venrate import Venrate\nvenrate = Venrate() \n\nfor p_name, platform in venrate.platforms.items():\n currency_from = platform.currency_from\n currency_to = platform.currency_to\n\n rate = venrate.get_rate(\n p_name,\n currency_from,\n currency_to,\n use_last_response=False,\n timeout=10, # This is a requests.request option\n verify=True # This is a requests.request option\n )\n\n print(f\"{p_name} rate from '{currency_from}' to '{currency_to}' is\"\n \" \" f\"'{rate}'\")\n```\n\n## Exchange rate from 'Bolivares' to 'US Dollars' using BCV.\n```python3\n# importing venrate and creating object\nfrom venrate import Venrate\nvenrate = Venrate()\n\nplatform_name = 'BcV' # Name is case insensitive\nbcv_rate = venrate.get_rate(\n platform_name,\n use_last_response=False,\n timeout=10,\n verify=False # Lately BCV it's giving SSL errors\n )\n\nprint(bcv_rate)\n\n# Successfull requests.Response are saved, so you can use it later.\nbcv_rate = venrate.get_rate(\n platform_name,\n use_last_response=True,\n timeout=10,\n verify=False # Lately BCV it's giving SSL errors\n )\n\nprint(bcv_rate)\n```\n\n## Default currency names that platforms uses\n```python3\n# importing venrate and creating object\nfrom venrate import Venrate\nvenrate = Venrate()\n\nfor p_name, platform in venrate.platforms.items():\n currency_from = platform.currency_from\n currency_to = platform.currency_to\n print(p_name, currency_from, currency_to)\n\n# Why know this?\n# Platforms could have different naming for currencies\n# Binance for example uses USDT\n# MonitorDolar, BCV and Yadio uses USD\n```\n\n# :notebook: Notes <a name=\"notes\"></a>\n- It's still a very premature library, it lacks:\n - Documentation\n - Tests\n - More platforms\n - More methods or new idea of superclass that results useful to use.\n\n- There are platforms like MonitorDolar that only does BS to USD so if you try using different currencies or different ordering it will throw the same rate.\n\n# Supported platforms\n<table>\n <tr>\n <td>Name</td>\n <td>Image</td>\n </tr>\n <tr>\n <td>Binance</td>\n <td><img src=\"https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/binance.png\" width=\"100\" height=\"100\"></td>\n </tr>\n <tr>\n <td>BCV</td>\n <td><img src=\"https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/bcv.png\" width=\"100\" height=\"100\"></td>\n </tr>\n <tr>\n <td>MonitorDolar</td>\n <td><img src=\"https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/monitordolar.png\" width=\"100\" height=\"100\"></td>\n </tr>\n <tr>\n <td>Yadio</td>\n <td><img src=\"https://codeberg.org/Sivefunc/venrate/raw/branch/venrate/readme_res/yadio.png\" width=\"100\" height=\"100\"></td>\n </tr>\n </table>\n\n# Made by :link: [Sivefunc](https://gitlab.com/sivefunc)\n# Licensed under :link: [GPLv3](https://codeberg.org/Sivefunc/venrate/src/branch/main/LICENSE)\n",
"bugtrack_url": null,
"license": "venrate - exchange rates from multiple platforms 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/>. ",
"summary": "Venrate get exchange rates from different platforms",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://gitlab.com/sivefunc/"
},
"split_keywords": [
"bcv",
" exchange",
" api",
" venezuela",
" http",
" monitordolar",
" binance",
" yadio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6409ac272b2858f8ea0c9bc23b0e653490f4d036a7d6040888d90316f146cd73",
"md5": "99713514775bf78acc77a71c824f48dd",
"sha256": "f206c36c9e39f86c509cd3a1620318373430f6418a25ad4a5d2433dc7fab31f6"
},
"downloads": -1,
"filename": "venrate-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "99713514775bf78acc77a71c824f48dd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 22482,
"upload_time": "2024-11-12T20:50:59",
"upload_time_iso_8601": "2024-11-12T20:50:59.689501Z",
"url": "https://files.pythonhosted.org/packages/64/09/ac272b2858f8ea0c9bc23b0e653490f4d036a7d6040888d90316f146cd73/venrate-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cd1952980e92e402bfe5556956838554ac79a0de161fe54c31581e8284572f36",
"md5": "ab857f2fa5ab0d7eda2029630c6206c6",
"sha256": "1f1be3cbe0a4fdc1507d31ca974ed320af0324ae151403ceece3009e65868a52"
},
"downloads": -1,
"filename": "venrate-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "ab857f2fa5ab0d7eda2029630c6206c6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 20577,
"upload_time": "2024-11-12T20:51:01",
"upload_time_iso_8601": "2024-11-12T20:51:01.739499Z",
"url": "https://files.pythonhosted.org/packages/cd/19/52980e92e402bfe5556956838554ac79a0de161fe54c31581e8284572f36/venrate-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-12 20:51:01",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "venrate"
}