Skip to content

Commit 68ecb5d

Browse files
author
ravi
committed
readme.md and setup.py
1 parent fa78eed commit 68ecb5d

2 files changed

Lines changed: 84 additions & 2 deletions

File tree

README.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,82 @@
1-
# forex-python
1+
forex-python
2+
============
3+
4+
Foreign exchange rates and currency conversion.
5+
6+
Features:
7+
---------
8+
- List all currency rates.
9+
- Get historical rates for any day since 1999.
10+
- Conversion rate for one Currency(ex; USD to INR).
11+
- Convert amount from one currency to other.('USD 10$' to INR)
12+
13+
Currency Source:
14+
---------------
15+
Fixer.io is a free API for current and historical foreign exchange rates published by European Central Bank.
16+
The rates are updated daily 3PM CET.
17+
18+
Installation:
19+
------------
20+
21+
Install using python package
22+
23+
.. code-block:: bash
24+
25+
$ pip install forex-python
26+
27+
Or directly cloning the repo:
28+
29+
.. code-block:: bash
30+
31+
$ python setup.py install
32+
33+
Examples:
34+
------------------
35+
36+
Initialize class
37+
38+
.. code-block:: python
39+
40+
>>> from forex_python.converter import CurrencyRates
41+
>>> c = CurrencyRates()
42+
43+
list all latest currency rates for "USD"
44+
45+
.. code-block:: python
46+
47+
>>> c.get_rates('USD')
48+
{'EUR':19.22}
49+
50+
Get Conversion rate from USD to INR
51+
52+
.. code-block:: python
53+
54+
>>> c.get_rate('USD', 'INR')
55+
67.32
56+
57+
Convert amount from USD to INR:
58+
.. code-block:: python
59+
60+
>>> c.convert('USD', 'INR', 10)
61+
673.25
62+
63+
Convert amount from USD to INR based on 2010-03-01 rates
64+
65+
.. code-block:: python
66+
67+
>>> c.convert(100, 'EUR', 'USD', 10, "2010-03-01")
68+
632.60
69+
70+
RatesNotAvailableError for invalid currency codes and missing currency code from source:
71+
72+
.. code-block:: python
73+
74+
>>> c.get_rate('XYZ', 'INR')
75+
Traceback (most recent call last):
76+
RatesNotAvailableError: Currency XYZ => INR rate not available for Date latest.
77+
78+
Compleate `documentation`_
79+
80+
We welcome your feedback and support. found bug raise github issue.
81+
82+
.. _documentation: http://forex-python.readthedocs.org/en/latest/?badge=latest

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
author='Micro Pyramid Informatic Pvt. Ltd.',
1515
author_email='hello@micropyramid.com',
1616
url='https://github.com/MicroPyramid/forex-python',
17-
description='A currency rates and converter using the http://fixer.io/ API.',
17+
description='Foreign exchange rates and currency conversion.',
1818
long_description=LONG_DESCRIPTION,
1919
license=LICENSE,
2020
packages=find_packages(exclude=['tests', 'tests.*']),
@@ -32,5 +32,6 @@
3232
'Programming Language :: Python :: 3.2',
3333
'Programming Language :: Python :: 3.3',
3434
'Programming Language :: Python :: 3.4',
35+
'Topic :: Software Development :: Internationalization',
3536
],
3637
)

0 commit comments

Comments
 (0)