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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plash_cli
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: CLI for the Plash hosting service
5
5
  Home-page: https://github.com/AnswerDotAI/plash_cli
6
6
  Author: Jeremy Howard
@@ -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 27
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 29
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 31
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 33
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 35
224
+ # %% ../nbs/00_core.ipynb 34
225
225
  log_modes = str_enum('log_modes', 'build', 'app')
226
226
 
227
- # %% ../nbs/00_core.ipynb 36
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 38
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 40
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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plash_cli
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: CLI for the Plash hosting service
5
5
  Home-page: https://github.com/AnswerDotAI/plash_cli
6
6
  Author: Jeremy Howard
@@ -2,7 +2,7 @@
2
2
  jupyter_hooks = False
3
3
  repo = plash_cli
4
4
  lib_name = plash_cli
5
- version = 0.2.1
5
+ version = 0.2.2
6
6
  min_python = 3.11
7
7
  license = apache2
8
8
  black_formatting = False
@@ -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