anshulxyz / exch Goto Github PK
View Code? Open in Web Editor NEWa command-line tool to see currency exchange rates
License: MIT License
a command-line tool to see currency exchange rates
License: MIT License
Markdown doesn't get rendered on the PyPI website. https://pypi.org/project/exch/
Hi,
It's sometimes tough to guess the currency names, would it be possible to have a flag, for instance -l, to list currencies andtheir country ? it could be loaded from hardcoded json for offline support too.
Nb: I am currently packaging this for nixos.org
isinstance()
here: output = fixer(base, target, amount)
if isinstance(output, float):
output = "{} {} = {} {}".format(amount, base, output, target)
click.echo(output)
except KeyError:
result = 1.00 if base == target else "KeyError: Invalid curreny"
return result
Add newline at the end of the JSON files that are being written. Such as here
Look for a better way to handle Connection Error Exception.
Refactor file_handling.py
They're the main arguments, they shouldn't have flags.
handle exceptions such as:
Date format should be ISO: 2019-07-01
Add how to install test dependencies and working with tox
and pytest
.
sounds like something I would use but I would rather install it from pypi
python3 -mpip install -U exch --user
didn't work is it available there ?
cheers
If just --curr_to
is given or just --curr_from
, then whole other currencies should be listed nicely. Suggested by Suyog.
I shouldn't make an API call every a command is fired. That will be abusing the
free API. Running something locally will always be faster than making online
requests. So I'll save the JSON. And have the --sync
option to update the
rates.
Currently the default are set like this:
@click.option('--base', '-b', default='USD', type=str, show_default=True,
help='Currency you are converting from.')
@click.option('--target', '-t', default='INR', type=str, show_default=True,
help='Currency you\'re converting to.')
Where defaults are set to USD and INR.
User should be able to change this to his preference.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.