{ "info": { "author": "XE.com Inc. Development Team", "author_email": "python@xe.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "

\n \n \n \n

\n\n# XE Currency Data Client - Python\n\nXE.com Inc. is the World's Trusted Currency Authority. This project provides an SDK to interface with our XE Currency Data (XECD) product.\n\nXE Currency Data is a REST API that gives you access to daily or live rates and historic mid-market conversion rates between all of our supported currencies.\n\nYou will need an api key and secret to use this sdk. Sign up for a [free trial][4] or register for a [full account][5].\n\nThis client will work with both python2 and python3.\n\n## Installation\n\nThe preferred way to install this package is pip.\n\n```\npip install xecd-rates-client\n```\n\nOr get the latest version from git:\n```\npip install git+https://github.com/XenonLab/xecd-rates-client-python.git\n```\n\n\nThis package follows [semantic versioning][3].\n\n## Usage\n\n```python\n>>> from xecd_rates_client import XecdClient\n>>> xecd = XecdClient('ACCOUNT_ID', 'API_KEY')\n\n>>> xecd.account_info()\n{'id': '11111111-1111-1111-1111-111111111111', 'organization': 'YOUR_ORG', 'package': 'ENTERPRISE_LIVE_INTERNAL', 'service_start_timestamp': '2018-01-01T00:00:00Z'}\n\n>>> xecd.convert_from(\"EUR\", \"CAD\", 55)\n{'terms': 'http://www.xe.com/legal/dfs.php', 'privacy': 'http://www.xe.com/privacy.php', 'from': 'EUR', 'amount': 55.0, 'timestamp': '2018-08-21T15:31:00Z', 'to': [{'quotecurrency': 'CAD', 'mid': 82.7121317322}]}\n\n>>> xecd.convert_to(\"RUB\", \"CAD\", 55)\n{'terms': 'http://www.xe.com/legal/dfs.php', 'privacy': 'http://www.xe.com/privacy.php', 'to': 'RUB', 'amount': 55.0, 'timestamp': '2018-08-21T15:32:00Z', 'from': [{'quotecurrency': 'CAD', 'mid': 1.0652293852}]}\n\n>>> xecd.historic_rate(\"2016-12-25\", \"12:34\", \"EUR\", \"CAD\", 55)\n{'terms': 'http://www.xe.com/legal/dfs.php', 'privacy': 'http://www.xe.com/privacy.php', 'from': 'EUR', 'amount': 55.0, 'timestamp': '2016-12-25T13:00:00Z', 'to': [{'quotecurrency': 'CAD', 'mid': 77.8883951909}]}\n\n>>> xecd.historic_rate_period(55, \"EUR\", \"RUB\", \"2016-02-28T12:00\", \"2016-03-03T12:00\")\n{'terms': 'http://www.xe.com/legal/dfs.php', 'privacy': 'http://www.xe.com/privacy.php', 'from': 'EUR', 'amount': 55.0, 'to': {'RUB': [{'mid': 4590.1222691671, 'timestamp': '2016-02-28T12:00:00Z'}, {'mid': 4545.42879069, 'timestamp': '2016-02-29T12:00:00Z'}, {'mid': 4433.0643335184, 'timestamp': '2016-03-01T12:00:00Z'}, {'mid': 4409.6291908683, 'timestamp': '2016-03-02T12:00:00Z'}, {'mid': 4396.2068371801, 'timestamp': '2016-03-03T12:00:00Z'}]}}\n\n>>> xecd.monthly_average(55, \"CAD\", \"EUR\", 2017, 5)\n{'terms': 'http://www.xe.com/legal/dfs.php', 'privacy': 'http://www.xe.com/privacy.php', 'from': 'CAD', 'amount': 55.0, 'year': 2017, 'to': {'EUR': [{'monthlyAverage': 36.5976590134, 'month': 5, 'daysInMonth': 31}]}}\n```\n\n## Documentation\n\n[Technical Specifications][2]\n\n## Contributing\n\nxecd_rates_client_python is an open-source project. Submit a pull request to contribute!\n\n## Testing\n\n```bash\npython3 -m test.UnitTest\npython3 -m test.IntegrationTest\npython -m test.IntegrationTest\n```\n\nNote: the UnitTest must be ran with python3 due to its use of unittest.mock (which is not present as of python2.7). Despite this, the client itself is usable with both python 2 and 3.\n\n## Security Issues\n\nIf you discover a security vulnerability within this package, please **DO NOT** publish it publicly. Instead, contact us at **security [at] xe.com**. We will follow up with you as soon as possible.\n\n## About Us\n\n[XE.com Inc.][1] is The World's Trusted Currency Authority. Development of this project is led by the XE.com Inc. Development Team and supported by the open-source community.\n\n[1]: http://www.xe.com\n[2]: http://www.xe.com/xecurrencydata/XE_Currency_Data_API_Specifications.pdf\n[3]: http://semver.org/\n[4]: https://xecd.xe.com/account/signup.php?freetrial\n[5]: http://www.xe.com/xecurrencydata/\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/XenonLab/xecd-rates-client-python", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "xecd-rates-client", "package_url": "https://pypi.org/project/xecd-rates-client/", "platform": "", "project_url": "https://pypi.org/project/xecd-rates-client/", "project_urls": { "Homepage": "https://github.com/XenonLab/xecd-rates-client-python" }, "release_url": "https://pypi.org/project/xecd-rates-client/1.0.0/", "requires_dist": [ "requests (>=2.19.1)" ], "requires_python": "", "summary": "XECD REST Client", "version": "1.0.0" }, "last_serial": 4193371, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "d6b1e705bf6e5f9ad79d200369dcd395", "sha256": "1f11f291ce0acd8afa4efca1adae77c024f3ce387763f4d21091963200ca2fce" }, "downloads": -1, "filename": "xecd_rates_client-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d6b1e705bf6e5f9ad79d200369dcd395", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4501, "upload_time": "2018-08-21T17:53:15", "url": "https://files.pythonhosted.org/packages/02/4f/37b8311235a84bea0b2a3070e3c12ed3d8b3eaf3538661e91e73852c9349/xecd_rates_client-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fb480a02e55f962b3faecfb0b3c8b2fe", "sha256": "57f0953a61cb3b72955e42a31c379c144810e7074610ea2703cad279e9fe1d9a" }, "downloads": -1, "filename": "xecd_rates_client-1.0.0.tar.gz", "has_sig": false, "md5_digest": "fb480a02e55f962b3faecfb0b3c8b2fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3994, "upload_time": "2018-08-21T17:53:16", "url": "https://files.pythonhosted.org/packages/40/90/0a2c3914afa2c6e73cd8c2d74591c9bdd621ed0621747d03a171698b39dd/xecd_rates_client-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d6b1e705bf6e5f9ad79d200369dcd395", "sha256": "1f11f291ce0acd8afa4efca1adae77c024f3ce387763f4d21091963200ca2fce" }, "downloads": -1, "filename": "xecd_rates_client-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d6b1e705bf6e5f9ad79d200369dcd395", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4501, "upload_time": "2018-08-21T17:53:15", "url": "https://files.pythonhosted.org/packages/02/4f/37b8311235a84bea0b2a3070e3c12ed3d8b3eaf3538661e91e73852c9349/xecd_rates_client-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fb480a02e55f962b3faecfb0b3c8b2fe", "sha256": "57f0953a61cb3b72955e42a31c379c144810e7074610ea2703cad279e9fe1d9a" }, "downloads": -1, "filename": "xecd_rates_client-1.0.0.tar.gz", "has_sig": false, "md5_digest": "fb480a02e55f962b3faecfb0b3c8b2fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3994, "upload_time": "2018-08-21T17:53:16", "url": "https://files.pythonhosted.org/packages/40/90/0a2c3914afa2c6e73cd8c2d74591c9bdd621ed0621747d03a171698b39dd/xecd_rates_client-1.0.0.tar.gz" } ] }