orrin-cli 0.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.
- orrin_cli-0.0.1/PKG-INFO +7 -0
- orrin_cli-0.0.1/orrin/__init__.py +0 -0
- orrin_cli-0.0.1/orrin/cli.py +36 -0
- orrin_cli-0.0.1/orrin_cli.egg-info/PKG-INFO +7 -0
- orrin_cli-0.0.1/orrin_cli.egg-info/SOURCES.txt +9 -0
- orrin_cli-0.0.1/orrin_cli.egg-info/dependency_links.txt +1 -0
- orrin_cli-0.0.1/orrin_cli.egg-info/entry_points.txt +2 -0
- orrin_cli-0.0.1/orrin_cli.egg-info/requires.txt +2 -0
- orrin_cli-0.0.1/orrin_cli.egg-info/top_level.txt +1 -0
- orrin_cli-0.0.1/pyproject.toml +12 -0
- orrin_cli-0.0.1/setup.cfg +4 -0
orrin_cli-0.0.1/PKG-INFO
ADDED
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
import requests
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
app = typer.Typer(help='Test Help')
|
|
6
|
+
|
|
7
|
+
API_BASE = "https://api.stellr-company.com"
|
|
8
|
+
|
|
9
|
+
@app.command()
|
|
10
|
+
def upload(
|
|
11
|
+
zip_path: Path = typer.Argument(..., exists=True),
|
|
12
|
+
app_name: str = typer.Option(..., "--app")
|
|
13
|
+
):
|
|
14
|
+
"""
|
|
15
|
+
Upload a UI zip to Orrin.
|
|
16
|
+
"""
|
|
17
|
+
with open(zip_path, "rb") as f:
|
|
18
|
+
response = requests.post(
|
|
19
|
+
f"{API_BASE}/ui/upload",
|
|
20
|
+
files={"file": f},
|
|
21
|
+
data={"app_name": app_name}
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
if response.status_code != 200:
|
|
25
|
+
typer.echo("❌ Upload failed")
|
|
26
|
+
raise typer.Exit(1)
|
|
27
|
+
|
|
28
|
+
data = response.json()
|
|
29
|
+
typer.echo("✅ Uploaded")
|
|
30
|
+
typer.echo(f"Upload ID: {data.get('upload_id')}")
|
|
31
|
+
|
|
32
|
+
def main():
|
|
33
|
+
app()
|
|
34
|
+
|
|
35
|
+
if __name__ == "__main__":
|
|
36
|
+
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
orrin
|