plash-cli 0.2.1__tar.gz → 0.2.2__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.
- {plash_cli-0.2.1/plash_cli.egg-info → plash_cli-0.2.2}/PKG-INFO +1 -1
- plash_cli-0.2.2/plash_cli/__init__.py +1 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/plash_cli/core.py +9 -9
- {plash_cli-0.2.1 → plash_cli-0.2.2/plash_cli.egg-info}/PKG-INFO +1 -1
- {plash_cli-0.2.1 → plash_cli-0.2.2}/settings.ini +1 -1
- plash_cli-0.2.1/plash_cli/__init__.py +0 -1
- {plash_cli-0.2.1 → plash_cli-0.2.2}/LICENSE +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/MANIFEST.in +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/README.md +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/plash_cli/_bash_magic.py +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/plash_cli/_modidx.py +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/plash_cli.egg-info/SOURCES.txt +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/plash_cli.egg-info/dependency_links.txt +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/plash_cli.egg-info/entry_points.txt +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/plash_cli.egg-info/not-zip-safe +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/plash_cli.egg-info/requires.txt +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/plash_cli.egg-info/top_level.txt +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/pyproject.toml +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/setup.cfg +0 -0
- {plash_cli-0.2.1 → plash_cli-0.2.2}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.2"
|
|
@@ -110,7 +110,7 @@ def validate_app(path):
|
|
|
110
110
|
"Validates directory `path` is a deployable Plash app"
|
|
111
111
|
if not (path / 'main.py').exists():
|
|
112
112
|
raise PlashError('A Plash app requires a main.py file.')
|
|
113
|
-
deps = _deps((path / 'main.py').read_text())
|
|
113
|
+
deps = _deps((path / 'main.py').read_text(encoding='utf-8'))
|
|
114
114
|
if deps and (path/"requirements.txt").exists():
|
|
115
115
|
raise PlashError('A Plash app should not contain both a requirements.txt file and inline dependencies (see PEP723).')
|
|
116
116
|
|
|
@@ -137,7 +137,7 @@ def _gen_app_name():
|
|
|
137
137
|
suffix = ''.join(random.choices(string.ascii_lowercase + string.digits, k=3))
|
|
138
138
|
return f"{random.choice(adjectives)}-{random.choice(nouns)}-{random.choice(verbs)}-{suffix}"
|
|
139
139
|
|
|
140
|
-
# %% ../nbs/00_core.ipynb
|
|
140
|
+
# %% ../nbs/00_core.ipynb 26
|
|
141
141
|
@call_parse
|
|
142
142
|
def deploy(
|
|
143
143
|
path:Path=Path('.'), # Path to project
|
|
@@ -170,7 +170,7 @@ def deploy(
|
|
|
170
170
|
print(f'It will be live at {name if "." in name else endpoint(sub=name)}')
|
|
171
171
|
else: print(f'Failure: {resp.status_code}\n{resp.text}')
|
|
172
172
|
|
|
173
|
-
# %% ../nbs/00_core.ipynb
|
|
173
|
+
# %% ../nbs/00_core.ipynb 28
|
|
174
174
|
@call_parse
|
|
175
175
|
def view(
|
|
176
176
|
path:Path=Path('.'), # Path to project directory
|
|
@@ -182,7 +182,7 @@ def view(
|
|
|
182
182
|
print(f"Opening browser to view app :\n{url}\n")
|
|
183
183
|
webbrowser.open(url)
|
|
184
184
|
|
|
185
|
-
# %% ../nbs/00_core.ipynb
|
|
185
|
+
# %% ../nbs/00_core.ipynb 30
|
|
186
186
|
@call_parse
|
|
187
187
|
def delete(
|
|
188
188
|
path:Path=Path('.'), # Path to project
|
|
@@ -200,7 +200,7 @@ def delete(
|
|
|
200
200
|
r = mk_auth_req(endpoint(rt=f"/delete?name={name}"), "delete")
|
|
201
201
|
return r.text
|
|
202
202
|
|
|
203
|
-
# %% ../nbs/00_core.ipynb
|
|
203
|
+
# %% ../nbs/00_core.ipynb 32
|
|
204
204
|
def endpoint_func(endpoint_name):
|
|
205
205
|
'Creates a function for a specific API endpoint'
|
|
206
206
|
def func(
|
|
@@ -221,10 +221,10 @@ def endpoint_func(endpoint_name):
|
|
|
221
221
|
stop = endpoint_func('/stop')
|
|
222
222
|
start = endpoint_func('/start')
|
|
223
223
|
|
|
224
|
-
# %% ../nbs/00_core.ipynb
|
|
224
|
+
# %% ../nbs/00_core.ipynb 34
|
|
225
225
|
log_modes = str_enum('log_modes', 'build', 'app')
|
|
226
226
|
|
|
227
|
-
# %% ../nbs/00_core.ipynb
|
|
227
|
+
# %% ../nbs/00_core.ipynb 35
|
|
228
228
|
@call_parse
|
|
229
229
|
def logs(
|
|
230
230
|
path:Path=Path('.'), # Path to project
|
|
@@ -250,7 +250,7 @@ def logs(
|
|
|
250
250
|
r = mk_auth_req(endpoint(rt=f"/logs?name={name}&mode={mode}"))
|
|
251
251
|
return r.text
|
|
252
252
|
|
|
253
|
-
# %% ../nbs/00_core.ipynb
|
|
253
|
+
# %% ../nbs/00_core.ipynb 37
|
|
254
254
|
@call_parse
|
|
255
255
|
def download(
|
|
256
256
|
path:Path=Path('.'), # Path to project
|
|
@@ -266,7 +266,7 @@ def download(
|
|
|
266
266
|
with tarfile.open(fileobj=file_bytes, mode="r:gz") as tar: tar.extractall(path=save_path)
|
|
267
267
|
print(f"Downloaded your app to: {save_path}")
|
|
268
268
|
|
|
269
|
-
# %% ../nbs/00_core.ipynb
|
|
269
|
+
# %% ../nbs/00_core.ipynb 39
|
|
270
270
|
@call_parse
|
|
271
271
|
def apps(verbose:bool=False):
|
|
272
272
|
"List your deployed apps (verbose shows status table: 1=running, 0=stopped)"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|