freemt
commited on
Commit
•
303d329
1
Parent(s):
4f65834
Update bloom_tr in app.py
Browse files- app.py +124 -83
- poetry.lock +676 -0
- pyproject.toml +1 -0
app.py
CHANGED
@@ -1,90 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import httpx
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
def bloom_tr(prompt_
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
demo = gr.Blocks()
|
47 |
|
48 |
with demo:
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
b1 = gr.Button("translate")
|
88 |
-
b1.click(translate,inputs=[ input_prompt, from_lang, to_lang], outputs=generated_txt)
|
89 |
-
|
90 |
demo.launch(enable_queue=True, debug=True)
|
1 |
+
"""Translate via Bloom."""
|
2 |
+
# pylint: disable=invalid-name
|
3 |
+
from textwrap import dedent
|
4 |
+
from logzero import logger
|
5 |
+
|
6 |
import gradio as gr
|
7 |
import httpx
|
8 |
+
|
9 |
+
# Bloom
|
10 |
+
api_url = "https://api-inference.huggingface.co/models/bigscience/bloom"
|
11 |
+
timeout_ = httpx.Timeout(None, connect=10)
|
12 |
+
|
13 |
+
|
14 |
+
def bloom_tr(prompt_, from_lang, to_lang, input_prompt="translate this", seed=2, timeout=timeout_):
|
15 |
+
"""Translate via Bloom."""
|
16 |
+
prompt = dedent(
|
17 |
+
f"""
|
18 |
+
Instruction : Given an {from_lang} input sentence translate it into {to_lang} sentence. \n input : \"{prompt_}\" \n {to_lang} :
|
19 |
+
"""
|
20 |
+
).strip()
|
21 |
+
if len(prompt) == 0:
|
22 |
+
prompt = input_prompt
|
23 |
+
|
24 |
+
json_ = {
|
25 |
+
"inputs": prompt,
|
26 |
+
"parameters": {
|
27 |
+
"top_p": 0.9,
|
28 |
+
"temperature": 1.1,
|
29 |
+
"max_new_tokens": 250,
|
30 |
+
"return_full_text": False,
|
31 |
+
"do_sample": False,
|
32 |
+
"seed": seed,
|
33 |
+
"early_stopping": False,
|
34 |
+
"length_penalty": 0.0,
|
35 |
+
"eos_token_id": None,
|
36 |
+
},
|
37 |
+
"options": {
|
38 |
+
"use_cache": True,
|
39 |
+
"wait_for_model": True,
|
40 |
+
},
|
41 |
+
}
|
42 |
+
|
43 |
+
# headers=headers
|
44 |
+
# response = requests.request("POST", api_url, json=json_)
|
45 |
+
try:
|
46 |
+
response = httpx.post(api_url, json=json_, timeout=timeout)
|
47 |
+
except Exception as exc:
|
48 |
+
logger.error(exc)
|
49 |
+
return str(exc)
|
50 |
+
|
51 |
+
# output = json.loads(response.content.decode("utf-8"))
|
52 |
+
try:
|
53 |
+
output = response.json()
|
54 |
+
except Exception as exc:
|
55 |
+
logger.error(exc)
|
56 |
+
return str(exc)
|
57 |
+
|
58 |
+
try:
|
59 |
+
output_tmp = output[0]["generated_text"]
|
60 |
+
except Exception as exc:
|
61 |
+
logger.error(exc)
|
62 |
+
return str(exc)
|
63 |
+
|
64 |
+
solution = output_tmp.split(f"\n{to_lang}:")[0]
|
65 |
+
|
66 |
+
if "\n\n" in solution:
|
67 |
+
final_solution = solution.split("\n\n")[0]
|
68 |
+
else:
|
69 |
+
final_solution = solution
|
70 |
+
|
71 |
+
try:
|
72 |
+
_ = final_solution.splitlines()[-1]
|
73 |
+
except Exception as exc:
|
74 |
+
logger.error(exc)
|
75 |
+
return str(exc)
|
76 |
+
|
77 |
+
return _
|
78 |
+
|
79 |
+
|
80 |
+
langs = [
|
81 |
+
"German",
|
82 |
+
"French",
|
83 |
+
"Italian",
|
84 |
+
"Japanese",
|
85 |
+
"Russian"
|
86 |
+
"Spanish",
|
87 |
+
"Hindi",
|
88 |
+
]
|
89 |
|
90 |
demo = gr.Blocks()
|
91 |
|
92 |
with demo:
|
93 |
+
gr.Markdown("<h1><center>Translate with Bloom</center></h1>")
|
94 |
+
gr.Markdown(
|
95 |
+
dedent(
|
96 |
+
"""
|
97 |
+
## Model Details
|
98 |
+
Reer to the space created by [Kishore](https://www.linkedin.com/in/kishore-kunisetty-925a3919a/) inorder to participate in [EuroPython22](https://huggingface.co/EuroPython2022)
|
99 |
+
please like his project to support his contribution to EuroPython22. 😊
|
100 |
+
"""
|
101 |
+
).strip()
|
102 |
+
)
|
103 |
+
with gr.Row():
|
104 |
+
from_lang = gr.Dropdown(
|
105 |
+
["English", "Chinese", ] + langs,
|
106 |
+
value="English",
|
107 |
+
label="select From language : ",
|
108 |
+
)
|
109 |
+
to_lang = gr.Dropdown(
|
110 |
+
["Chinese", "English", ] + langs,
|
111 |
+
value="Hindi",
|
112 |
+
label="select to Language : ",
|
113 |
+
)
|
114 |
+
|
115 |
+
input_prompt = gr.Textbox(
|
116 |
+
label="Enter the sentence : ",
|
117 |
+
value=f'Instruction: ... \ninput: "from sentence" \n{to_lang} :',
|
118 |
+
lines=6,
|
119 |
+
)
|
120 |
+
|
121 |
+
generated_txt = gr.Textbox(lines=7)
|
122 |
+
|
123 |
+
b1 = gr.Button("translate")
|
124 |
+
b1.click(
|
125 |
+
# translate,
|
126 |
+
bloom_tr,
|
127 |
+
inputs=[input_prompt, from_lang, to_lang],
|
128 |
+
outputs=generated_txt,
|
129 |
+
)
|
130 |
+
|
|
|
|
|
|
|
131 |
demo.launch(enable_queue=True, debug=True)
|
poetry.lock
ADDED
@@ -0,0 +1,676 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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[package]]
|
2 |
+
name = "anyio"
|
3 |
+
version = "3.6.1"
|
4 |
+
description = "High level compatibility layer for multiple asynchronous event loop implementations"
|
5 |
+
category = "main"
|
6 |
+
optional = false
|
7 |
+
python-versions = ">=3.6.2"
|
8 |
+
|
9 |
+
[package.dependencies]
|
10 |
+
idna = ">=2.8"
|
11 |
+
sniffio = ">=1.1"
|
12 |
+
|
13 |
+
[package.extras]
|
14 |
+
doc = ["packaging", "sphinx-rtd-theme", "sphinx-autodoc-typehints (>=1.2.0)"]
|
15 |
+
test = ["coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "contextlib2", "uvloop (<0.15)", "mock (>=4)", "uvloop (>=0.15)"]
|
16 |
+
trio = ["trio (>=0.16)"]
|
17 |
+
|
18 |
+
[[package]]
|
19 |
+
name = "astroid"
|
20 |
+
version = "2.12.9"
|
21 |
+
description = "An abstract syntax tree for Python with inference support."
|
22 |
+
category = "dev"
|
23 |
+
optional = false
|
24 |
+
python-versions = ">=3.7.2"
|
25 |
+
|
26 |
+
[package.dependencies]
|
27 |
+
lazy-object-proxy = ">=1.4.0"
|
28 |
+
typing-extensions = {version = ">=3.10", markers = "python_version < \"3.10\""}
|
29 |
+
wrapt = [
|
30 |
+
{version = ">=1.11,<2", markers = "python_version < \"3.11\""},
|
31 |
+
{version = ">=1.14,<2", markers = "python_version >= \"3.11\""},
|
32 |
+
]
|
33 |
+
|
34 |
+
[[package]]
|
35 |
+
name = "asttokens"
|
36 |
+
version = "2.0.8"
|
37 |
+
description = "Annotate AST trees with source code positions"
|
38 |
+
category = "main"
|
39 |
+
optional = false
|
40 |
+
python-versions = "*"
|
41 |
+
|
42 |
+
[package.dependencies]
|
43 |
+
six = "*"
|
44 |
+
|
45 |
+
[package.extras]
|
46 |
+
test = ["astroid (<=2.5.3)", "pytest"]
|
47 |
+
|
48 |
+
[[package]]
|
49 |
+
name = "attrs"
|
50 |
+
version = "22.1.0"
|
51 |
+
description = "Classes Without Boilerplate"
|
52 |
+
category = "dev"
|
53 |
+
optional = false
|
54 |
+
python-versions = ">=3.5"
|
55 |
+
|
56 |
+
[package.extras]
|
57 |
+
dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"]
|
58 |
+
docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
|
59 |
+
tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"]
|
60 |
+
tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"]
|
61 |
+
|
62 |
+
[[package]]
|
63 |
+
name = "black"
|
64 |
+
version = "22.8.0"
|
65 |
+
description = "The uncompromising code formatter."
|
66 |
+
category = "dev"
|
67 |
+
optional = false
|
68 |
+
python-versions = ">=3.6.2"
|
69 |
+
|
70 |
+
[package.dependencies]
|
71 |
+
click = ">=8.0.0"
|
72 |
+
mypy-extensions = ">=0.4.3"
|
73 |
+
pathspec = ">=0.9.0"
|
74 |
+
platformdirs = ">=2"
|
75 |
+
tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""}
|
76 |
+
typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}
|
77 |
+
|
78 |
+
[package.extras]
|
79 |
+
colorama = ["colorama (>=0.4.3)"]
|
80 |
+
d = ["aiohttp (>=3.7.4)"]
|
81 |
+
jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]
|
82 |
+
uvloop = ["uvloop (>=0.15.2)"]
|
83 |
+
|
84 |
+
[[package]]
|
85 |
+
name = "certifi"
|
86 |
+
version = "2022.6.15"
|
87 |
+
description = "Python package for providing Mozilla's CA Bundle."
|
88 |
+
category = "main"
|
89 |
+
optional = false
|
90 |
+
python-versions = ">=3.6"
|
91 |
+
|
92 |
+
[[package]]
|
93 |
+
name = "click"
|
94 |
+
version = "8.1.3"
|
95 |
+
description = "Composable command line interface toolkit"
|
96 |
+
category = "main"
|
97 |
+
optional = false
|
98 |
+
python-versions = ">=3.7"
|
99 |
+
|
100 |
+
[package.dependencies]
|
101 |
+
colorama = {version = "*", markers = "platform_system == \"Windows\""}
|
102 |
+
|
103 |
+
[[package]]
|
104 |
+
name = "colorama"
|
105 |
+
version = "0.4.5"
|
106 |
+
description = "Cross-platform colored terminal text."
|
107 |
+
category = "main"
|
108 |
+
optional = false
|
109 |
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
110 |
+
|
111 |
+
[[package]]
|
112 |
+
name = "dill"
|
113 |
+
version = "0.3.5.1"
|
114 |
+
description = "serialize all of python"
|
115 |
+
category = "dev"
|
116 |
+
optional = false
|
117 |
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*"
|
118 |
+
|
119 |
+
[package.extras]
|
120 |
+
graph = ["objgraph (>=1.7.2)"]
|
121 |
+
|
122 |
+
[[package]]
|
123 |
+
name = "environs"
|
124 |
+
version = "9.5.0"
|
125 |
+
description = "simplified environment variable parsing"
|
126 |
+
category = "main"
|
127 |
+
optional = false
|
128 |
+
python-versions = ">=3.6"
|
129 |
+
|
130 |
+
[package.dependencies]
|
131 |
+
marshmallow = ">=3.0.0"
|
132 |
+
python-dotenv = "*"
|
133 |
+
|
134 |
+
[package.extras]
|
135 |
+
dev = ["pytest", "dj-database-url", "dj-email-url", "django-cache-url", "flake8 (==4.0.1)", "flake8-bugbear (==21.9.2)", "mypy (==0.910)", "pre-commit (>=2.4,<3.0)", "tox"]
|
136 |
+
django = ["dj-database-url", "dj-email-url", "django-cache-url"]
|
137 |
+
lint = ["flake8 (==4.0.1)", "flake8-bugbear (==21.9.2)", "mypy (==0.910)", "pre-commit (>=2.4,<3.0)"]
|
138 |
+
tests = ["pytest", "dj-database-url", "dj-email-url", "django-cache-url"]
|
139 |
+
|
140 |
+
[[package]]
|
141 |
+
name = "executing"
|
142 |
+
version = "1.0.0"
|
143 |
+
description = "Get the currently executing AST node of a frame, and other information"
|
144 |
+
category = "main"
|
145 |
+
optional = false
|
146 |
+
python-versions = "*"
|
147 |
+
|
148 |
+
[[package]]
|
149 |
+
name = "flake8"
|
150 |
+
version = "3.9.2"
|
151 |
+
description = "the modular source code checker: pep8 pyflakes and co"
|
152 |
+
category = "dev"
|
153 |
+
optional = false
|
154 |
+
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
|
155 |
+
|
156 |
+
[package.dependencies]
|
157 |
+
mccabe = ">=0.6.0,<0.7.0"
|
158 |
+
pycodestyle = ">=2.7.0,<2.8.0"
|
159 |
+
pyflakes = ">=2.3.0,<2.4.0"
|
160 |
+
|
161 |
+
[[package]]
|
162 |
+
name = "h11"
|
163 |
+
version = "0.12.0"
|
164 |
+
description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
|
165 |
+
category = "main"
|
166 |
+
optional = false
|
167 |
+
python-versions = ">=3.6"
|
168 |
+
|
169 |
+
[[package]]
|
170 |
+
name = "httpcore"
|
171 |
+
version = "0.15.0"
|
172 |
+
description = "A minimal low-level HTTP client."
|
173 |
+
category = "main"
|
174 |
+
optional = false
|
175 |
+
python-versions = ">=3.7"
|
176 |
+
|
177 |
+
[package.dependencies]
|
178 |
+
anyio = ">=3.0.0,<4.0.0"
|
179 |
+
certifi = "*"
|
180 |
+
h11 = ">=0.11,<0.13"
|
181 |
+
sniffio = ">=1.0.0,<2.0.0"
|
182 |
+
|
183 |
+
[package.extras]
|
184 |
+
http2 = ["h2 (>=3,<5)"]
|
185 |
+
socks = ["socksio (>=1.0.0,<2.0.0)"]
|
186 |
+
|
187 |
+
[[package]]
|
188 |
+
name = "httpx"
|
189 |
+
version = "0.23.0"
|
190 |
+
description = "The next generation HTTP client."
|
191 |
+
category = "main"
|
192 |
+
optional = false
|
193 |
+
python-versions = ">=3.7"
|
194 |
+
|
195 |
+
[package.dependencies]
|
196 |
+
certifi = "*"
|
197 |
+
httpcore = ">=0.15.0,<0.16.0"
|
198 |
+
rfc3986 = {version = ">=1.3,<2", extras = ["idna2008"]}
|
199 |
+
sniffio = "*"
|
200 |
+
|
201 |
+
[package.extras]
|
202 |
+
brotli = ["brotlicffi", "brotli"]
|
203 |
+
cli = ["click (>=8.0.0,<9.0.0)", "rich (>=10,<13)", "pygments (>=2.0.0,<3.0.0)"]
|
204 |
+
http2 = ["h2 (>=3,<5)"]
|
205 |
+
socks = ["socksio (>=1.0.0,<2.0.0)"]
|
206 |
+
|
207 |
+
[[package]]
|
208 |
+
name = "icecream"
|
209 |
+
version = "2.1.3"
|
210 |
+
description = "Never use print() to debug again; inspect variables, expressions, and program execution with a single, simple function call."
|
211 |
+
category = "main"
|
212 |
+
optional = false
|
213 |
+
python-versions = "*"
|
214 |
+
|
215 |
+
[package.dependencies]
|
216 |
+
asttokens = ">=2.0.1"
|
217 |
+
colorama = ">=0.3.9"
|
218 |
+
executing = ">=0.3.1"
|
219 |
+
pygments = ">=2.2.0"
|
220 |
+
|
221 |
+
[[package]]
|
222 |
+
name = "idna"
|
223 |
+
version = "3.3"
|
224 |
+
description = "Internationalized Domain Names in Applications (IDNA)"
|
225 |
+
category = "main"
|
226 |
+
optional = false
|
227 |
+
python-versions = ">=3.5"
|
228 |
+
|
229 |
+
[[package]]
|
230 |
+
name = "iniconfig"
|
231 |
+
version = "1.1.1"
|
232 |
+
description = "iniconfig: brain-dead simple config-ini parsing"
|
233 |
+
category = "dev"
|
234 |
+
optional = false
|
235 |
+
python-versions = "*"
|
236 |
+
|
237 |
+
[[package]]
|
238 |
+
name = "install"
|
239 |
+
version = "1.3.5"
|
240 |
+
description = "Install packages from within code"
|
241 |
+
category = "main"
|
242 |
+
optional = false
|
243 |
+
python-versions = ">=2.7, >=3.5"
|
244 |
+
|
245 |
+
[[package]]
|
246 |
+
name = "isort"
|
247 |
+
version = "5.10.1"
|
248 |
+
description = "A Python utility / library to sort Python imports."
|
249 |
+
category = "dev"
|
250 |
+
optional = false
|
251 |
+
python-versions = ">=3.6.1,<4.0"
|
252 |
+
|
253 |
+
[package.extras]
|
254 |
+
pipfile_deprecated_finder = ["pipreqs", "requirementslib"]
|
255 |
+
requirements_deprecated_finder = ["pipreqs", "pip-api"]
|
256 |
+
colors = ["colorama (>=0.4.3,<0.5.0)"]
|
257 |
+
plugins = ["setuptools"]
|
258 |
+
|
259 |
+
[[package]]
|
260 |
+
name = "lazy-object-proxy"
|
261 |
+
version = "1.7.1"
|
262 |
+
description = "A fast and thorough lazy object proxy."
|
263 |
+
category = "dev"
|
264 |
+
optional = false
|
265 |
+
python-versions = ">=3.6"
|
266 |
+
|
267 |
+
[[package]]
|
268 |
+
name = "logzero"
|
269 |
+
version = "1.7.0"
|
270 |
+
description = "Robust and effective logging for Python 2 and 3"
|
271 |
+
category = "main"
|
272 |
+
optional = false
|
273 |
+
python-versions = "*"
|
274 |
+
|
275 |
+
[package.dependencies]
|
276 |
+
colorama = {version = "*", markers = "sys_platform == \"win32\""}
|
277 |
+
|
278 |
+
[[package]]
|
279 |
+
name = "marshmallow"
|
280 |
+
version = "3.17.1"
|
281 |
+
description = "A lightweight library for converting complex datatypes to and from native Python datatypes."
|
282 |
+
category = "main"
|
283 |
+
optional = false
|
284 |
+
python-versions = ">=3.7"
|
285 |
+
|
286 |
+
[package.dependencies]
|
287 |
+
packaging = ">=17.0"
|
288 |
+
|
289 |
+
[package.extras]
|
290 |
+
dev = ["pytest", "pytz", "simplejson", "mypy (==0.971)", "flake8 (==5.0.4)", "flake8-bugbear (==22.8.22)", "pre-commit (>=2.4,<3.0)", "tox"]
|
291 |
+
docs = ["sphinx (==5.1.1)", "sphinx-issues (==3.0.1)", "alabaster (==0.7.12)", "sphinx-version-warning (==1.1.2)", "autodocsumm (==0.2.9)"]
|
292 |
+
lint = ["mypy (==0.971)", "flake8 (==5.0.4)", "flake8-bugbear (==22.8.22)", "pre-commit (>=2.4,<3.0)"]
|
293 |
+
tests = ["pytest", "pytz", "simplejson"]
|
294 |
+
|
295 |
+
[[package]]
|
296 |
+
name = "mccabe"
|
297 |
+
version = "0.6.1"
|
298 |
+
description = "McCabe checker, plugin for flake8"
|
299 |
+
category = "dev"
|
300 |
+
optional = false
|
301 |
+
python-versions = "*"
|
302 |
+
|
303 |
+
[[package]]
|
304 |
+
name = "mypy-extensions"
|
305 |
+
version = "0.4.3"
|
306 |
+
description = "Experimental type system extensions for programs checked with the mypy typechecker."
|
307 |
+
category = "dev"
|
308 |
+
optional = false
|
309 |
+
python-versions = "*"
|
310 |
+
|
311 |
+
[[package]]
|
312 |
+
name = "nodeenv"
|
313 |
+
version = "1.7.0"
|
314 |
+
description = "Node.js virtual environment builder"
|
315 |
+
category = "dev"
|
316 |
+
optional = false
|
317 |
+
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*"
|
318 |
+
|
319 |
+
[[package]]
|
320 |
+
name = "packaging"
|
321 |
+
version = "21.3"
|
322 |
+
description = "Core utilities for Python packages"
|
323 |
+
category = "main"
|
324 |
+
optional = false
|
325 |
+
python-versions = ">=3.6"
|
326 |
+
|
327 |
+
[package.dependencies]
|
328 |
+
pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
|
329 |
+
|
330 |
+
[[package]]
|
331 |
+
name = "pastel"
|
332 |
+
version = "0.2.1"
|
333 |
+
description = "Bring colors to your terminal."
|
334 |
+
category = "dev"
|
335 |
+
optional = false
|
336 |
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
337 |
+
|
338 |
+
[[package]]
|
339 |
+
name = "pathspec"
|
340 |
+
version = "0.10.1"
|
341 |
+
description = "Utility library for gitignore style pattern matching of file paths."
|
342 |
+
category = "dev"
|
343 |
+
optional = false
|
344 |
+
python-versions = ">=3.7"
|
345 |
+
|
346 |
+
[[package]]
|
347 |
+
name = "platformdirs"
|
348 |
+
version = "2.5.2"
|
349 |
+
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
|
350 |
+
category = "dev"
|
351 |
+
optional = false
|
352 |
+
python-versions = ">=3.7"
|
353 |
+
|
354 |
+
[package.extras]
|
355 |
+
docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"]
|
356 |
+
test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"]
|
357 |
+
|
358 |
+
[[package]]
|
359 |
+
name = "pluggy"
|
360 |
+
version = "1.0.0"
|
361 |
+
description = "plugin and hook calling mechanisms for python"
|
362 |
+
category = "dev"
|
363 |
+
optional = false
|
364 |
+
python-versions = ">=3.6"
|
365 |
+
|
366 |
+
[package.extras]
|
367 |
+
testing = ["pytest-benchmark", "pytest"]
|
368 |
+
dev = ["tox", "pre-commit"]
|
369 |
+
|
370 |
+
[[package]]
|
371 |
+
name = "poethepoet"
|
372 |
+
version = "0.10.0"
|
373 |
+
description = "A task runner that works well with poetry."
|
374 |
+
category = "dev"
|
375 |
+
optional = false
|
376 |
+
python-versions = ">=3.6,<4.0"
|
377 |
+
|
378 |
+
[package.dependencies]
|
379 |
+
pastel = ">=0.2.0,<0.3.0"
|
380 |
+
tomlkit = ">=0.6.0,<1.0.0"
|
381 |
+
|
382 |
+
[[package]]
|
383 |
+
name = "py"
|
384 |
+
version = "1.11.0"
|
385 |
+
description = "library with cross-python path, ini-parsing, io, code, log facilities"
|
386 |
+
category = "dev"
|
387 |
+
optional = false
|
388 |
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
389 |
+
|
390 |
+
[[package]]
|
391 |
+
name = "pycodestyle"
|
392 |
+
version = "2.7.0"
|
393 |
+
description = "Python style guide checker"
|
394 |
+
category = "dev"
|
395 |
+
optional = false
|
396 |
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
397 |
+
|
398 |
+
[[package]]
|
399 |
+
name = "pydocstyle"
|
400 |
+
version = "6.1.1"
|
401 |
+
description = "Python docstring style checker"
|
402 |
+
category = "dev"
|
403 |
+
optional = false
|
404 |
+
python-versions = ">=3.6"
|
405 |
+
|
406 |
+
[package.dependencies]
|
407 |
+
snowballstemmer = "*"
|
408 |
+
|
409 |
+
[package.extras]
|
410 |
+
toml = ["toml"]
|
411 |
+
|
412 |
+
[[package]]
|
413 |
+
name = "pyflakes"
|
414 |
+
version = "2.3.1"
|
415 |
+
description = "passive checker of Python programs"
|
416 |
+
category = "dev"
|
417 |
+
optional = false
|
418 |
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
419 |
+
|
420 |
+
[[package]]
|
421 |
+
name = "pygments"
|
422 |
+
version = "2.13.0"
|
423 |
+
description = "Pygments is a syntax highlighting package written in Python."
|
424 |
+
category = "main"
|
425 |
+
optional = false
|
426 |
+
python-versions = ">=3.6"
|
427 |
+
|
428 |
+
[package.extras]
|
429 |
+
plugins = ["importlib-metadata"]
|
430 |
+
|
431 |
+
[[package]]
|
432 |
+
name = "pylint"
|
433 |
+
version = "2.15.2"
|
434 |
+
description = "python code static checker"
|
435 |
+
category = "dev"
|
436 |
+
optional = false
|
437 |
+
python-versions = ">=3.7.2"
|
438 |
+
|
439 |
+
[package.dependencies]
|
440 |
+
astroid = ">=2.12.9,<=2.14.0-dev0"
|
441 |
+
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
|
442 |
+
dill = ">=0.2"
|
443 |
+
isort = ">=4.2.5,<6"
|
444 |
+
mccabe = ">=0.6,<0.8"
|
445 |
+
platformdirs = ">=2.2.0"
|
446 |
+
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
|
447 |
+
tomlkit = ">=0.10.1"
|
448 |
+
typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""}
|
449 |
+
|
450 |
+
[package.extras]
|
451 |
+
spelling = ["pyenchant (>=3.2,<4.0)"]
|
452 |
+
testutils = ["gitpython (>3)"]
|
453 |
+
|
454 |
+
[[package]]
|
455 |
+
name = "pyparsing"
|
456 |
+
version = "3.0.9"
|
457 |
+
description = "pyparsing module - Classes and methods to define and execute parsing grammars"
|
458 |
+
category = "main"
|
459 |
+
optional = false
|
460 |
+
python-versions = ">=3.6.8"
|
461 |
+
|
462 |
+
[package.extras]
|
463 |
+
diagrams = ["railroad-diagrams", "jinja2"]
|
464 |
+
|
465 |
+
[[package]]
|
466 |
+
name = "pyright"
|
467 |
+
version = "1.1.270"
|
468 |
+
description = "Command line wrapper for pyright"
|
469 |
+
category = "dev"
|
470 |
+
optional = false
|
471 |
+
python-versions = ">=3.7"
|
472 |
+
|
473 |
+
[package.dependencies]
|
474 |
+
nodeenv = ">=1.6.0"
|
475 |
+
|
476 |
+
[package.extras]
|
477 |
+
all = ["twine (>=3.4.1)"]
|
478 |
+
dev = ["twine (>=3.4.1)"]
|
479 |
+
|
480 |
+
[[package]]
|
481 |
+
name = "pytest"
|
482 |
+
version = "7.1.3"
|
483 |
+
description = "pytest: simple powerful testing with Python"
|
484 |
+
category = "dev"
|
485 |
+
optional = false
|
486 |
+
python-versions = ">=3.7"
|
487 |
+
|
488 |
+
[package.dependencies]
|
489 |
+
attrs = ">=19.2.0"
|
490 |
+
colorama = {version = "*", markers = "sys_platform == \"win32\""}
|
491 |
+
iniconfig = "*"
|
492 |
+
packaging = "*"
|
493 |
+
pluggy = ">=0.12,<2.0"
|
494 |
+
py = ">=1.8.2"
|
495 |
+
tomli = ">=1.0.0"
|
496 |
+
|
497 |
+
[package.extras]
|
498 |
+
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
|
499 |
+
|
500 |
+
[[package]]
|
501 |
+
name = "python-dotenv"
|
502 |
+
version = "0.21.0"
|
503 |
+
description = "Read key-value pairs from a .env file and set them as environment variables"
|
504 |
+
category = "main"
|
505 |
+
optional = false
|
506 |
+
python-versions = ">=3.7"
|
507 |
+
|
508 |
+
[package.extras]
|
509 |
+
cli = ["click (>=5.0)"]
|
510 |
+
|
511 |
+
[[package]]
|
512 |
+
name = "rfc3986"
|
513 |
+
version = "1.5.0"
|
514 |
+
description = "Validating URI References per RFC 3986"
|
515 |
+
category = "main"
|
516 |
+
optional = false
|
517 |
+
python-versions = "*"
|
518 |
+
|
519 |
+
[package.dependencies]
|
520 |
+
idna = {version = "*", optional = true, markers = "extra == \"idna2008\""}
|
521 |
+
|
522 |
+
[package.extras]
|
523 |
+
idna2008 = ["idna"]
|
524 |
+
|
525 |
+
[[package]]
|
526 |
+
name = "set-loglevel"
|
527 |
+
version = "0.1.2"
|
528 |
+
description = "Return a loglevel (10, 20, etc.) taking ENV LOGLEVEL into account"
|
529 |
+
category = "main"
|
530 |
+
optional = false
|
531 |
+
python-versions = ">=3.8.3,<4.0.0"
|
532 |
+
|
533 |
+
[package.dependencies]
|
534 |
+
environs = ">=9.5.0,<10.0.0"
|
535 |
+
logzero = ">=1.7.0,<2.0.0"
|
536 |
+
|
537 |
+
[[package]]
|
538 |
+
name = "six"
|
539 |
+
version = "1.16.0"
|
540 |
+
description = "Python 2 and 3 compatibility utilities"
|
541 |
+
category = "main"
|
542 |
+
optional = false
|
543 |
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
|
544 |
+
|
545 |
+
[[package]]
|
546 |
+
name = "sniffio"
|
547 |
+
version = "1.3.0"
|
548 |
+
description = "Sniff out which async library your code is running under"
|
549 |
+
category = "main"
|
550 |
+
optional = false
|
551 |
+
python-versions = ">=3.7"
|
552 |
+
|
553 |
+
[[package]]
|
554 |
+
name = "snowballstemmer"
|
555 |
+
version = "2.2.0"
|
556 |
+
description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms."
|
557 |
+
category = "dev"
|
558 |
+
optional = false
|
559 |
+
python-versions = "*"
|
560 |
+
|
561 |
+
[[package]]
|
562 |
+
name = "toml"
|
563 |
+
version = "0.10.2"
|
564 |
+
description = "Python Library for Tom's Obvious, Minimal Language"
|
565 |
+
category = "dev"
|
566 |
+
optional = false
|
567 |
+
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
|
568 |
+
|
569 |
+
[[package]]
|
570 |
+
name = "tomli"
|
571 |
+
version = "2.0.1"
|
572 |
+
description = "A lil' TOML parser"
|
573 |
+
category = "dev"
|
574 |
+
optional = false
|
575 |
+
python-versions = ">=3.7"
|
576 |
+
|
577 |
+
[[package]]
|
578 |
+
name = "tomlkit"
|
579 |
+
version = "0.11.4"
|
580 |
+
description = "Style preserving TOML library"
|
581 |
+
category = "dev"
|
582 |
+
optional = false
|
583 |
+
python-versions = ">=3.6,<4.0"
|
584 |
+
|
585 |
+
[[package]]
|
586 |
+
name = "typer"
|
587 |
+
version = "0.4.2"
|
588 |
+
description = "Typer, build great CLIs. Easy to code. Based on Python type hints."
|
589 |
+
category = "main"
|
590 |
+
optional = false
|
591 |
+
python-versions = ">=3.6"
|
592 |
+
|
593 |
+
[package.dependencies]
|
594 |
+
click = ">=7.1.1,<9.0.0"
|
595 |
+
|
596 |
+
[package.extras]
|
597 |
+
test = ["isort (>=5.0.6,<6.0.0)", "black (>=22.3.0,<23.0.0)", "mypy (==0.910)", "pytest-sugar (>=0.9.4,<0.10.0)", "pytest-xdist (>=1.32.0,<2.0.0)", "coverage (>=5.2,<6.0)", "pytest-cov (>=2.10.0,<3.0.0)", "pytest (>=4.4.0,<5.4.0)", "shellingham (>=1.3.0,<2.0.0)"]
|
598 |
+
doc = ["mdx-include (>=1.4.1,<2.0.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "mkdocs (>=1.1.2,<2.0.0)"]
|
599 |
+
dev = ["pre-commit (>=2.17.0,<3.0.0)", "flake8 (>=3.8.3,<4.0.0)", "autoflake (>=1.3.1,<2.0.0)"]
|
600 |
+
all = ["shellingham (>=1.3.0,<2.0.0)", "colorama (>=0.4.3,<0.5.0)"]
|
601 |
+
|
602 |
+
[[package]]
|
603 |
+
name = "typing-extensions"
|
604 |
+
version = "4.3.0"
|
605 |
+
description = "Backported and Experimental Type Hints for Python 3.7+"
|
606 |
+
category = "dev"
|
607 |
+
optional = false
|
608 |
+
python-versions = ">=3.7"
|
609 |
+
|
610 |
+
[[package]]
|
611 |
+
name = "wrapt"
|
612 |
+
version = "1.14.1"
|
613 |
+
description = "Module for decorators, wrappers and monkey patching."
|
614 |
+
category = "dev"
|
615 |
+
optional = false
|
616 |
+
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
|
617 |
+
|
618 |
+
[metadata]
|
619 |
+
lock-version = "1.1"
|
620 |
+
python-versions = "^3.8.3"
|
621 |
+
content-hash = "aa3863d0a6bedb4652a0f68391b7f5d8edd905acbe500c1fac47df5a49df6c7e"
|
622 |
+
|
623 |
+
[metadata.files]
|
624 |
+
anyio = []
|
625 |
+
astroid = []
|
626 |
+
asttokens = []
|
627 |
+
attrs = []
|
628 |
+
black = []
|
629 |
+
certifi = []
|
630 |
+
click = []
|
631 |
+
colorama = []
|
632 |
+
dill = []
|
633 |
+
environs = []
|
634 |
+
executing = []
|
635 |
+
flake8 = []
|
636 |
+
h11 = []
|
637 |
+
httpcore = []
|
638 |
+
httpx = []
|
639 |
+
icecream = []
|
640 |
+
idna = []
|
641 |
+
iniconfig = []
|
642 |
+
install = []
|
643 |
+
isort = []
|
644 |
+
lazy-object-proxy = []
|
645 |
+
logzero = []
|
646 |
+
marshmallow = []
|
647 |
+
mccabe = []
|
648 |
+
mypy-extensions = []
|
649 |
+
nodeenv = []
|
650 |
+
packaging = []
|
651 |
+
pastel = []
|
652 |
+
pathspec = []
|
653 |
+
platformdirs = []
|
654 |
+
pluggy = []
|
655 |
+
poethepoet = []
|
656 |
+
py = []
|
657 |
+
pycodestyle = []
|
658 |
+
pydocstyle = []
|
659 |
+
pyflakes = []
|
660 |
+
pygments = []
|
661 |
+
pylint = []
|
662 |
+
pyparsing = []
|
663 |
+
pyright = []
|
664 |
+
pytest = []
|
665 |
+
python-dotenv = []
|
666 |
+
rfc3986 = []
|
667 |
+
set-loglevel = []
|
668 |
+
six = []
|
669 |
+
sniffio = []
|
670 |
+
snowballstemmer = []
|
671 |
+
toml = []
|
672 |
+
tomli = []
|
673 |
+
tomlkit = []
|
674 |
+
typer = []
|
675 |
+
typing-extensions = []
|
676 |
+
wrapt = []
|
pyproject.toml
CHANGED
@@ -14,6 +14,7 @@ set-loglevel = "^0.1.2"
|
|
14 |
typer = "^0.4.1"
|
15 |
icecream = "^2.1.1"
|
16 |
install = "^1.3.5"
|
|
|
17 |
|
18 |
[tool.poe.executor]
|
19 |
type = "poetry"
|
14 |
typer = "^0.4.1"
|
15 |
icecream = "^2.1.1"
|
16 |
install = "^1.3.5"
|
17 |
+
httpx = "^0.23.0"
|
18 |
|
19 |
[tool.poe.executor]
|
20 |
type = "poetry"
|