colabapi 0.1.0__tar.gz → 0.1.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.
- {colabapi-0.1.0 → colabapi-0.1.1}/PKG-INFO +15 -1
- {colabapi-0.1.0 → colabapi-0.1.1}/README.md +14 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/__init__.py +1 -1
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/cli.py +27 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi.egg-info/PKG-INFO +15 -1
- {colabapi-0.1.0 → colabapi-0.1.1}/pyproject.toml +1 -1
- {colabapi-0.1.0 → colabapi-0.1.1}/LICENSE +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/colabcli.py +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/config.py +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/keepalive.py +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/monitor.py +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/runtime.py +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/service.py +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/shellview.py +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/timing.py +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi/ui.py +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi.egg-info/SOURCES.txt +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi.egg-info/dependency_links.txt +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi.egg-info/entry_points.txt +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi.egg-info/requires.txt +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/colabapi.egg-info/top_level.txt +0 -0
- {colabapi-0.1.0 → colabapi-0.1.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: colabapi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Run and keep a Google Colab runtime alive, then reach its terminal from your own server or laptop. A CLI for headless, persistent Colab sessions.
|
|
5
5
|
Author: lil-limbo
|
|
6
6
|
License: MIT
|
|
@@ -82,6 +82,20 @@ colabapi never handles your Google password
|
|
|
82
82
|
pipx install colabapi
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
### As root (VPS, container, `sudo -i`)
|
|
86
|
+
|
|
87
|
+
Install system-wide so the command lands in `/usr/local/bin`, which is already on
|
|
88
|
+
root's `PATH`:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pipx install --global colabapi
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
> **Why:** a plain `pipx install` as root puts the script in `/root/.local/bin`, which
|
|
95
|
+
> most distros do **not** add to root's `PATH`. The install succeeds but you get
|
|
96
|
+
> `colabapi: command not found`. `--global` avoids that. (The one-line install script
|
|
97
|
+
> below detects root and does this for you.)
|
|
98
|
+
|
|
85
99
|
### With pip
|
|
86
100
|
|
|
87
101
|
```bash
|
|
@@ -51,6 +51,20 @@ colabapi never handles your Google password
|
|
|
51
51
|
pipx install colabapi
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
### As root (VPS, container, `sudo -i`)
|
|
55
|
+
|
|
56
|
+
Install system-wide so the command lands in `/usr/local/bin`, which is already on
|
|
57
|
+
root's `PATH`:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pipx install --global colabapi
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> **Why:** a plain `pipx install` as root puts the script in `/root/.local/bin`, which
|
|
64
|
+
> most distros do **not** add to root's `PATH`. The install succeeds but you get
|
|
65
|
+
> `colabapi: command not found`. `--global` avoids that. (The one-line install script
|
|
66
|
+
> below detects root and does this for you.)
|
|
67
|
+
|
|
54
68
|
### With pip
|
|
55
69
|
|
|
56
70
|
```bash
|
|
@@ -9,6 +9,8 @@ layer on top.
|
|
|
9
9
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
|
+
import os
|
|
13
|
+
import shutil
|
|
12
14
|
import sys
|
|
13
15
|
import time
|
|
14
16
|
|
|
@@ -36,6 +38,30 @@ def _require_colab() -> None:
|
|
|
36
38
|
raise SystemExit(1)
|
|
37
39
|
|
|
38
40
|
|
|
41
|
+
def _check_on_path() -> None:
|
|
42
|
+
"""Warn when `colabapi` is installed somewhere that is not on PATH.
|
|
43
|
+
|
|
44
|
+
A plain `pipx install` / `pip install --user` as root drops the script into
|
|
45
|
+
/root/.local/bin, which most distros do not put on root's PATH. The install
|
|
46
|
+
then succeeds but `colabapi` reports "command not found", so we say exactly
|
|
47
|
+
where it landed and how to fix it. Only reachable when the user invoked us by
|
|
48
|
+
absolute path (otherwise, by definition, we are already on PATH).
|
|
49
|
+
"""
|
|
50
|
+
here = os.path.dirname(os.path.abspath(sys.argv[0] or ""))
|
|
51
|
+
if not here or shutil.which("colabapi"):
|
|
52
|
+
console.print("colabapi on PATH: [green]yes[/]")
|
|
53
|
+
return
|
|
54
|
+
console.print(f"colabapi on PATH: [yellow]no[/] (installed at {here})")
|
|
55
|
+
fix = f'export PATH="{here}:$PATH"'
|
|
56
|
+
console.print(Panel.fit(
|
|
57
|
+
f"`colabapi` is not on your PATH, so the bare command will not work.\n\n"
|
|
58
|
+
f"Add it for this shell:\n {fix}\n\n"
|
|
59
|
+
f"Make it permanent:\n echo '{fix}' >> ~/.bashrc\n\n"
|
|
60
|
+
f"Or reinstall system-wide (recommended as root):\n"
|
|
61
|
+
f" pipx install --global --force colabapi",
|
|
62
|
+
title="Not on PATH", border_style="yellow"))
|
|
63
|
+
|
|
64
|
+
|
|
39
65
|
def _session_label(s: Session) -> str:
|
|
40
66
|
line = timing.session_line(s.started_at, s.max_lifetime_hours) if s.started_at else ""
|
|
41
67
|
return f"{s.name} [{s.runtime}] {line}".rstrip()
|
|
@@ -380,6 +406,7 @@ def daemon(name: str | None, foreground: bool) -> None:
|
|
|
380
406
|
@cli.command()
|
|
381
407
|
def doctor() -> None:
|
|
382
408
|
"""Check the environment and the official `colab` CLI interface."""
|
|
409
|
+
_check_on_path()
|
|
383
410
|
ok = colab.available()
|
|
384
411
|
console.print(f"official colab CLI: {'[green]found[/] at ' + colab.path() if ok else '[red]not found[/]'}")
|
|
385
412
|
if not ok:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: colabapi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Run and keep a Google Colab runtime alive, then reach its terminal from your own server or laptop. A CLI for headless, persistent Colab sessions.
|
|
5
5
|
Author: lil-limbo
|
|
6
6
|
License: MIT
|
|
@@ -82,6 +82,20 @@ colabapi never handles your Google password
|
|
|
82
82
|
pipx install colabapi
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
### As root (VPS, container, `sudo -i`)
|
|
86
|
+
|
|
87
|
+
Install system-wide so the command lands in `/usr/local/bin`, which is already on
|
|
88
|
+
root's `PATH`:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pipx install --global colabapi
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
> **Why:** a plain `pipx install` as root puts the script in `/root/.local/bin`, which
|
|
95
|
+
> most distros do **not** add to root's `PATH`. The install succeeds but you get
|
|
96
|
+
> `colabapi: command not found`. `--global` avoids that. (The one-line install script
|
|
97
|
+
> below detects root and does this for you.)
|
|
98
|
+
|
|
85
99
|
### With pip
|
|
86
100
|
|
|
87
101
|
```bash
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "colabapi"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.1"
|
|
8
8
|
description = "Run and keep a Google Colab runtime alive, then reach its terminal from your own server or laptop. A CLI for headless, persistent Colab sessions."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
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
|
|
File without changes
|
|
File without changes
|