cryptobin 1.0.0__tar.gz → 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cryptobin
3
- Version: 1.0.0
4
- Summary: Binance Crypto Comparison Library
3
+ Version: 1.0.1
4
+ Summary: Binance Crypto Comparison Lib
5
5
  Home-page: https://github.com/asinerum/cryptobin
6
6
  Author: Asinerum Conlang Project
7
7
  Author-email: asinerum.com@gmail.com
@@ -18,8 +18,11 @@ Requires-Dist: python-dotenv>=1.2.1
18
18
  Requires-Dist: python-multipart>=0.0.29
19
19
  Requires-Dist: starlette>=0.50.0
20
20
  Requires-Dist: uvicorn>=0.38.0
21
+ Requires-Dist: tagrepo
21
22
  Dynamic: license-file
22
23
 
24
+ # Binance Crypto Comparison Lib
25
+
23
26
  Detailed tips, tricks, and examples, can be found at project's repository
24
27
  https://github.com/asinerum/cryptobin
25
28
 
@@ -1,3 +1,5 @@
1
+ # Binance Crypto Comparison Lib
2
+
1
3
  Detailed tips, tricks, and examples, can be found at project's repository
2
4
  https://github.com/asinerum/cryptobin
3
5
 
@@ -1,9 +1,9 @@
1
1
  [metadata]
2
2
  name = cryptobin
3
- version = 1.0.0
3
+ version = 1.0.1
4
4
  author = Asinerum Conlang Project
5
5
  author_email = asinerum.com@gmail.com
6
- description = Binance Crypto Comparison Library
6
+ description = Binance Crypto Comparison Lib
7
7
  long_description = file: README.md
8
8
  long_description_content_type = text/markdown
9
9
  url = https://github.com/asinerum/cryptobin
@@ -25,6 +25,7 @@ install_requires =
25
25
  python-multipart >= 0.0.29
26
26
  starlette >= 0.50.0
27
27
  uvicorn >= 0.38.0
28
+ tagrepo
28
29
 
29
30
  [options.packages.find]
30
31
  where = src
@@ -0,0 +1,3 @@
1
+ from .core import *
2
+
3
+ __version__ = "1.0.1"
@@ -11,6 +11,8 @@ from starlette.responses import HTMLResponse
11
11
  from starlette.routing import Route
12
12
  from starlette.requests import Request
13
13
 
14
+ from tagrepo import *
15
+
14
16
  APP_PORT = 8081
15
17
  APP_DESC = 'Binance Crypto Comparison Toolkit'
16
18
 
@@ -18,9 +20,6 @@ METRIC_RATE = 'rate'
18
20
  METRIC_VOL = 'volume'
19
21
  METRIC_CAP = 'cap'
20
22
 
21
- APP_CHARSET = '<meta charset="utf-8">'
22
- APP_VIEWPORT = '<meta name="viewport" content="width=device-width,initial-scale=1.0">'
23
-
24
23
  load_dotenv()
25
24
 
26
25
  symbols_list = ['BTC', 'ETH', 'BNB']
@@ -42,8 +41,8 @@ LABEL_START_DATE = os.getenv('LABEL_START_DATE') or 'Starting date'
42
41
  LABEL_END_DATE = os.getenv('LABEL_END_DATE') or 'Ending date'
43
42
  LABEL_SUBMIT_BUTTON = os.getenv('LABEL_SUBMIT_BUTTON') or 'Compare'
44
43
  LABEL_COMPARISON = os.getenv('LABEL_COMPARISON') or 'Comparison'
45
- CAPTION_PROPORTION = os.getenv('CAPTION_PROPORTION') or 'Proportion (default 1)'
46
- STYLE_SUBMIT_BUTTON = os.getenv('STYLE_SUBMIT_BUTTON') or 'cursor:pointer;border-radius:3px;background-color:#04AA6D;color:white;font-size:18px;padding:20px;border:none;width:100%'
44
+ CAPTION_PROPORTION = os.getenv('CAPTION_PROPORTION', 'Proportion (default 1)')
45
+ STYLE_SUBMIT_BUTTON = os.getenv('STYLE_SUBMIT_BUTTON', APP_SUBMIT_BUTTON_STYLE)
47
46
 
48
47
  BINANCE_DATE_FORMAT = '%d %b %Y'
49
48
  KLINE_DATE_INDEX = 0
@@ -91,45 +90,6 @@ def html_metrics_plot(label: str, metrics: list, plot_func, response_func=HTMLRe
91
90
  plt.close()
92
91
  return response_func(f'<html><body>{charts_html}</body></html>')
93
92
 
94
- def html_text_checkbox(input_id: str, param_name: str, text_name: str, defvalue: str, labelfunc=str) -> str:
95
- return f'''<label>\n<input type="checkbox" name="{param_name}" id="{input_id}" value="{input_id}">\n<input type="text" size="10" name="{text_name}" value="{defvalue}">\n{labelfunc(input_id)}\n</label><br>'''
96
-
97
- def html_text_checkboxes(param_name: str, text_name: str, input_ids: list, defvalue: str, labelfunc=str) -> str:
98
- html_str = ''
99
- for input_id in input_ids:
100
- html_str += html_text_checkbox(input_id=input_id, param_name=param_name, text_name=text_name, defvalue=defvalue, labelfunc=labelfunc) + '\n'
101
- return html_str
102
-
103
- def html_input_date(input_id: str, param_name: str, label: str) -> str:
104
- return f'''<input type="date" id="{input_id}" name="{param_name}">\n<label for="{input_id}">{label}</label><br>'''
105
-
106
- def html_input_dates(param_names: list, labels: list, insert: str='\n') -> str:
107
- html_strs = []
108
- for i in range(len(param_names)):
109
- html_strs.append(html_input_date(input_id=param_names[i], param_name=param_names[i], label=labels[i]))
110
- return insert.join(html_strs)
111
-
112
- def html_fieldset(legend: str, settings: str) -> str:
113
- return f'''<fieldset>\n<legend>{legend}</legend>\n{settings}</fieldset>'''
114
-
115
- def html_checkbox(input_id: str, param_name: str, labelfunc=str) -> str:
116
- return f'''<input type="checkbox" id="{input_id}" name="{param_name}" value="{input_id}">\n<label for="{input_id}">{labelfunc(input_id)}</label><br>'''
117
-
118
- def html_checkboxes(param_name: str, input_ids: list, labelfunc=str) -> str:
119
- html_str = ''
120
- for input_id in input_ids:
121
- html_str += html_checkbox(input_id=input_id, param_name=param_name, labelfunc=labelfunc) + '\n'
122
- return html_str
123
-
124
- def html_hidden_checkbox(input_id: str, param_name: str, text_name: str, defvalue: str, labelfunc=str) -> str:
125
- return f'''<label>\n<input type="checkbox" name="{param_name}" id="{input_id}" value="{input_id}">\n<input type="hidden" name="{text_name}" value="{defvalue}">\n{labelfunc(input_id)}\n</label><br>'''
126
-
127
- def html_hidden_checkboxes(param_name: str, text_name: str, input_ids: list, defvalue: str, labelfunc=str) -> str:
128
- html_str = ''
129
- for input_id in input_ids:
130
- html_str += html_hidden_checkbox(input_id=input_id, param_name=param_name, text_name=text_name, defvalue=defvalue, labelfunc=labelfunc) + '\n'
131
- return html_str
132
-
133
93
  def form_page():
134
94
  return f'''
135
95
  <!DOCTYPE html>
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cryptobin
3
- Version: 1.0.0
4
- Summary: Binance Crypto Comparison Library
3
+ Version: 1.0.1
4
+ Summary: Binance Crypto Comparison Lib
5
5
  Home-page: https://github.com/asinerum/cryptobin
6
6
  Author: Asinerum Conlang Project
7
7
  Author-email: asinerum.com@gmail.com
@@ -18,8 +18,11 @@ Requires-Dist: python-dotenv>=1.2.1
18
18
  Requires-Dist: python-multipart>=0.0.29
19
19
  Requires-Dist: starlette>=0.50.0
20
20
  Requires-Dist: uvicorn>=0.38.0
21
+ Requires-Dist: tagrepo
21
22
  Dynamic: license-file
22
23
 
24
+ # Binance Crypto Comparison Lib
25
+
23
26
  Detailed tips, tricks, and examples, can be found at project's repository
24
27
  https://github.com/asinerum/cryptobin
25
28
 
@@ -4,3 +4,4 @@ python-dotenv>=1.2.1
4
4
  python-multipart>=0.0.29
5
5
  starlette>=0.50.0
6
6
  uvicorn>=0.38.0
7
+ tagrepo
@@ -1,3 +0,0 @@
1
- from .core import *
2
-
3
- __version__ = "1.0.0"
File without changes
File without changes