plash-cli 0.2.0__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.0
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
@@ -10,14 +10,10 @@ Keywords: nbdev jupyter notebook python
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Natural Language :: English
13
- Classifier: Programming Language :: Python :: 3.7
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
13
  Classifier: Programming Language :: Python :: 3.11
18
14
  Classifier: Programming Language :: Python :: 3.12
19
15
  Classifier: License :: OSI Approved :: Apache Software License
20
- Requires-Python: >=3.7
16
+ Requires-Python: >=3.11
21
17
  Description-Content-Type: text/markdown
22
18
  License-File: LICENSE
23
19
  Requires-Dist: fastcore
@@ -135,8 +131,8 @@ other popular python frameworks.
135
131
 
136
132
  > [!WARNING]
137
133
  >
138
- > Your app must run on port `5001` which is the default port for
139
- > FastHTML apps.
134
+ > Your app must use port 5001, as this is the port exposed by Plash’s
135
+ > Docker container. It also happens to be the default for FastHTML apps.
140
136
 
141
137
  And create the `requirements.txt` file:
142
138
 
@@ -94,8 +94,8 @@ other popular python frameworks.
94
94
 
95
95
  > [!WARNING]
96
96
  >
97
- > Your app must run on port `5001` which is the default port for
98
- > FastHTML apps.
97
+ > Your app must use port 5001, as this is the port exposed by Plash’s
98
+ > Docker container. It also happens to be the default for FastHTML apps.
99
99
 
100
100
  And create the `requirements.txt` file:
101
101
 
@@ -0,0 +1 @@
1
+ __version__ = "0.2.2"
@@ -110,11 +110,11 @@ 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
 
117
- # %% ../nbs/00_core.ipynb 23
117
+ # %% ../nbs/00_core.ipynb 24
118
118
  def create_tar_archive(path:Path, force_data:bool=False) -> tuple[io.BytesIO, int]:
119
119
  "Creates a tar archive of a directory, excluding files based on is_included"
120
120
  tarz = io.BytesIO()
@@ -143,7 +143,12 @@ def deploy(
143
143
  path:Path=Path('.'), # Path to project
144
144
  name:str=None, # Overrides the .plash file in project root if provided
145
145
  force_data:bool=False): # Overwrite data/ directory during deployment
146
- "Deploy app to production, ignores paths starting with '.', excludes data/ directory by default unless --force_data is used."
146
+ """
147
+ Deploys app to production. By default, this command erases all files in your app which are not in data/.
148
+ Then uploads all files and folders, except paths starting with '.' and except the local data/ directory.
149
+ If `--force data` is used, then it erases all files in production. Then it uploads all files and folders,
150
+ including `data/`, except paths starting with '.'.
151
+ """
147
152
  print('Initializing deployment...')
148
153
  if name == '': print('Error: App name cannot be an empty string'); return
149
154
  if not path.is_dir(): print("Error: Path should point to the project directory"); return
@@ -162,7 +167,7 @@ def deploy(
162
167
  data={'name': name, 'force_data': force_data})
163
168
  if resp.status_code == 200:
164
169
  print('✅ Upload complete! Your app is currently being built.')
165
- print(f'It will be live at {name if '.' in name else endpoint(sub=name)}')
170
+ print(f'It will be live at {name if "." in name else endpoint(sub=name)}')
166
171
  else: print(f'Failure: {resp.status_code}\n{resp.text}')
167
172
 
168
173
  # %% ../nbs/00_core.ipynb 28
@@ -268,5 +273,5 @@ def apps(verbose:bool=False):
268
273
  r = mk_auth_req(endpoint(rt="/user_apps")).raise_for_status()
269
274
  apps = r.json()
270
275
  if not apps: return "You don't have any deployed Plash apps."
271
- if verbose: [print(f'{a['running']} {a['name']}') for a in apps]
276
+ if verbose: [print(f"{a['running']} {a['name']}") for a in apps]
272
277
  else: [print(a['name']) for a in apps]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plash_cli
3
- Version: 0.2.0
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
@@ -10,14 +10,10 @@ Keywords: nbdev jupyter notebook python
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Natural Language :: English
13
- Classifier: Programming Language :: Python :: 3.7
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
13
  Classifier: Programming Language :: Python :: 3.11
18
14
  Classifier: Programming Language :: Python :: 3.12
19
15
  Classifier: License :: OSI Approved :: Apache Software License
20
- Requires-Python: >=3.7
16
+ Requires-Python: >=3.11
21
17
  Description-Content-Type: text/markdown
22
18
  License-File: LICENSE
23
19
  Requires-Dist: fastcore
@@ -135,8 +131,8 @@ other popular python frameworks.
135
131
 
136
132
  > [!WARNING]
137
133
  >
138
- > Your app must run on port `5001` which is the default port for
139
- > FastHTML apps.
134
+ > Your app must use port 5001, as this is the port exposed by Plash’s
135
+ > Docker container. It also happens to be the default for FastHTML apps.
140
136
 
141
137
  And create the `requirements.txt` file:
142
138
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name="plash_cli"
7
- requires-python=">=3.7"
7
+ requires-python=">=3.11"
8
8
  dynamic = [ "keywords", "description", "version", "dependencies", "optional-dependencies", "readme", "license", "authors", "classifiers", "entry-points", "scripts", "urls"]
9
9
 
10
10
  [tool.uv]
@@ -2,8 +2,8 @@
2
2
  jupyter_hooks = False
3
3
  repo = plash_cli
4
4
  lib_name = plash_cli
5
- version = 0.2.0
6
- min_python = 3.7
5
+ version = 0.2.2
6
+ min_python = 3.11
7
7
  license = apache2
8
8
  black_formatting = False
9
9
  doc_path = _docs
@@ -1 +0,0 @@
1
- __version__ = "0.2.0"
File without changes
File without changes
File without changes
File without changes