Skip to content

Commit

Permalink
prices are now float instead of strings
Browse files Browse the repository at this point in the history
  • Loading branch information
canokaue committed Aug 8, 2020
1 parent 6abd4fc commit 7ac2e86
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Binary file added dist/satoshi-0.1.4-py3-none-any.whl
Binary file not shown.
Binary file added dist/satoshi-0.1.4.tar.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion satoshi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def to_fiat(satoshis=1, fiat='USD'):
response = requests.get(quote_url)
btc_value = response.json().get(fiat.upper())
fiat_value = float(satoshis * BTC_FRACTION) * float(btc_value)
return '{:.2f}'.format(fiat_value)
return float('{:.2f}'.format(fiat_value))


def print_art():
'''Read ASCII art from bitcoin_art.txt and print directly'''
Expand Down
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
here = dirname(__file__)

setup(name='satoshi',
version='0.1.3',
version='0.1.4',
description='Manipulate satoshi-related prices in Python 3, simple and sweet.',
long_description=open(join(here, 'README.md')).read(),
license='MIT',
long_description_content_type="text/markdown",
author='canokaue',
author_email='[email protected]',
url='https://github.com/quan-digital/satoshi/',
download_url = 'https://github.com/quan-digital/satoshi/dist/satoshi-0.1.3.tar.gz',
download_url = 'https://github.com/quan-digital/satoshi/dist/satoshi-0.1.4.tar.gz',
install_requires=[
'requests==2.23.0'
],
Expand All @@ -34,4 +34,8 @@
'Operating System :: OS Independent',
],
include_package_data=True
)
)

# PyPi publish flow
# python3 setup.py sdist bdist_wheel
# python3 -m twine upload dist/*

0 comments on commit 7ac2e86

Please sign in to comment.