Xchanger
========
A Python module that scrapes data from https://www.xe.com/ and returns exchange rates for different currencies.
Use it to get the latest exchange rates for any currency pair.
The code is compatible with both Python 2 and Python 3.
Installation:
============
```
pip install Xchanger
```
Example
=======
#### Importing module
from fx.Xchanger import Xchanger
#### Create a Xchanger object.
converter = Xchanger()
#### Get the data of the specified currencies.
data = converter.get(from_currency="USD", to_currency="EUR")
#### print the data
print(data)
#### Output:
1 USD = 0.92374341 EUR
#### Save the exchange rate data to an Excel spreadsheet.
converter.save_to_excel(from_currency="USD", to_currency=None)
#### Output:
1 USD data1.xlsx saved succcessfully!
#### Save the exchange rate data to a CSV file.
converter.save_to_csv(from_currency=None, to_currency="EUR")
#### Output:
1 USD data1.csv saved succcessfully!
#### Save the exchange rate data to a JSON file.
converter.save_to_json(from_currency="EUR", to_currency=None)
#### Output:
1 USD data1.csv saved succcessfully!
Raw data
{
"_id": null,
"home_page": "https://github.com/MaazAli04/XC",
"name": "Xchanger",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "real-time exchange rates",
"author": "Maaz Ali",
"author_email": "devlprkhan04@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4d/f0/a097a36025125820bc6cde88c314331c5485688daf0dba711ec78fdaed1d/Xchanger-0.1.3.tar.gz",
"platform": null,
"description": "\r\nXchanger\r\n========\r\n\r\nA Python module that scrapes data from https://www.xe.com/ and returns exchange rates for different currencies.\r\nUse it to get the latest exchange rates for any currency pair.\r\n\r\nThe code is compatible with both Python 2 and Python 3.\r\n\r\nInstallation:\r\n============\r\n\r\n```\r\npip install Xchanger\r\n```\r\n\r\nExample\r\n=======\r\n\r\n#### Importing module\r\nfrom fx.Xchanger import Xchanger\r\n\r\n#### Create a Xchanger object.\r\nconverter = Xchanger()\r\n\r\n#### Get the data of the specified currencies.\r\ndata = converter.get(from_currency=\"USD\", to_currency=\"EUR\")\r\n\r\n#### print the data\r\nprint(data)\r\n\r\n#### Output:\r\n 1 USD = 0.92374341 EUR\r\n\r\n#### Save the exchange rate data to an Excel spreadsheet.\r\nconverter.save_to_excel(from_currency=\"USD\", to_currency=None)\r\n\r\n#### Output:\r\n 1 USD data1.xlsx saved succcessfully!\r\n\r\n#### Save the exchange rate data to a CSV file.\r\nconverter.save_to_csv(from_currency=None, to_currency=\"EUR\")\r\n\r\n#### Output:\r\n 1 USD data1.csv saved succcessfully!\r\n\r\n#### Save the exchange rate data to a JSON file.\r\nconverter.save_to_json(from_currency=\"EUR\", to_currency=None)\r\n\r\n#### Output:\r\n 1 USD data1.csv saved succcessfully!\r\n",
"bugtrack_url": null,
"license": "",
"summary": "A Python module to get and save exchange rates in different formats",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/MaazAli04/XC"
},
"split_keywords": [
"real-time",
"exchange",
"rates"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4df0a097a36025125820bc6cde88c314331c5485688daf0dba711ec78fdaed1d",
"md5": "d40f57d6f8fba12b300177b0b28b4b16",
"sha256": "c9efc9315a02ef985c570cccf46ad115f6e40ef2ebbde7163ba80044c22963a1"
},
"downloads": -1,
"filename": "Xchanger-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "d40f57d6f8fba12b300177b0b28b4b16",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6868,
"upload_time": "2023-08-27T06:49:23",
"upload_time_iso_8601": "2023-08-27T06:49:23.463842Z",
"url": "https://files.pythonhosted.org/packages/4d/f0/a097a36025125820bc6cde88c314331c5485688daf0dba711ec78fdaed1d/Xchanger-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-27 06:49:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MaazAli04",
"github_project": "XC",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "xchanger"
}