alphai 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.
Files changed (33) hide show
  1. alphai-0.2.2/PKG-INFO +148 -0
  2. alphai-0.2.2/README.md +115 -0
  3. {alphai-0.2.0 → alphai-0.2.2}/pyproject.toml +1 -1
  4. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/__init__.py +3 -3
  5. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/client.py +2 -2
  6. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/commands/notebooks.py +1 -1
  7. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/docker.py +6 -5
  8. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/jupyter_manager.py +1 -0
  9. alphai-0.2.2/src/alphai.egg-info/PKG-INFO +148 -0
  10. alphai-0.2.0/PKG-INFO +0 -395
  11. alphai-0.2.0/README.md +0 -362
  12. alphai-0.2.0/src/alphai.egg-info/PKG-INFO +0 -395
  13. {alphai-0.2.0 → alphai-0.2.2}/setup.cfg +0 -0
  14. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/auth.py +0 -0
  15. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/cleanup.py +0 -0
  16. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/cli.py +0 -0
  17. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/commands/__init__.py +0 -0
  18. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/commands/config.py +0 -0
  19. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/commands/docker.py +0 -0
  20. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/commands/jupyter.py +0 -0
  21. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/commands/orgs.py +0 -0
  22. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/commands/projects.py +0 -0
  23. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/config.py +0 -0
  24. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/exceptions.py +0 -0
  25. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/notebook_renderer.py +0 -0
  26. {alphai-0.2.0 → alphai-0.2.2}/src/alphai/utils.py +0 -0
  27. {alphai-0.2.0 → alphai-0.2.2}/src/alphai.egg-info/SOURCES.txt +0 -0
  28. {alphai-0.2.0 → alphai-0.2.2}/src/alphai.egg-info/dependency_links.txt +0 -0
  29. {alphai-0.2.0 → alphai-0.2.2}/src/alphai.egg-info/entry_points.txt +0 -0
  30. {alphai-0.2.0 → alphai-0.2.2}/src/alphai.egg-info/requires.txt +0 -0
  31. {alphai-0.2.0 → alphai-0.2.2}/src/alphai.egg-info/top_level.txt +0 -0
  32. {alphai-0.2.0 → alphai-0.2.2}/tests/test_cleanup.py +0 -0
  33. {alphai-0.2.0 → alphai-0.2.2}/tests/test_cli.py +0 -0
alphai-0.2.2/PKG-INFO ADDED
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.4
2
+ Name: alphai
3
+ Version: 0.2.2
4
+ Summary: A CLI tool and Python package for the runalph.ai platform
5
+ Author-email: Andrew Chang <andrew@runalph.ai>
6
+ Project-URL: Homepage, https://runalph.ai
7
+ Project-URL: Documentation, https://docs.runalph.ai
8
+ Project-URL: Repository, https://github.com/alph-ai/alphai
9
+ Project-URL: Issues, https://github.com/alph-ai/alphai/issues
10
+ Keywords: cli,api,data-science,alph
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: click>=8.1.0
21
+ Requires-Dist: rich>=13.0.0
22
+ Requires-Dist: alph-sdk>=0.5.0
23
+ Requires-Dist: httpx>=0.25.0
24
+ Requires-Dist: pydantic>=2.0.0
25
+ Requires-Dist: questionary>=2.1.0
26
+ Requires-Dist: jupyterlab>=4.5.1
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
29
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
30
+ Requires-Dist: black>=23.0.0; extra == "dev"
31
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
32
+ Requires-Dist: mypy>=1.5.0; extra == "dev"
33
+
34
+ # alphai
35
+
36
+ A CLI tool and Python package for the [runalph.ai](https://runalph.ai) platform.
37
+
38
+ ## Installation
39
+
40
+ ```bash
41
+ pip install alphai
42
+ ```
43
+
44
+ ## Quick Start
45
+
46
+ 1. **Authenticate** with your runalph.ai account:
47
+ ```bash
48
+ alphai login
49
+ ```
50
+
51
+ 2. **Start JupyterLab** connected to Alph:
52
+ ```bash
53
+ alphai jupyter lab
54
+ ```
55
+
56
+ This will prompt you to select an organization and project, then start JupyterLab locally with cloud sync.
57
+
58
+ 3. **Manage notebooks**:
59
+ ```bash
60
+ alphai nb
61
+ ```
62
+
63
+ Opens an interactive browser to view, upload, download, and manage your notebooks.
64
+
65
+ ## Commands
66
+
67
+ ### Authentication
68
+
69
+ ```bash
70
+ alphai login # Browser-based login (recommended)
71
+ alphai login --token TOK # Login with a token from runalph.ai/account/tokens
72
+ alphai login --force # Force re-authentication
73
+ alphai logout # Clear credentials
74
+ alphai status # Show auth status and config
75
+ ```
76
+
77
+ ### Jupyter
78
+
79
+ Start JupyterLab or Jupyter Notebook locally, connected to your Alph workspace:
80
+
81
+ ```bash
82
+ alphai jupyter lab # Interactive org/project selection
83
+ alphai jupyter lab --org my-org --project my-project
84
+ alphai jupyter lab --port 9999 # Custom port
85
+ alphai jupyter lab --local-only # Skip cloud connection
86
+ alphai jupyter lab --quiet # Suppress Jupyter logs
87
+ ```
88
+
89
+ ```bash
90
+ alphai jupyter notebook # Classic notebook interface
91
+ ```
92
+
93
+ ### Notebooks
94
+
95
+ Manage notebooks from the command line:
96
+
97
+ ```bash
98
+ alphai nb # Interactive browser
99
+ alphai nb list # List notebooks
100
+ alphai nb list --org my-org # List in specific org
101
+ alphai nb view <notebook-id> # View in terminal
102
+ alphai nb info <notebook-id> # Show notebook info
103
+ alphai nb upload analysis.ipynb --org my-org
104
+ alphai nb download <notebook-id>
105
+ alphai nb publish <notebook-id> # Make public
106
+ alphai nb unpublish <notebook-id> # Make private
107
+ alphai nb delete <notebook-id>
108
+ alphai nb search "machine learning"
109
+ alphai nb fork <notebook-id> --org my-org
110
+ alphai nb tags <notebook-id> --add "python,ml"
111
+ ```
112
+
113
+ ### Organizations & Projects
114
+
115
+ ```bash
116
+ alphai orgs list # List your organizations
117
+ alphai orgs select <org-id> # Set current org context
118
+
119
+ alphai projects list # List projects
120
+ alphai projects select <id> # Set current project context
121
+ ```
122
+
123
+ ### Configuration
124
+
125
+ ```bash
126
+ alphai config show # View current config
127
+ alphai config set key value # Set a config value
128
+ alphai config reset # Reset to defaults
129
+ ```
130
+
131
+ ## Environment Variables
132
+
133
+ - `ALPHAI_BEARER_TOKEN`: Bearer token for authentication
134
+ - `ALPHAI_API_URL`: Custom API base URL
135
+ - `ALPHAI_DEBUG`: Enable debug mode
136
+
137
+ ## Global Options
138
+
139
+ ```bash
140
+ alphai --debug <command> # Enable debug logging
141
+ alphai --version # Show version
142
+ alphai --help # Show help
143
+ ```
144
+
145
+ ## Learn More
146
+
147
+ - Documentation: [docs.runalph.ai](https://docs.runalph.ai)
148
+ - Website: [runalph.ai](https://runalph.ai)
alphai-0.2.2/README.md ADDED
@@ -0,0 +1,115 @@
1
+ # alphai
2
+
3
+ A CLI tool and Python package for the [runalph.ai](https://runalph.ai) platform.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install alphai
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ 1. **Authenticate** with your runalph.ai account:
14
+ ```bash
15
+ alphai login
16
+ ```
17
+
18
+ 2. **Start JupyterLab** connected to Alph:
19
+ ```bash
20
+ alphai jupyter lab
21
+ ```
22
+
23
+ This will prompt you to select an organization and project, then start JupyterLab locally with cloud sync.
24
+
25
+ 3. **Manage notebooks**:
26
+ ```bash
27
+ alphai nb
28
+ ```
29
+
30
+ Opens an interactive browser to view, upload, download, and manage your notebooks.
31
+
32
+ ## Commands
33
+
34
+ ### Authentication
35
+
36
+ ```bash
37
+ alphai login # Browser-based login (recommended)
38
+ alphai login --token TOK # Login with a token from runalph.ai/account/tokens
39
+ alphai login --force # Force re-authentication
40
+ alphai logout # Clear credentials
41
+ alphai status # Show auth status and config
42
+ ```
43
+
44
+ ### Jupyter
45
+
46
+ Start JupyterLab or Jupyter Notebook locally, connected to your Alph workspace:
47
+
48
+ ```bash
49
+ alphai jupyter lab # Interactive org/project selection
50
+ alphai jupyter lab --org my-org --project my-project
51
+ alphai jupyter lab --port 9999 # Custom port
52
+ alphai jupyter lab --local-only # Skip cloud connection
53
+ alphai jupyter lab --quiet # Suppress Jupyter logs
54
+ ```
55
+
56
+ ```bash
57
+ alphai jupyter notebook # Classic notebook interface
58
+ ```
59
+
60
+ ### Notebooks
61
+
62
+ Manage notebooks from the command line:
63
+
64
+ ```bash
65
+ alphai nb # Interactive browser
66
+ alphai nb list # List notebooks
67
+ alphai nb list --org my-org # List in specific org
68
+ alphai nb view <notebook-id> # View in terminal
69
+ alphai nb info <notebook-id> # Show notebook info
70
+ alphai nb upload analysis.ipynb --org my-org
71
+ alphai nb download <notebook-id>
72
+ alphai nb publish <notebook-id> # Make public
73
+ alphai nb unpublish <notebook-id> # Make private
74
+ alphai nb delete <notebook-id>
75
+ alphai nb search "machine learning"
76
+ alphai nb fork <notebook-id> --org my-org
77
+ alphai nb tags <notebook-id> --add "python,ml"
78
+ ```
79
+
80
+ ### Organizations & Projects
81
+
82
+ ```bash
83
+ alphai orgs list # List your organizations
84
+ alphai orgs select <org-id> # Set current org context
85
+
86
+ alphai projects list # List projects
87
+ alphai projects select <id> # Set current project context
88
+ ```
89
+
90
+ ### Configuration
91
+
92
+ ```bash
93
+ alphai config show # View current config
94
+ alphai config set key value # Set a config value
95
+ alphai config reset # Reset to defaults
96
+ ```
97
+
98
+ ## Environment Variables
99
+
100
+ - `ALPHAI_BEARER_TOKEN`: Bearer token for authentication
101
+ - `ALPHAI_API_URL`: Custom API base URL
102
+ - `ALPHAI_DEBUG`: Enable debug mode
103
+
104
+ ## Global Options
105
+
106
+ ```bash
107
+ alphai --debug <command> # Enable debug logging
108
+ alphai --version # Show version
109
+ alphai --help # Show help
110
+ ```
111
+
112
+ ## Learn More
113
+
114
+ - Documentation: [docs.runalph.ai](https://docs.runalph.ai)
115
+ - Website: [runalph.ai](https://runalph.ai)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "alphai"
7
- version = "0.2.0"
7
+ version = "0.2.2"
8
8
  description = "A CLI tool and Python package for the runalph.ai platform"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,8 +1,8 @@
1
1
  """alphai - A CLI tool and Python package for the runalph.ai platform."""
2
2
 
3
- __version__ = "0.2.0"
4
- __author__ = "American Data Science"
5
- __email__ = "support@americandatascience.com"
3
+ __version__ = "0.2.2"
4
+ __author__ = "Alph"
5
+ __email__ = "info@runalph.ai"
6
6
 
7
7
  from .client import AlphAIClient
8
8
  from .config import Config
@@ -244,8 +244,8 @@ class AlphAIClient:
244
244
  else:
245
245
  self.console.print("\n[bold yellow]Quick Start:[/bold yellow]")
246
246
  self.console.print(" [cyan]alphai jupyter lab[/cyan] Start Jupyter Lab with cloud sync")
247
- self.console.print(" [cyan]alphai nb list[/cyan] List your notebooks")
248
- self.console.print(" [cyan]alphai orgs list[/cyan] List your organizations")
247
+ self.console.print(" [cyan]alphai nb[/cyan] List your notebooks")
248
+ self.console.print(" [cyan]alphai orgs[/cyan] List your organizations")
249
249
  self.console.print(" [cyan]alphai --help[/cyan] Show all commands")
250
250
 
251
251
  def create_tunnel(
@@ -23,7 +23,7 @@ logger = get_logger(__name__)
23
23
  def get_api_client(config: Config) -> httpx.Client:
24
24
  """Create an HTTP client for API calls."""
25
25
  return httpx.Client(
26
- base_url=config.api_url.rstrip('/api') if config.api_url.endswith('/api') else config.api_url,
26
+ base_url=config.base_url,
27
27
  headers={
28
28
  "Authorization": f"Bearer {config.bearer_token}",
29
29
  "Content-Type": "application/json",
@@ -591,13 +591,13 @@ class DockerManager:
591
591
  # Improved Jupyter startup commands with better compatibility
592
592
  jupyter_commands = [
593
593
  # Jupyter Lab (modern preferred)
594
- f"jupyter lab --ip=0.0.0.0 --port={jupyter_port} --no-browser --allow-root --ServerApp.token={jupyter_token} --ServerApp.allow_origin='*' --ServerApp.base_url=/ --ServerApp.terminado_settings='{{\"shell_command\":[\"/bin/bash\"]}}'",
594
+ f"jupyter lab --ip=0.0.0.0 --port={jupyter_port} --no-browser --allow-root --ServerApp.token={jupyter_token} --ServerApp.allow_origin='*' --ServerApp.base_url=/ --ServerApp.terminado_settings='{{\"shell_command\":[\"/bin/bash\"]}}' --ContentsManager.allow_hidden=True",
595
595
  # Jupyter Lab with python -m (fallback)
596
- f"python -m jupyter lab --ip=0.0.0.0 --port={jupyter_port} --no-browser --allow-root --ServerApp.token={jupyter_token} --ServerApp.allow_origin='*'",
596
+ f"python -m jupyter lab --ip=0.0.0.0 --port={jupyter_port} --no-browser --allow-root --ServerApp.token={jupyter_token} --ServerApp.allow_origin='*' --ContentsManager.allow_hidden=True",
597
597
  # Jupyter Notebook (legacy compatibility)
598
- f"jupyter notebook --ip=0.0.0.0 --port={jupyter_port} --no-browser --allow-root --NotebookApp.token={jupyter_token} --NotebookApp.allow_origin='*'",
598
+ f"jupyter notebook --ip=0.0.0.0 --port={jupyter_port} --no-browser --allow-root --NotebookApp.token={jupyter_token} --NotebookApp.allow_origin='*' --ContentsManager.allow_hidden=True",
599
599
  # Jupyter Notebook with python -m
600
- f"python -m jupyter notebook --ip=0.0.0.0 --port={jupyter_port} --no-browser --allow-root --NotebookApp.token={jupyter_token} --NotebookApp.allow_origin='*'"
600
+ f"python -m jupyter notebook --ip=0.0.0.0 --port={jupyter_port} --no-browser --allow-root --NotebookApp.token={jupyter_token} --NotebookApp.allow_origin='*' --ContentsManager.allow_hidden=True"
601
601
  ]
602
602
 
603
603
  for i, cmd in enumerate(jupyter_commands):
@@ -669,7 +669,8 @@ class DockerManager:
669
669
  f"jupyter lab --ip=0.0.0.0 --port={jupyter_port} "
670
670
  f"--no-browser --allow-root --token={jupyter_token} "
671
671
  f"--NotebookApp.allow_origin='*' "
672
- f"--ServerApp.terminado_settings='{{\"shell_command\":[\"/bin/bash\"]}}'"
672
+ f"--ServerApp.terminado_settings='{{\"shell_command\":[\"/bin/bash\"]}}' "
673
+ f"--ContentsManager.allow_hidden=True"
673
674
  )
674
675
 
675
676
  def generate_jupyter_token(self) -> str:
@@ -74,6 +74,7 @@ class JupyterManager:
74
74
  f'--port={port}',
75
75
  '--no-browser', # We'll open browser to cloud URL instead
76
76
  '--ServerApp.allow_origin=*',
77
+ '--ContentsManager.allow_hidden=True', # Allow access to dotfiles like .env
77
78
  ]
78
79
 
79
80
  # Add token (different format for lab vs notebook)
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.4
2
+ Name: alphai
3
+ Version: 0.2.2
4
+ Summary: A CLI tool and Python package for the runalph.ai platform
5
+ Author-email: Andrew Chang <andrew@runalph.ai>
6
+ Project-URL: Homepage, https://runalph.ai
7
+ Project-URL: Documentation, https://docs.runalph.ai
8
+ Project-URL: Repository, https://github.com/alph-ai/alphai
9
+ Project-URL: Issues, https://github.com/alph-ai/alphai/issues
10
+ Keywords: cli,api,data-science,alph
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: click>=8.1.0
21
+ Requires-Dist: rich>=13.0.0
22
+ Requires-Dist: alph-sdk>=0.5.0
23
+ Requires-Dist: httpx>=0.25.0
24
+ Requires-Dist: pydantic>=2.0.0
25
+ Requires-Dist: questionary>=2.1.0
26
+ Requires-Dist: jupyterlab>=4.5.1
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
29
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
30
+ Requires-Dist: black>=23.0.0; extra == "dev"
31
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
32
+ Requires-Dist: mypy>=1.5.0; extra == "dev"
33
+
34
+ # alphai
35
+
36
+ A CLI tool and Python package for the [runalph.ai](https://runalph.ai) platform.
37
+
38
+ ## Installation
39
+
40
+ ```bash
41
+ pip install alphai
42
+ ```
43
+
44
+ ## Quick Start
45
+
46
+ 1. **Authenticate** with your runalph.ai account:
47
+ ```bash
48
+ alphai login
49
+ ```
50
+
51
+ 2. **Start JupyterLab** connected to Alph:
52
+ ```bash
53
+ alphai jupyter lab
54
+ ```
55
+
56
+ This will prompt you to select an organization and project, then start JupyterLab locally with cloud sync.
57
+
58
+ 3. **Manage notebooks**:
59
+ ```bash
60
+ alphai nb
61
+ ```
62
+
63
+ Opens an interactive browser to view, upload, download, and manage your notebooks.
64
+
65
+ ## Commands
66
+
67
+ ### Authentication
68
+
69
+ ```bash
70
+ alphai login # Browser-based login (recommended)
71
+ alphai login --token TOK # Login with a token from runalph.ai/account/tokens
72
+ alphai login --force # Force re-authentication
73
+ alphai logout # Clear credentials
74
+ alphai status # Show auth status and config
75
+ ```
76
+
77
+ ### Jupyter
78
+
79
+ Start JupyterLab or Jupyter Notebook locally, connected to your Alph workspace:
80
+
81
+ ```bash
82
+ alphai jupyter lab # Interactive org/project selection
83
+ alphai jupyter lab --org my-org --project my-project
84
+ alphai jupyter lab --port 9999 # Custom port
85
+ alphai jupyter lab --local-only # Skip cloud connection
86
+ alphai jupyter lab --quiet # Suppress Jupyter logs
87
+ ```
88
+
89
+ ```bash
90
+ alphai jupyter notebook # Classic notebook interface
91
+ ```
92
+
93
+ ### Notebooks
94
+
95
+ Manage notebooks from the command line:
96
+
97
+ ```bash
98
+ alphai nb # Interactive browser
99
+ alphai nb list # List notebooks
100
+ alphai nb list --org my-org # List in specific org
101
+ alphai nb view <notebook-id> # View in terminal
102
+ alphai nb info <notebook-id> # Show notebook info
103
+ alphai nb upload analysis.ipynb --org my-org
104
+ alphai nb download <notebook-id>
105
+ alphai nb publish <notebook-id> # Make public
106
+ alphai nb unpublish <notebook-id> # Make private
107
+ alphai nb delete <notebook-id>
108
+ alphai nb search "machine learning"
109
+ alphai nb fork <notebook-id> --org my-org
110
+ alphai nb tags <notebook-id> --add "python,ml"
111
+ ```
112
+
113
+ ### Organizations & Projects
114
+
115
+ ```bash
116
+ alphai orgs list # List your organizations
117
+ alphai orgs select <org-id> # Set current org context
118
+
119
+ alphai projects list # List projects
120
+ alphai projects select <id> # Set current project context
121
+ ```
122
+
123
+ ### Configuration
124
+
125
+ ```bash
126
+ alphai config show # View current config
127
+ alphai config set key value # Set a config value
128
+ alphai config reset # Reset to defaults
129
+ ```
130
+
131
+ ## Environment Variables
132
+
133
+ - `ALPHAI_BEARER_TOKEN`: Bearer token for authentication
134
+ - `ALPHAI_API_URL`: Custom API base URL
135
+ - `ALPHAI_DEBUG`: Enable debug mode
136
+
137
+ ## Global Options
138
+
139
+ ```bash
140
+ alphai --debug <command> # Enable debug logging
141
+ alphai --version # Show version
142
+ alphai --help # Show help
143
+ ```
144
+
145
+ ## Learn More
146
+
147
+ - Documentation: [docs.runalph.ai](https://docs.runalph.ai)
148
+ - Website: [runalph.ai](https://runalph.ai)