starnus 1.0.0__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 (60) hide show
  1. starnus-1.0.0/LICENSE +21 -0
  2. starnus-1.0.0/PKG-INFO +142 -0
  3. starnus-1.0.0/README.md +103 -0
  4. starnus-1.0.0/pyproject.toml +79 -0
  5. starnus-1.0.0/setup.cfg +4 -0
  6. starnus-1.0.0/starnus.egg-info/PKG-INFO +142 -0
  7. starnus-1.0.0/starnus.egg-info/SOURCES.txt +58 -0
  8. starnus-1.0.0/starnus.egg-info/dependency_links.txt +1 -0
  9. starnus-1.0.0/starnus.egg-info/entry_points.txt +2 -0
  10. starnus-1.0.0/starnus.egg-info/requires.txt +19 -0
  11. starnus-1.0.0/starnus.egg-info/top_level.txt +1 -0
  12. starnus-1.0.0/starnus_sdk/__init__.py +32 -0
  13. starnus-1.0.0/starnus_sdk/_config.py +83 -0
  14. starnus-1.0.0/starnus_sdk/_http.py +166 -0
  15. starnus-1.0.0/starnus_sdk/_version.py +1 -0
  16. starnus-1.0.0/starnus_sdk/_websocket.py +368 -0
  17. starnus-1.0.0/starnus_sdk/cli/__init__.py +0 -0
  18. starnus-1.0.0/starnus_sdk/cli/api_keys_cmd.py +56 -0
  19. starnus-1.0.0/starnus_sdk/cli/artifacts.py +122 -0
  20. starnus-1.0.0/starnus_sdk/cli/auth.py +111 -0
  21. starnus-1.0.0/starnus_sdk/cli/billing.py +107 -0
  22. starnus-1.0.0/starnus_sdk/cli/chat.py +173 -0
  23. starnus-1.0.0/starnus_sdk/cli/files.py +82 -0
  24. starnus-1.0.0/starnus_sdk/cli/integrations.py +105 -0
  25. starnus-1.0.0/starnus_sdk/cli/main.py +99 -0
  26. starnus-1.0.0/starnus_sdk/cli/projects.py +84 -0
  27. starnus-1.0.0/starnus_sdk/cli/run.py +136 -0
  28. starnus-1.0.0/starnus_sdk/cli/tasks.py +88 -0
  29. starnus-1.0.0/starnus_sdk/cli/threads.py +65 -0
  30. starnus-1.0.0/starnus_sdk/cli/triggers.py +59 -0
  31. starnus-1.0.0/starnus_sdk/client.py +214 -0
  32. starnus-1.0.0/starnus_sdk/framework/__init__.py +8 -0
  33. starnus-1.0.0/starnus_sdk/models/__init__.py +31 -0
  34. starnus-1.0.0/starnus_sdk/models/api_key.py +35 -0
  35. starnus-1.0.0/starnus_sdk/models/artifact.py +69 -0
  36. starnus-1.0.0/starnus_sdk/models/execution.py +29 -0
  37. starnus-1.0.0/starnus_sdk/models/file.py +27 -0
  38. starnus-1.0.0/starnus_sdk/models/integration.py +35 -0
  39. starnus-1.0.0/starnus_sdk/models/plan.py +88 -0
  40. starnus-1.0.0/starnus_sdk/models/profile.py +33 -0
  41. starnus-1.0.0/starnus_sdk/models/project.py +21 -0
  42. starnus-1.0.0/starnus_sdk/models/task.py +29 -0
  43. starnus-1.0.0/starnus_sdk/models/thread.py +27 -0
  44. starnus-1.0.0/starnus_sdk/models/trigger.py +35 -0
  45. starnus-1.0.0/starnus_sdk/resources/__init__.py +34 -0
  46. starnus-1.0.0/starnus_sdk/resources/api_keys.py +57 -0
  47. starnus-1.0.0/starnus_sdk/resources/artifacts.py +141 -0
  48. starnus-1.0.0/starnus_sdk/resources/billing.py +84 -0
  49. starnus-1.0.0/starnus_sdk/resources/executions.py +327 -0
  50. starnus-1.0.0/starnus_sdk/resources/expert.py +71 -0
  51. starnus-1.0.0/starnus_sdk/resources/files.py +128 -0
  52. starnus-1.0.0/starnus_sdk/resources/integrations.py +93 -0
  53. starnus-1.0.0/starnus_sdk/resources/profile.py +59 -0
  54. starnus-1.0.0/starnus_sdk/resources/projects.py +36 -0
  55. starnus-1.0.0/starnus_sdk/resources/support.py +53 -0
  56. starnus-1.0.0/starnus_sdk/resources/tasks.py +72 -0
  57. starnus-1.0.0/starnus_sdk/resources/threads.py +32 -0
  58. starnus-1.0.0/starnus_sdk/resources/triggers.py +58 -0
  59. starnus-1.0.0/starnus_sdk/resources/updates.py +62 -0
  60. starnus-1.0.0/starnus_sdk/resources/usage.py +66 -0
starnus-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Starnus Technologies B.V.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
starnus-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: starnus
3
+ Version: 1.0.0
4
+ Summary: Official Python SDK and CLI for the Starnus AI platform
5
+ Author-email: Starnus Team <support@starnustech.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://starnus.com
8
+ Project-URL: Documentation, https://docs.starnus.com
9
+ Keywords: starnus,ai,sdk,automation,agents,cli
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: requests>=2.31.0
23
+ Requires-Dist: websocket-client>=1.7.0
24
+ Requires-Dist: click>=8.1.0
25
+ Provides-Extra: pandas
26
+ Requires-Dist: pandas>=2.0.0; extra == "pandas"
27
+ Requires-Dist: openpyxl>=3.1.0; extra == "pandas"
28
+ Provides-Extra: all
29
+ Requires-Dist: pandas>=2.0.0; extra == "all"
30
+ Requires-Dist: openpyxl>=3.1.0; extra == "all"
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
33
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
34
+ Requires-Dist: responses>=0.25.0; extra == "dev"
35
+ Requires-Dist: ruff>=0.3.0; extra == "dev"
36
+ Requires-Dist: mypy>=1.8.0; extra == "dev"
37
+ Requires-Dist: types-requests>=2.31.0; extra == "dev"
38
+ Dynamic: license-file
39
+
40
+ # Starnus Python SDK
41
+
42
+ [![PyPI version](https://img.shields.io/pypi/v/starnus.svg)](https://pypi.org/project/starnus/)
43
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
44
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
45
+
46
+ The official Python SDK for the [Starnus AI platform](https://starnus.com).
47
+
48
+ Run AI-powered agentic tasks, stream live results over WebSocket, manage projects, upload files, export artifacts, and more — all from Python or the command line.
49
+
50
+ ---
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install starnus
56
+ ```
57
+
58
+ ## Quickstart
59
+
60
+ ```python
61
+ import starnus
62
+
63
+ client = starnus.Starnus(api_key="sk_live_your_api_key")
64
+
65
+ # Create a project
66
+ project = client.projects.create(name="Lead Research")
67
+
68
+ # Run an AI task and stream results live
69
+ execution = client.execute(
70
+ project_id=project.id,
71
+ prompt="Find 10 CEOs of software companies in the Netherlands.",
72
+ )
73
+
74
+ for event in execution.stream():
75
+ if event.type == "supervisor_update":
76
+ print(f"[supervisor] {event.message}")
77
+ elif event.type == "result":
78
+ print(f"\nDone: {event.message}")
79
+ break
80
+ ```
81
+
82
+ ## Authentication
83
+
84
+ Set your API key as an environment variable:
85
+
86
+ ```bash
87
+ export STARNUS_API_KEY="sk_live_your_api_key"
88
+ ```
89
+
90
+ Or pass it directly to the client:
91
+
92
+ ```python
93
+ client = starnus.Starnus(api_key="sk_live_your_api_key")
94
+ ```
95
+
96
+ Get your API key from the [Starnus dashboard](https://app.starnus.com) under **Dev Tools → API Keys**.
97
+
98
+ ## Documentation
99
+
100
+ Full SDK reference: [starnus.com/docs](https://starnus.com/docs)
101
+
102
+ Includes:
103
+ - All resource methods with parameters and return types
104
+ - WebSocket streaming event reference
105
+ - File upload, artifact export, and trigger examples
106
+ - CLI reference
107
+ - Error handling guide
108
+
109
+ ## Resources
110
+
111
+ | Resource | Description |
112
+ |----------|-------------|
113
+ | `client.projects` | Create and manage projects |
114
+ | `client.execute()` | Run AI tasks with live streaming |
115
+ | `client.files` | Upload and download files |
116
+ | `client.artifacts` | Export structured AI outputs (xlsx, csv, json) |
117
+ | `client.threads` | View execution history |
118
+ | `client.tasks` | Manage to-do items |
119
+ | `client.integrations` | Connect external services (Gmail, LinkedIn, etc.) |
120
+ | `client.triggers` | Schedule recurring AI tasks |
121
+ | `client.billing` | Manage plans and credits |
122
+ | `client.api_keys` | Manage API keys |
123
+
124
+ ## CLI
125
+
126
+ ```bash
127
+ # Authenticate
128
+ starnus auth login
129
+
130
+ # Run a task
131
+ starnus run --project <project_id> "Find 10 fintech leads in Germany"
132
+
133
+ # List artifacts
134
+ starnus artifacts list --project <project_id>
135
+
136
+ # Export an artifact
137
+ starnus artifacts export <artifact_id> --format xlsx --output leads.xlsx
138
+ ```
139
+
140
+ ## License
141
+
142
+ MIT — see [LICENSE](LICENSE)
@@ -0,0 +1,103 @@
1
+ # Starnus Python SDK
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/starnus.svg)](https://pypi.org/project/starnus/)
4
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
+
7
+ The official Python SDK for the [Starnus AI platform](https://starnus.com).
8
+
9
+ Run AI-powered agentic tasks, stream live results over WebSocket, manage projects, upload files, export artifacts, and more — all from Python or the command line.
10
+
11
+ ---
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pip install starnus
17
+ ```
18
+
19
+ ## Quickstart
20
+
21
+ ```python
22
+ import starnus
23
+
24
+ client = starnus.Starnus(api_key="sk_live_your_api_key")
25
+
26
+ # Create a project
27
+ project = client.projects.create(name="Lead Research")
28
+
29
+ # Run an AI task and stream results live
30
+ execution = client.execute(
31
+ project_id=project.id,
32
+ prompt="Find 10 CEOs of software companies in the Netherlands.",
33
+ )
34
+
35
+ for event in execution.stream():
36
+ if event.type == "supervisor_update":
37
+ print(f"[supervisor] {event.message}")
38
+ elif event.type == "result":
39
+ print(f"\nDone: {event.message}")
40
+ break
41
+ ```
42
+
43
+ ## Authentication
44
+
45
+ Set your API key as an environment variable:
46
+
47
+ ```bash
48
+ export STARNUS_API_KEY="sk_live_your_api_key"
49
+ ```
50
+
51
+ Or pass it directly to the client:
52
+
53
+ ```python
54
+ client = starnus.Starnus(api_key="sk_live_your_api_key")
55
+ ```
56
+
57
+ Get your API key from the [Starnus dashboard](https://app.starnus.com) under **Dev Tools → API Keys**.
58
+
59
+ ## Documentation
60
+
61
+ Full SDK reference: [starnus.com/docs](https://starnus.com/docs)
62
+
63
+ Includes:
64
+ - All resource methods with parameters and return types
65
+ - WebSocket streaming event reference
66
+ - File upload, artifact export, and trigger examples
67
+ - CLI reference
68
+ - Error handling guide
69
+
70
+ ## Resources
71
+
72
+ | Resource | Description |
73
+ |----------|-------------|
74
+ | `client.projects` | Create and manage projects |
75
+ | `client.execute()` | Run AI tasks with live streaming |
76
+ | `client.files` | Upload and download files |
77
+ | `client.artifacts` | Export structured AI outputs (xlsx, csv, json) |
78
+ | `client.threads` | View execution history |
79
+ | `client.tasks` | Manage to-do items |
80
+ | `client.integrations` | Connect external services (Gmail, LinkedIn, etc.) |
81
+ | `client.triggers` | Schedule recurring AI tasks |
82
+ | `client.billing` | Manage plans and credits |
83
+ | `client.api_keys` | Manage API keys |
84
+
85
+ ## CLI
86
+
87
+ ```bash
88
+ # Authenticate
89
+ starnus auth login
90
+
91
+ # Run a task
92
+ starnus run --project <project_id> "Find 10 fintech leads in Germany"
93
+
94
+ # List artifacts
95
+ starnus artifacts list --project <project_id>
96
+
97
+ # Export an artifact
98
+ starnus artifacts export <artifact_id> --format xlsx --output leads.xlsx
99
+ ```
100
+
101
+ ## License
102
+
103
+ MIT — see [LICENSE](LICENSE)
@@ -0,0 +1,79 @@
1
+ [build-system]
2
+ requires = ["setuptools>=65.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "starnus"
7
+ version = "1.0.0"
8
+ description = "Official Python SDK and CLI for the Starnus AI platform"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Starnus Team", email = "support@starnustech.com"}
14
+ ]
15
+ keywords = ["starnus", "ai", "sdk", "automation", "agents", "cli"]
16
+ classifiers = [
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: Software Development :: Libraries :: Python Modules",
26
+ ]
27
+
28
+ # Core consumer SDK deps — minimal footprint
29
+ dependencies = [
30
+ "requests>=2.31.0",
31
+ "websocket-client>=1.7.0",
32
+ "click>=8.1.0",
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ # Optional: DataFrame integration for artifact import/export
37
+ pandas = ["pandas>=2.0.0", "openpyxl>=3.1.0"]
38
+
39
+ # All optional extras combined
40
+ all = [
41
+ "pandas>=2.0.0",
42
+ "openpyxl>=3.1.0",
43
+ ]
44
+
45
+ dev = [
46
+ "pytest>=8.0.0",
47
+ "pytest-asyncio>=0.23.0",
48
+ "responses>=0.25.0",
49
+ "ruff>=0.3.0",
50
+ "mypy>=1.8.0",
51
+ "types-requests>=2.31.0",
52
+ ]
53
+
54
+ [project.urls]
55
+ Homepage = "https://starnus.com"
56
+ Documentation = "https://docs.starnus.com"
57
+
58
+ [project.scripts]
59
+ starnus = "starnus_sdk.cli.main:cli"
60
+
61
+ # v1 ships without the component (agent-deploy) subsystem.
62
+ # Explicitly list only the packages to distribute.
63
+ [tool.setuptools]
64
+ packages = [
65
+ "starnus_sdk",
66
+ "starnus_sdk.cli",
67
+ "starnus_sdk.framework",
68
+ "starnus_sdk.models",
69
+ "starnus_sdk.resources",
70
+ ]
71
+
72
+ [tool.ruff]
73
+ line-length = 100
74
+ target-version = "py39"
75
+
76
+ [tool.pytest.ini_options]
77
+ testpaths = ["tests"]
78
+ python_files = ["test_*.py"]
79
+ asyncio_mode = "auto"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: starnus
3
+ Version: 1.0.0
4
+ Summary: Official Python SDK and CLI for the Starnus AI platform
5
+ Author-email: Starnus Team <support@starnustech.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://starnus.com
8
+ Project-URL: Documentation, https://docs.starnus.com
9
+ Keywords: starnus,ai,sdk,automation,agents,cli
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: requests>=2.31.0
23
+ Requires-Dist: websocket-client>=1.7.0
24
+ Requires-Dist: click>=8.1.0
25
+ Provides-Extra: pandas
26
+ Requires-Dist: pandas>=2.0.0; extra == "pandas"
27
+ Requires-Dist: openpyxl>=3.1.0; extra == "pandas"
28
+ Provides-Extra: all
29
+ Requires-Dist: pandas>=2.0.0; extra == "all"
30
+ Requires-Dist: openpyxl>=3.1.0; extra == "all"
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
33
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
34
+ Requires-Dist: responses>=0.25.0; extra == "dev"
35
+ Requires-Dist: ruff>=0.3.0; extra == "dev"
36
+ Requires-Dist: mypy>=1.8.0; extra == "dev"
37
+ Requires-Dist: types-requests>=2.31.0; extra == "dev"
38
+ Dynamic: license-file
39
+
40
+ # Starnus Python SDK
41
+
42
+ [![PyPI version](https://img.shields.io/pypi/v/starnus.svg)](https://pypi.org/project/starnus/)
43
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
44
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
45
+
46
+ The official Python SDK for the [Starnus AI platform](https://starnus.com).
47
+
48
+ Run AI-powered agentic tasks, stream live results over WebSocket, manage projects, upload files, export artifacts, and more — all from Python or the command line.
49
+
50
+ ---
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install starnus
56
+ ```
57
+
58
+ ## Quickstart
59
+
60
+ ```python
61
+ import starnus
62
+
63
+ client = starnus.Starnus(api_key="sk_live_your_api_key")
64
+
65
+ # Create a project
66
+ project = client.projects.create(name="Lead Research")
67
+
68
+ # Run an AI task and stream results live
69
+ execution = client.execute(
70
+ project_id=project.id,
71
+ prompt="Find 10 CEOs of software companies in the Netherlands.",
72
+ )
73
+
74
+ for event in execution.stream():
75
+ if event.type == "supervisor_update":
76
+ print(f"[supervisor] {event.message}")
77
+ elif event.type == "result":
78
+ print(f"\nDone: {event.message}")
79
+ break
80
+ ```
81
+
82
+ ## Authentication
83
+
84
+ Set your API key as an environment variable:
85
+
86
+ ```bash
87
+ export STARNUS_API_KEY="sk_live_your_api_key"
88
+ ```
89
+
90
+ Or pass it directly to the client:
91
+
92
+ ```python
93
+ client = starnus.Starnus(api_key="sk_live_your_api_key")
94
+ ```
95
+
96
+ Get your API key from the [Starnus dashboard](https://app.starnus.com) under **Dev Tools → API Keys**.
97
+
98
+ ## Documentation
99
+
100
+ Full SDK reference: [starnus.com/docs](https://starnus.com/docs)
101
+
102
+ Includes:
103
+ - All resource methods with parameters and return types
104
+ - WebSocket streaming event reference
105
+ - File upload, artifact export, and trigger examples
106
+ - CLI reference
107
+ - Error handling guide
108
+
109
+ ## Resources
110
+
111
+ | Resource | Description |
112
+ |----------|-------------|
113
+ | `client.projects` | Create and manage projects |
114
+ | `client.execute()` | Run AI tasks with live streaming |
115
+ | `client.files` | Upload and download files |
116
+ | `client.artifacts` | Export structured AI outputs (xlsx, csv, json) |
117
+ | `client.threads` | View execution history |
118
+ | `client.tasks` | Manage to-do items |
119
+ | `client.integrations` | Connect external services (Gmail, LinkedIn, etc.) |
120
+ | `client.triggers` | Schedule recurring AI tasks |
121
+ | `client.billing` | Manage plans and credits |
122
+ | `client.api_keys` | Manage API keys |
123
+
124
+ ## CLI
125
+
126
+ ```bash
127
+ # Authenticate
128
+ starnus auth login
129
+
130
+ # Run a task
131
+ starnus run --project <project_id> "Find 10 fintech leads in Germany"
132
+
133
+ # List artifacts
134
+ starnus artifacts list --project <project_id>
135
+
136
+ # Export an artifact
137
+ starnus artifacts export <artifact_id> --format xlsx --output leads.xlsx
138
+ ```
139
+
140
+ ## License
141
+
142
+ MIT — see [LICENSE](LICENSE)
@@ -0,0 +1,58 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ starnus.egg-info/PKG-INFO
5
+ starnus.egg-info/SOURCES.txt
6
+ starnus.egg-info/dependency_links.txt
7
+ starnus.egg-info/entry_points.txt
8
+ starnus.egg-info/requires.txt
9
+ starnus.egg-info/top_level.txt
10
+ starnus_sdk/__init__.py
11
+ starnus_sdk/_config.py
12
+ starnus_sdk/_http.py
13
+ starnus_sdk/_version.py
14
+ starnus_sdk/_websocket.py
15
+ starnus_sdk/client.py
16
+ starnus_sdk/cli/__init__.py
17
+ starnus_sdk/cli/api_keys_cmd.py
18
+ starnus_sdk/cli/artifacts.py
19
+ starnus_sdk/cli/auth.py
20
+ starnus_sdk/cli/billing.py
21
+ starnus_sdk/cli/chat.py
22
+ starnus_sdk/cli/files.py
23
+ starnus_sdk/cli/integrations.py
24
+ starnus_sdk/cli/main.py
25
+ starnus_sdk/cli/projects.py
26
+ starnus_sdk/cli/run.py
27
+ starnus_sdk/cli/tasks.py
28
+ starnus_sdk/cli/threads.py
29
+ starnus_sdk/cli/triggers.py
30
+ starnus_sdk/framework/__init__.py
31
+ starnus_sdk/models/__init__.py
32
+ starnus_sdk/models/api_key.py
33
+ starnus_sdk/models/artifact.py
34
+ starnus_sdk/models/execution.py
35
+ starnus_sdk/models/file.py
36
+ starnus_sdk/models/integration.py
37
+ starnus_sdk/models/plan.py
38
+ starnus_sdk/models/profile.py
39
+ starnus_sdk/models/project.py
40
+ starnus_sdk/models/task.py
41
+ starnus_sdk/models/thread.py
42
+ starnus_sdk/models/trigger.py
43
+ starnus_sdk/resources/__init__.py
44
+ starnus_sdk/resources/api_keys.py
45
+ starnus_sdk/resources/artifacts.py
46
+ starnus_sdk/resources/billing.py
47
+ starnus_sdk/resources/executions.py
48
+ starnus_sdk/resources/expert.py
49
+ starnus_sdk/resources/files.py
50
+ starnus_sdk/resources/integrations.py
51
+ starnus_sdk/resources/profile.py
52
+ starnus_sdk/resources/projects.py
53
+ starnus_sdk/resources/support.py
54
+ starnus_sdk/resources/tasks.py
55
+ starnus_sdk/resources/threads.py
56
+ starnus_sdk/resources/triggers.py
57
+ starnus_sdk/resources/updates.py
58
+ starnus_sdk/resources/usage.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ starnus = starnus_sdk.cli.main:cli
@@ -0,0 +1,19 @@
1
+ requests>=2.31.0
2
+ websocket-client>=1.7.0
3
+ click>=8.1.0
4
+
5
+ [all]
6
+ pandas>=2.0.0
7
+ openpyxl>=3.1.0
8
+
9
+ [dev]
10
+ pytest>=8.0.0
11
+ pytest-asyncio>=0.23.0
12
+ responses>=0.25.0
13
+ ruff>=0.3.0
14
+ mypy>=1.8.0
15
+ types-requests>=2.31.0
16
+
17
+ [pandas]
18
+ pandas>=2.0.0
19
+ openpyxl>=3.1.0
@@ -0,0 +1 @@
1
+ starnus_sdk
@@ -0,0 +1,32 @@
1
+ """
2
+ Starnus Python SDK — official client for the Starnus AI platform.
3
+
4
+ Quick start:
5
+ from starnus_sdk import Starnus
6
+
7
+ client = Starnus(api_key="sk_live_...") # or set STARNUS_API_KEY
8
+ print(client.me())
9
+ projects = client.projects.list()
10
+ """
11
+
12
+ from starnus_sdk._version import __version__
13
+ from starnus_sdk.client import Starnus
14
+ from starnus_sdk._http import (
15
+ StarnusError,
16
+ AuthenticationError,
17
+ PermissionError,
18
+ NotFoundError,
19
+ RateLimitError,
20
+ StarnusAPIError,
21
+ )
22
+
23
+ __all__ = [
24
+ "Starnus",
25
+ "__version__",
26
+ "StarnusError",
27
+ "AuthenticationError",
28
+ "PermissionError",
29
+ "NotFoundError",
30
+ "RateLimitError",
31
+ "StarnusAPIError",
32
+ ]
@@ -0,0 +1,83 @@
1
+ """
2
+ Config file management for the Starnus SDK.
3
+
4
+ Config stored at ~/.starnus/config.json with permissions 600.
5
+ Directory created with permissions 700.
6
+
7
+ Lookup order for api_key:
8
+ 1. STARNUS_API_KEY environment variable
9
+ 2. ~/.starnus/config.json
10
+ """
11
+
12
+ import json
13
+ import os
14
+ import stat
15
+ from pathlib import Path
16
+ from typing import Optional
17
+
18
+ _CONFIG_DIR = Path.home() / ".starnus"
19
+ _CONFIG_FILE = _CONFIG_DIR / "config.json"
20
+
21
+ # Supported keys
22
+ _KNOWN_KEYS = {"api_key", "base_url", "ws_url", "default_project_id", "component_token"}
23
+
24
+
25
+ def _ensure_config_dir() -> None:
26
+ """Create ~/.starnus/ with 700 permissions if it doesn't exist."""
27
+ _CONFIG_DIR.mkdir(exist_ok=True)
28
+ _CONFIG_DIR.chmod(0o700)
29
+
30
+
31
+ def load_config() -> dict:
32
+ """
33
+ Load the config file. Returns empty dict if file doesn't exist or is malformed.
34
+ """
35
+ if not _CONFIG_FILE.exists():
36
+ return {}
37
+ try:
38
+ with open(_CONFIG_FILE, "r") as f:
39
+ data = json.load(f)
40
+ return {k: v for k, v in data.items() if k in _KNOWN_KEYS}
41
+ except (json.JSONDecodeError, OSError):
42
+ return {}
43
+
44
+
45
+ def save_config(updates: dict) -> None:
46
+ """
47
+ Merge updates into the config file and write it with 600 permissions.
48
+ Only saves keys in _KNOWN_KEYS.
49
+ """
50
+ _ensure_config_dir()
51
+ current = load_config()
52
+ current.update({k: v for k, v in updates.items() if k in _KNOWN_KEYS and v is not None})
53
+ # Remove None values
54
+ current = {k: v for k, v in current.items() if v is not None}
55
+
56
+ with open(_CONFIG_FILE, "w") as f:
57
+ json.dump(current, f, indent=2)
58
+
59
+ _CONFIG_FILE.chmod(0o600)
60
+
61
+
62
+ def delete_config() -> None:
63
+ """Remove the config file (logout)."""
64
+ if _CONFIG_FILE.exists():
65
+ _CONFIG_FILE.unlink()
66
+
67
+
68
+ def get_api_key() -> Optional[str]:
69
+ """
70
+ Resolve API key from environment variable first, then config file.
71
+ Returns None if not set.
72
+ """
73
+ env_key = os.environ.get("STARNUS_API_KEY")
74
+ if env_key:
75
+ return env_key.strip()
76
+ return load_config().get("api_key")
77
+
78
+
79
+ def get_value(key: str) -> Optional[str]:
80
+ """Get a single config value, checking env vars first for api_key."""
81
+ if key == "api_key":
82
+ return get_api_key()
83
+ return load_config().get(key)