Skip to content

Commit 6565806

Browse files
committed
updated readme with changes, updated version
1 parent 2e6bb99 commit 6565806

3 files changed

Lines changed: 129 additions & 101 deletions

File tree

README.md

Lines changed: 0 additions & 95 deletions
This file was deleted.

README.rst

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
forex-python
2+
============
3+
4+
.. image:: https://travis-ci.org/MicroPyramid/forex-python.svg?branch=master
5+
:target: https://travis-ci.org/MicroPyramid/forex-python
6+
7+
.. image:: https://coveralls.io/repos/github/MicroPyramid/forex-python/badge.svg?branch=master
8+
:target: https://coveralls.io/github/MicroPyramid/forex-python?branch=master
9+
10+
.. image:: https://landscape.io/github/MicroPyramid/forex-python/master/landscape.svg?style=plastic
11+
:target: https://landscape.io/github/MicroPyramid/forex-python/master
12+
:alt: Code Health
13+
14+
.. image:: https://img.shields.io/badge/python-2.7%2C%203.3%2C%203.4%2C%203.5-blue.svg
15+
:target: https://pypi.python.org/pypi/forex-python
16+
17+
18+
`Forex Python`_ is a Free Foreign exchange rates and currency conversion.
19+
20+
Features:
21+
---------
22+
- List all currency rates.
23+
- BitCoin price for all curuncies.
24+
- Converting amount to BitCoins.
25+
- Get historical rates for any day since 1999.
26+
- Conversion rate for one currency(ex; USD to INR).
27+
- Convert amount from one currency to other.('USD 10$' to INR).
28+
- Currency symbols.
29+
- Currency names.
30+
31+
Currency Source:
32+
-----------------
33+
34+
Fixer.io is a free API for current and historical foreign exchange rates published by European Central Bank.
35+
The rates are updated daily 3PM CET.
36+
37+
BitCoin Price Source:
38+
---------------------
39+
Bitcoin prices calculated every minute. For more infomation visit [CoinDesk API](http://www.coindesk.com/api/).
40+
41+
Installation
42+
--------------
43+
44+
- Install using python package
45+
46+
.. code-block:: python
47+
48+
pip install forex-python
49+
50+
Or directly cloning the repo:
51+
52+
python setup.py install
53+
54+
Usage Examples:
55+
------------------
56+
57+
- Initialize class
58+
59+
.. code-block:: python
60+
61+
python
62+
>>> from forex_python.converter import CurrencyRates
63+
>>> c = CurrencyRates()
64+
65+
- list all latest currency rates for "USD"
66+
67+
.. code-block:: python
68+
69+
python
70+
>>> c.get_rates('USD')
71+
{u'IDR': 13625.0, u'BGN': 1.7433, u'ILS': 3.8794, u'GBP': 0.68641, u'DKK': 6.6289, u'CAD': 1.3106, u'JPY': 110.36, u'HUF': 282.36, u'RON': 4.0162, u'MYR': 4.081, u'SEK': 8.3419, u'SGD': 1.3815, u'HKD': 7.7673, u'AUD': 1.3833, u'CHF': 0.99144, u'KRW': 1187.3, u'CNY': 6.5475, u'TRY': 2.9839, u'HRK': 6.6731, u'NZD': 1.4777, u'THB': 35.73, u'EUR': 0.89135, u'NOK': 8.3212, u'RUB': 66.774, u'INR': 67.473, u'MXN': 18.41, u'CZK': 24.089, u'BRL': 3.5473, u'PLN': 3.94, u'PHP': 46.775, u'ZAR': 15.747}
72+
73+
- Get conversion rate from USD to INR
74+
75+
.. code-block:: python
76+
77+
python
78+
>>> c.get_rate('USD', 'INR')
79+
67.473
80+
81+
- Convert amount from USD to INR
82+
83+
.. code-block:: python
84+
85+
python
86+
>>> c.convert('USD', 'INR', 10)
87+
674.73
88+
89+
- Get latest Bitcoin price.
90+
91+
.. code-block:: python
92+
93+
python
94+
>>> from forex_python.bitcoin import BtcConverter
95+
>>> b = BtcConverter()
96+
>>> b.get_latest_price('USD')
97+
533.913
98+
99+
100+
- Convert Amount to Bitcoins based on latest exchange price.
101+
102+
.. code-block:: python
103+
104+
python
105+
>>> b.convert_to_btc(400, 'USD')
106+
0.7492699301118473
107+
108+
109+
- Get currency symbol using currency code
110+
111+
.. code-block:: python
112+
113+
python
114+
>>> from forex_python.converter import CurrencyCodes
115+
>>> c = CurrencyCodes()
116+
>>> print c.get_symbol('GBP')
117+
£
118+
119+
120+
You can view the complete `Documentation Here`_
121+
122+
We welcome your feedback and support, raise `github ticket`_ if you want to report a bug. Need new features? `Contact us here`_
123+
124+
.. _contact us here: https://micropyramid.com/contact-us/
125+
.. _Forex Python: https://micropyramid.com/oss/
126+
.. _github ticket: https://github.com/MicroPyramid/forex-python/issues
127+
.. _Documentation Here: http://forex-python.readthedocs.org/en/latest/?badge=latest

setup.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
import os
33
from setuptools import setup, find_packages
44

5-
VERSION = '0.2.3'
6-
7-
with io.open(os.path.join(os.path.dirname(__file__), 'README.md'), encoding='utf-8', errors='ignore') as readme:
8-
LONG_DESCRIPTION = readme.read()
9-
5+
VERSION = '0.2.4'
106

117
setup(
128
name='forex-python',
@@ -15,7 +11,7 @@
1511
author_email='hello@micropyramid.com',
1612
url='https://github.com/MicroPyramid/forex-python',
1713
description='Foreign exchange rates and currency conversion.',
18-
long_description=LONG_DESCRIPTION,
14+
long_description="\n\n".join([open("README.rst").read()]),
1915
packages=find_packages(exclude=['tests', 'tests.*']),
2016
include_package_data=True,
2117
install_requires=[

0 commit comments

Comments
 (0)