Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Commit a16d020

Browse files
committed
bumping version, dependencies and minor clean up
1 parent c31394f commit a16d020

File tree

6 files changed

+23
-17
lines changed

6 files changed

+23
-17
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,5 @@ ENV/
103103
test.py
104104
.idea/
105105
secrets.yml
106+
107+
venv3

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ I am not associated to cointracking.info -- use at your own risk!
88

99
# Install
1010
`python setup.py install`
11+
1112
`pip install python-ctapi`
1213

1314
# How to Use
@@ -40,6 +41,7 @@ print api.getGains()
4041

4142
# Running Tests
4243
**be aware of the API requests limit of 20 req/h**
44+
4345
`venv/bin/python -m unittest -v ctapi.test.ctapi_tests`
4446

4547
# Contribute

ctapi/ctapi.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
import requests
1818

19-
__author__ = "tbl42"
20-
__copyright__ = "(C) 2018 https://github.com/tbl42/"
21-
__version__ = '0.3.0'
19+
__author__ = "tehtbl"
20+
__copyright__ = "(C) 2018 https://github.com/tehtbl"
21+
__version__ = '0.3.1'
2222

2323
# set logging
2424
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
@@ -31,6 +31,7 @@
3131

3232
URI_API = 'https://cointracking.info/api/v1/'
3333

34+
3435
#
3536
# API object
3637
#
@@ -47,7 +48,6 @@ class CTAPI(object):
4748
def __init__(self, api_key=None, api_secret=None, debug=False):
4849
# if not self.api_key or not self.api_secret:
4950

50-
5151
self.api_key = api_key
5252
self.api_secret = api_secret
5353
self.debug = debug
@@ -114,15 +114,15 @@ def _api_query(self, method, params={}):
114114
'Key': self.api_key,
115115
'Sign': params_signed,
116116
'Connection': 'close',
117-
'User-Agent': 'python-ctapi/%s (https://github.com/tbl42/python-ctapi)' % (__version__),
117+
'User-Agent': 'python-ctapi/%s (https://github.com/tehtbl/python-ctapi)' % (__version__),
118118
}
119119

120-
logger.debug("="*30)
120+
logger.debug("=" * 30)
121121
logger.debug(params)
122122
logger.debug(params_string)
123123
logger.debug(params_signed)
124124
logger.debug(hdrs)
125-
logger.debug("="*30)
125+
logger.debug("=" * 30)
126126

127127
try:
128128
new_params = {}

ctapi/test/ctapi_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
except Exception:
1111
IS_CI_ENV = True
1212

13+
1314
def test_basic_response(unit_test, result, method_name):
1415
unit_test.assertTrue(result['success'], "%s failed" % method_name)
1516
unit_test.assertTrue(result['result'] is not None, "result not present in response")
1617
unit_test.assertTrue(isinstance(result['result'], dict), "result is not a dict")
1718
# unit_test.assertTrue(result['result']['method'] is method_name, "result method is wrong")
1819

20+
1921
@unittest.skipIf(IS_CI_ENV, 'no account secrets uploaded in CI envieonment, TODO')
2022
class TestCTAPIBasicTests(unittest.TestCase):
2123
"""
@@ -84,5 +86,6 @@ def test_getGains(self):
8486
actual = self.api.getGains()
8587
test_basic_response(self, actual, "getGains")
8688

89+
8790
if __name__ == '__main__':
8891
unittest.main()

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
requests==2.18.4
2-
future==0.16.0
3-
PyYAML==3.11
1+
PyYAML==5.1.2
2+
requests==2.22.0

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@
44

55
setup(
66
name='python-ctapi',
7-
version='0.3.0',
7+
version='0.3.1',
88
packages=['ctapi'],
99
install_requires=[
10-
'requests==2.18.4',
11-
'future==0.16.0',
12-
'PyYAML==3.11',
10+
'requests==2.22.0',
11+
'PyYAML==5.1.2',
1312
],
1413

15-
author='tbl42',
14+
author='tehtbl',
1615
author_email='[email protected]',
17-
url='https://github.com/tbl42/python-ctapi',
16+
url='https://github.com/tehtbl/python-ctapi',
1817
description='Python Interface for CoinTracking.info API',
1918
long_description=open('README.md').read(),
20-
keywords = 'cointracking info btc api',
19+
keywords='CoinTracking info btc api coin tracking',
2120
license='MIT',
2221

2322
classifiers=[
@@ -28,6 +27,7 @@
2827
'Programming Language :: Python :: 3.4',
2928
'Programming Language :: Python :: 3.5',
3029
'Programming Language :: Python :: 3.6',
30+
'Programming Language :: Python :: 3.7',
3131
'Operating System :: OS Independent',
3232
'License :: OSI Approved :: MIT License',
3333
'Intended Audience :: Developers',

0 commit comments

Comments
 (0)