labsofscience-sdk 2026.1204.1__py3-none-any.whl
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.
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# Copyright (c) 2025 Burdenoff Consultancy Services Private Limited,
|
|
2
|
+
# Algoshred Technologies Private Limited and all sister companies.
|
|
3
|
+
# All rights reserved.
|
|
4
|
+
#
|
|
5
|
+
# Author: Vignesh T.V (https://github.com/tvvignesh)
|
|
6
|
+
|
|
7
|
+
"""Official Python SDK for Labsofscience.
|
|
8
|
+
|
|
9
|
+
Thin shell over ``burdenoff-sdk-libs``. Per user mandate (no compat shim), all
|
|
10
|
+
module surfaces are nested under their owning module — ``sdk.labsofscience.projects.list()``
|
|
11
|
+
instead of a flat ``sdk.projects.list()``. PEP 562 ``__getattr__`` keeps
|
|
12
|
+
cold-start light by deferring optional imports.
|
|
13
|
+
|
|
14
|
+
Mounts the shared generic modules plus the Labsofscience domain module and the
|
|
15
|
+
standalone sandbox module (23 in total): auth, billing, channels,
|
|
16
|
+
conversations, devportal, export, files, groups, health, integrations,
|
|
17
|
+
labsofscience, notifications, organizations, products, rbac, sandbox, scheduler,
|
|
18
|
+
security, store, support, tags, tours, workspaces.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING, Any, Optional
|
|
24
|
+
|
|
25
|
+
from burdenoff_sdk_libs import (
|
|
26
|
+
AuthenticationError,
|
|
27
|
+
AuthorizationError,
|
|
28
|
+
DeviceCodeDeniedError,
|
|
29
|
+
DeviceCodeExpiredError,
|
|
30
|
+
NetworkError,
|
|
31
|
+
RateLimitError,
|
|
32
|
+
SdkContext,
|
|
33
|
+
SdkError as LabsofscienceError,
|
|
34
|
+
TokenPair,
|
|
35
|
+
ValidationError,
|
|
36
|
+
build_context,
|
|
37
|
+
create_sdk,
|
|
38
|
+
)
|
|
39
|
+
from burdenoff_sdk_libs.modules.auth import auth_module
|
|
40
|
+
from burdenoff_sdk_libs.modules.billing import billing_module
|
|
41
|
+
from burdenoff_sdk_libs.modules.channels import channels_module
|
|
42
|
+
from burdenoff_sdk_libs.modules.conversations import conversations_module
|
|
43
|
+
from burdenoff_sdk_libs.modules.devportal import devportal_module
|
|
44
|
+
from burdenoff_sdk_libs.modules.export import export_module
|
|
45
|
+
from burdenoff_sdk_libs.modules.files import files_module
|
|
46
|
+
from burdenoff_sdk_libs.modules.groups import groups_module
|
|
47
|
+
from burdenoff_sdk_libs.modules.health import health_module
|
|
48
|
+
from burdenoff_sdk_libs.modules.integrations import integrations_module
|
|
49
|
+
from burdenoff_sdk_libs.modules.labsofscience import labsofscience_module
|
|
50
|
+
from burdenoff_sdk_libs.modules.notifications import notifications_module
|
|
51
|
+
from burdenoff_sdk_libs.modules.organizations import organizations_module
|
|
52
|
+
from burdenoff_sdk_libs.modules.products import products_module
|
|
53
|
+
from burdenoff_sdk_libs.modules.rbac import rbac_module
|
|
54
|
+
from burdenoff_sdk_libs.modules.sandbox import sandbox_module
|
|
55
|
+
from burdenoff_sdk_libs.modules.scheduler import scheduler_module
|
|
56
|
+
from burdenoff_sdk_libs.modules.security import security_module
|
|
57
|
+
from burdenoff_sdk_libs.modules.store import store_module
|
|
58
|
+
from burdenoff_sdk_libs.modules.support import support_module
|
|
59
|
+
from burdenoff_sdk_libs.modules.tags import tags_module
|
|
60
|
+
from burdenoff_sdk_libs.modules.tours import tours_module
|
|
61
|
+
from burdenoff_sdk_libs.modules.workspaces import workspaces_module
|
|
62
|
+
|
|
63
|
+
__version__ = "2026.629.1"
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# The 23 modules mounted by the Labsofscience shell: the shared generic set, plus
|
|
67
|
+
# the labsofscience domain module and the standalone sandbox module.
|
|
68
|
+
_LABSOFSCIENCE_MODULES = [
|
|
69
|
+
auth_module,
|
|
70
|
+
billing_module,
|
|
71
|
+
channels_module,
|
|
72
|
+
conversations_module,
|
|
73
|
+
devportal_module,
|
|
74
|
+
export_module,
|
|
75
|
+
files_module,
|
|
76
|
+
groups_module,
|
|
77
|
+
health_module,
|
|
78
|
+
integrations_module,
|
|
79
|
+
labsofscience_module,
|
|
80
|
+
notifications_module,
|
|
81
|
+
organizations_module,
|
|
82
|
+
products_module,
|
|
83
|
+
rbac_module,
|
|
84
|
+
sandbox_module,
|
|
85
|
+
scheduler_module,
|
|
86
|
+
security_module,
|
|
87
|
+
store_module,
|
|
88
|
+
support_module,
|
|
89
|
+
tags_module,
|
|
90
|
+
tours_module,
|
|
91
|
+
workspaces_module,
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class LabsofscienceSDK:
|
|
96
|
+
"""The main Labsofscience SDK client.
|
|
97
|
+
|
|
98
|
+
Provides typed, ergonomic access to all Labsofscience API operations through
|
|
99
|
+
domain-specific modules mounted from ``burdenoff-sdk-libs``.
|
|
100
|
+
|
|
101
|
+
Endpoints default to the Burdenoff production gateways. Override them via
|
|
102
|
+
constructor arguments or environment variables
|
|
103
|
+
``LABSOFSCIENCE_WORKSPACE_ENDPOINT`` / ``LABSOFSCIENCE_GLOBAL_ENDPOINT``
|
|
104
|
+
(or the generic ``BURDENOFF_WORKSPACE_ENDPOINT`` /
|
|
105
|
+
``BURDENOFF_GLOBAL_ENDPOINT``).
|
|
106
|
+
|
|
107
|
+
Example::
|
|
108
|
+
|
|
109
|
+
from labsofscience_sdk import LabsofscienceSDK
|
|
110
|
+
|
|
111
|
+
# Production endpoints are used when none are supplied.
|
|
112
|
+
sdk = LabsofscienceSDK()
|
|
113
|
+
|
|
114
|
+
await sdk.auth.sign_in(email="user@example.com", password="secret")
|
|
115
|
+
projects = await sdk.labsofscience.projects.list()
|
|
116
|
+
tags = await sdk.tags.list()
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
def __init__(
|
|
120
|
+
self,
|
|
121
|
+
workspace_endpoint: Optional[str] = None,
|
|
122
|
+
global_endpoint: Optional[str] = None,
|
|
123
|
+
*,
|
|
124
|
+
product_version: str = "0.0.0",
|
|
125
|
+
oidc_issuer: Optional[str] = None,
|
|
126
|
+
client_id: Optional[str] = None,
|
|
127
|
+
client_secret: Optional[str] = None,
|
|
128
|
+
redirect_uri: Optional[str] = None,
|
|
129
|
+
api_key: Optional[str] = None,
|
|
130
|
+
access_token: Optional[str] = None,
|
|
131
|
+
refresh_token: Optional[str] = None,
|
|
132
|
+
workspace_token: Optional[str] = None,
|
|
133
|
+
token_store: Optional[Any] = None,
|
|
134
|
+
timeout: float = 30.0,
|
|
135
|
+
auto_refresh: bool = True,
|
|
136
|
+
) -> None:
|
|
137
|
+
self.ctx: SdkContext = build_context(
|
|
138
|
+
product_name="labsofscience",
|
|
139
|
+
product_version=product_version,
|
|
140
|
+
workspace_endpoint=workspace_endpoint,
|
|
141
|
+
global_endpoint=global_endpoint,
|
|
142
|
+
oidc_issuer=oidc_issuer,
|
|
143
|
+
client_id=client_id,
|
|
144
|
+
client_secret=client_secret,
|
|
145
|
+
redirect_uri=redirect_uri,
|
|
146
|
+
api_key=api_key,
|
|
147
|
+
access_token=access_token,
|
|
148
|
+
refresh_token=refresh_token,
|
|
149
|
+
workspace_token=workspace_token,
|
|
150
|
+
token_store=token_store,
|
|
151
|
+
timeout=timeout,
|
|
152
|
+
auto_refresh=auto_refresh,
|
|
153
|
+
)
|
|
154
|
+
mounted = create_sdk(self.ctx, _LABSOFSCIENCE_MODULES)
|
|
155
|
+
|
|
156
|
+
# Each module's API is exposed at the top level. The labsofscience-domain
|
|
157
|
+
# bundle keeps its sub-entities nested (sdk.labsofscience.projects, etc.).
|
|
158
|
+
self.auth = mounted[auth_module.id]
|
|
159
|
+
"""Auth API: sign in, sign up, OAuth flows, token refresh."""
|
|
160
|
+
self.billing = mounted[billing_module.id]
|
|
161
|
+
"""Billing API: subscriptions, invoices, plans, addons, credits."""
|
|
162
|
+
self.channels = mounted[channels_module.id]
|
|
163
|
+
"""Channels API: messaging channels + delivery."""
|
|
164
|
+
self.conversations = mounted[conversations_module.id]
|
|
165
|
+
"""Conversations API: threads, messages, settings."""
|
|
166
|
+
self.devportal = mounted[devportal_module.id]
|
|
167
|
+
"""Developer Portal API: apps, OAuth, api keys, webhooks, delegations."""
|
|
168
|
+
self.export = mounted[export_module.id]
|
|
169
|
+
"""Export API: jobs, templates, downloads."""
|
|
170
|
+
self.files = mounted[files_module.id]
|
|
171
|
+
"""Files API: browse, upload, share."""
|
|
172
|
+
self.groups = mounted[groups_module.id]
|
|
173
|
+
"""Groups API: CRUD + members + hierarchy."""
|
|
174
|
+
self.health = mounted[health_module.id]
|
|
175
|
+
"""Health-check API: ping workspace + global gateways."""
|
|
176
|
+
self.integrations = mounted[integrations_module.id]
|
|
177
|
+
"""Integrations API: providers + connections."""
|
|
178
|
+
self.labsofscience = mounted[labsofscience_module.id]
|
|
179
|
+
"""Labsofscience-domain API: projects, experiments, runs, protocols,
|
|
180
|
+
datasets, notebook, instruments, inventory, pipelines, system."""
|
|
181
|
+
self.notifications = mounted[notifications_module.id]
|
|
182
|
+
"""Notifications API: list, read, preferences."""
|
|
183
|
+
self.organizations = mounted[organizations_module.id]
|
|
184
|
+
"""Organizations API: list, invites, members."""
|
|
185
|
+
self.products = mounted[products_module.id]
|
|
186
|
+
"""Products API: products, shortcuts, content pages, feature flags."""
|
|
187
|
+
self.rbac = mounted[rbac_module.id]
|
|
188
|
+
"""RBAC API: roles, policies, permission checks."""
|
|
189
|
+
self.sandbox = mounted[sandbox_module.id]
|
|
190
|
+
"""Sandbox API: ephemeral sandbox lifecycle, templates, tags, exports."""
|
|
191
|
+
self.scheduler = mounted[scheduler_module.id]
|
|
192
|
+
"""Scheduler API: jobs + executions."""
|
|
193
|
+
self.security = mounted[security_module.id]
|
|
194
|
+
"""Security API: vaults + secrets."""
|
|
195
|
+
self.store = mounted[store_module.id]
|
|
196
|
+
"""Store API: marketplace search, cart, orders, installs."""
|
|
197
|
+
self.support = mounted[support_module.id]
|
|
198
|
+
"""Support API: tickets + knowledge base."""
|
|
199
|
+
self.tags = mounted[tags_module.id]
|
|
200
|
+
"""Tags API: CRUD + analytics + permissions."""
|
|
201
|
+
self.tours = mounted[tours_module.id]
|
|
202
|
+
"""Tours API: onboarding flows + progress."""
|
|
203
|
+
self.workspaces = mounted[workspaces_module.id]
|
|
204
|
+
"""Workspaces API: CRUD + members + projects + invites."""
|
|
205
|
+
|
|
206
|
+
# -------------------------------------------------------------------------
|
|
207
|
+
# Token management — delegated to ctx.auth
|
|
208
|
+
# -------------------------------------------------------------------------
|
|
209
|
+
|
|
210
|
+
async def set_tokens(
|
|
211
|
+
self,
|
|
212
|
+
access_token: str,
|
|
213
|
+
refresh_token: str,
|
|
214
|
+
expires_at: Optional[float] = None,
|
|
215
|
+
) -> None:
|
|
216
|
+
"""Store auth tokens on the underlying client."""
|
|
217
|
+
await self.ctx.auth.set_tokens(
|
|
218
|
+
TokenPair(
|
|
219
|
+
access_token=access_token,
|
|
220
|
+
refresh_token=refresh_token,
|
|
221
|
+
expires_at=expires_at,
|
|
222
|
+
)
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
def set_workspace_token(self, token: Optional[str]) -> None:
|
|
226
|
+
"""Store a workspace-scoped JWT on the underlying client."""
|
|
227
|
+
self.ctx.auth.set_workspace_token(token)
|
|
228
|
+
|
|
229
|
+
async def clear_tokens(self) -> None:
|
|
230
|
+
"""Clear all auth tokens."""
|
|
231
|
+
await self.ctx.auth.clear_tokens()
|
|
232
|
+
|
|
233
|
+
async def is_authenticated(self) -> bool:
|
|
234
|
+
"""Whether the client currently has tokens (may be expired)."""
|
|
235
|
+
return await self.ctx.auth.is_authenticated()
|
|
236
|
+
|
|
237
|
+
async def close(self) -> None:
|
|
238
|
+
"""Close the underlying HTTP client and release resources."""
|
|
239
|
+
await self.ctx.client.close()
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
# PEP 562 lazy attributes — keeps `import labsofscience_sdk` cheap. Re-exports
|
|
243
|
+
# from sdk-libs are eager because every caller needs them.
|
|
244
|
+
_LAZY: dict[str, str] = {}
|
|
245
|
+
|
|
246
|
+
if TYPE_CHECKING: # pragma: no cover
|
|
247
|
+
pass
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def __getattr__(name: str) -> Any:
|
|
251
|
+
target = _LAZY.get(name)
|
|
252
|
+
if target is None:
|
|
253
|
+
raise AttributeError(f"module 'labsofscience_sdk' has no attribute '{name}'")
|
|
254
|
+
import importlib
|
|
255
|
+
|
|
256
|
+
mod = importlib.import_module(target, package=__name__)
|
|
257
|
+
return getattr(mod, name)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
__all__ = [
|
|
261
|
+
# SDK facade
|
|
262
|
+
"LabsofscienceSDK",
|
|
263
|
+
# Errors (re-exported from sdk-libs core)
|
|
264
|
+
"LabsofscienceError",
|
|
265
|
+
"AuthenticationError",
|
|
266
|
+
"AuthorizationError",
|
|
267
|
+
"NetworkError",
|
|
268
|
+
"ValidationError",
|
|
269
|
+
"RateLimitError",
|
|
270
|
+
"DeviceCodeExpiredError",
|
|
271
|
+
"DeviceCodeDeniedError",
|
|
272
|
+
# Token primitives
|
|
273
|
+
"TokenPair",
|
|
274
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: labsofscience-sdk
|
|
3
|
+
Version: 2026.1204.1
|
|
4
|
+
Summary: Official Python SDK for Labsofscience — thin shell over burdenoff-sdk-libs
|
|
5
|
+
Project-URL: Homepage, https://github.com/algoshred/labsofscience-sdk-python
|
|
6
|
+
Project-URL: Documentation, https://docs.algoshred.com/sdk/python
|
|
7
|
+
Project-URL: Repository, https://github.com/algoshred/labsofscience-sdk-python
|
|
8
|
+
Project-URL: Issues, https://github.com/algoshred/labsofscience-sdk-python/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/algoshred/labsofscience-sdk-python/blob/main/CHANGELOG.md
|
|
10
|
+
Author-email: "Vignesh T.V" <vignesh@algoshred.com>
|
|
11
|
+
Maintainer-email: "Vignesh T.V" <vignesh@algoshred.com>
|
|
12
|
+
License: Copyright (c) 2025 Burdenoff Consultancy Services Private Limited, Algoshred Technologies Private Limited and all sister companies.
|
|
13
|
+
|
|
14
|
+
All rights reserved.
|
|
15
|
+
|
|
16
|
+
This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without the express written permission of the copyright holders.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
19
|
+
|
|
20
|
+
For licensing inquiries, please contact: legal@algoshred.com
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Keywords: api-client,burdenoff,graphql,labsofscience,python,research-lab,science,sdk
|
|
23
|
+
Classifier: Development Status :: 3 - Alpha
|
|
24
|
+
Classifier: Intended Audience :: Developers
|
|
25
|
+
Classifier: License :: Other/Proprietary License
|
|
26
|
+
Classifier: Operating System :: OS Independent
|
|
27
|
+
Classifier: Programming Language :: Python :: 3
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
29
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
30
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
31
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
32
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
33
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
34
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
35
|
+
Requires-Python: >=3.10
|
|
36
|
+
Requires-Dist: burdenoff-sdk-libs>=2026.1107.1
|
|
37
|
+
Requires-Dist: httpx>=0.24.0
|
|
38
|
+
Requires-Dist: typing-extensions>=4.0.0; python_version < '3.11'
|
|
39
|
+
Provides-Extra: dev
|
|
40
|
+
Requires-Dist: black>=23.0.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: flake8>=6.0.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: isort>=5.12.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
46
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
47
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
48
|
+
Provides-Extra: docs
|
|
49
|
+
Requires-Dist: sphinx-autodoc-typehints>=1.19.0; extra == 'docs'
|
|
50
|
+
Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == 'docs'
|
|
51
|
+
Requires-Dist: sphinx>=6.0.0; extra == 'docs'
|
|
52
|
+
Provides-Extra: test
|
|
53
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'test'
|
|
54
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
|
|
55
|
+
Requires-Dist: pytest>=7.0.0; extra == 'test'
|
|
56
|
+
Requires-Dist: respx>=0.21.0; extra == 'test'
|
|
57
|
+
Description-Content-Type: text/markdown
|
|
58
|
+
|
|
59
|
+
# labsofscience-sdk
|
|
60
|
+
|
|
61
|
+
Official Python SDK for **Labsofscience** — a science & discovery / research-lab management platform on the Burdenoff platform.
|
|
62
|
+
|
|
63
|
+
> **Pre-launch notice:** Labsofscience is launching in 2026. This package is published ahead of general availability so integrators can build early. There is no live production service yet — [join the waitlist at labsofscience.com](https://labsofscience.com) to get early access.
|
|
64
|
+
|
|
65
|
+
This SDK is a **thin shell** over [`burdenoff-sdk-libs`](https://github.com/algoshred/sdk-libs-python). It mounts the shared platform modules plus the Labsofscience domain module and a standalone sandbox module, and exposes them as one ergonomic, fully typed client.
|
|
66
|
+
|
|
67
|
+
## Features
|
|
68
|
+
|
|
69
|
+
- Async/await throughout, built on `httpx`
|
|
70
|
+
- Dual-endpoint GraphQL client (workspace + global gateways)
|
|
71
|
+
- 23 mounted modules: the shared generic set + `labsofscience` + `sandbox`
|
|
72
|
+
- Multiple auth flows: email/password, device code, PKCE, client credentials
|
|
73
|
+
- Automatic token refresh
|
|
74
|
+
- Typed error hierarchy
|
|
75
|
+
- Full type hints with `py.typed` marker
|
|
76
|
+
|
|
77
|
+
## Installation
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install labsofscience-sdk
|
|
81
|
+
|
|
82
|
+
# Development install
|
|
83
|
+
pip install -e ".[dev]"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Quick Start
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
import asyncio
|
|
90
|
+
from labsofscience_sdk import LabsofscienceSDK
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
async def main():
|
|
94
|
+
# Defaults to the shared prod gateways and the burdenoff_cli_labsofscience
|
|
95
|
+
# OIDC client. Override the endpoints for local dev.
|
|
96
|
+
sdk = LabsofscienceSDK()
|
|
97
|
+
|
|
98
|
+
# Sign in with email/password
|
|
99
|
+
await sdk.auth.sign_in(email="user@example.com", password="secret")
|
|
100
|
+
|
|
101
|
+
# Labsofscience-domain operations are nested under sdk.labsofscience
|
|
102
|
+
projects = await sdk.labsofscience.projects.list()
|
|
103
|
+
experiments = await sdk.labsofscience.experiments.list()
|
|
104
|
+
|
|
105
|
+
# Shared cross-product modules are mounted at the top level
|
|
106
|
+
tags = await sdk.tags.list()
|
|
107
|
+
|
|
108
|
+
await sdk.close()
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
asyncio.run(main())
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Nested namespace
|
|
115
|
+
|
|
116
|
+
Per the platform mandate (no compatibility shim), every module surface is nested
|
|
117
|
+
under its owning module. The Labsofscience domain bundle keeps its sub-entities
|
|
118
|
+
nested:
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
await sdk.labsofscience.projects.list()
|
|
122
|
+
await sdk.labsofscience.experiments.list()
|
|
123
|
+
await sdk.labsofscience.runs.list()
|
|
124
|
+
await sdk.labsofscience.protocols.list()
|
|
125
|
+
await sdk.labsofscience.datasets.list()
|
|
126
|
+
await sdk.labsofscience.notebook.list()
|
|
127
|
+
await sdk.labsofscience.instruments.list()
|
|
128
|
+
await sdk.labsofscience.inventory.list()
|
|
129
|
+
await sdk.labsofscience.pipelines.list()
|
|
130
|
+
await sdk.labsofscience.system.health()
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Modules
|
|
134
|
+
|
|
135
|
+
All methods are async. The following modules are mounted on the `LabsofscienceSDK`
|
|
136
|
+
instance: `auth`, `billing`, `channels`, `conversations`, `devportal`,
|
|
137
|
+
`export`, `files`, `groups`, `health`, `integrations`, `labsofscience`,
|
|
138
|
+
`notifications`, `organizations`, `products`, `rbac`, `sandbox`, `scheduler`,
|
|
139
|
+
`security`, `store`, `support`, `tags`, `tours`, `workspaces`.
|
|
140
|
+
|
|
141
|
+
## Configuration
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
from labsofscience_sdk import LabsofscienceSDK
|
|
145
|
+
|
|
146
|
+
sdk = LabsofscienceSDK(
|
|
147
|
+
workspace_endpoint="https://graphqlworkspaces.burdenoff.com/workspaces/graphql",
|
|
148
|
+
global_endpoint="https://graphql.burdenoff.com/global/graphql",
|
|
149
|
+
client_id="burdenoff_cli_labsofscience", # default
|
|
150
|
+
oidc_issuer=None, # derived from global_endpoint
|
|
151
|
+
api_key=None,
|
|
152
|
+
access_token=None,
|
|
153
|
+
refresh_token=None,
|
|
154
|
+
workspace_token=None,
|
|
155
|
+
timeout=30.0,
|
|
156
|
+
auto_refresh=True,
|
|
157
|
+
)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Error Handling
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
from labsofscience_sdk import (
|
|
164
|
+
LabsofscienceError,
|
|
165
|
+
AuthenticationError,
|
|
166
|
+
AuthorizationError,
|
|
167
|
+
NetworkError,
|
|
168
|
+
ValidationError,
|
|
169
|
+
RateLimitError,
|
|
170
|
+
DeviceCodeExpiredError,
|
|
171
|
+
DeviceCodeDeniedError,
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
try:
|
|
175
|
+
await sdk.auth.sign_in(email="user@example.com", password="wrong")
|
|
176
|
+
except AuthenticationError:
|
|
177
|
+
print("Invalid credentials")
|
|
178
|
+
except NetworkError:
|
|
179
|
+
print("Could not reach the API")
|
|
180
|
+
except LabsofscienceError as e:
|
|
181
|
+
print(f"SDK error: {e}")
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Development
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
python -m venv .venv && source .venv/bin/activate
|
|
188
|
+
pip install -e ".[dev]"
|
|
189
|
+
|
|
190
|
+
make format # black + isort
|
|
191
|
+
make lint # flake8
|
|
192
|
+
make type-check # mypy (strict)
|
|
193
|
+
make test # pytest
|
|
194
|
+
make sanity # format-check + lint + type-check + test (cov>=80) + build
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## License
|
|
198
|
+
|
|
199
|
+
Proprietary — Copyright Burdenoff Consultancy Services Pvt. Ltd.
|
|
200
|
+
|
|
201
|
+
## Support
|
|
202
|
+
|
|
203
|
+
- Issues: [GitHub Issues](https://github.com/algoshred/labsofscience-sdk-python/issues)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
labsofscience_sdk/__init__.py,sha256=r_b3WFGf1OVZACRNyTqLljrGWX7_RjRVD57lpums3-s,10655
|
|
2
|
+
labsofscience_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
labsofscience_sdk-2026.1204.1.dist-info/METADATA,sha256=PtPmQqRefNZzS8-qj_eB3lFiAAosyYfZ6KdFyKQey4E,7811
|
|
4
|
+
labsofscience_sdk-2026.1204.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
5
|
+
labsofscience_sdk-2026.1204.1.dist-info/licenses/LICENSE,sha256=5AjiQIUQ3DvfeZDaBTtGd9v4chQCDLjybhmBxO7JvuE,904
|
|
6
|
+
labsofscience_sdk-2026.1204.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Copyright (c) 2025 Burdenoff Consultancy Services Private Limited, Algoshred Technologies Private Limited and all sister companies.
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without the express written permission of the copyright holders.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8
|
+
|
|
9
|
+
For licensing inquiries, please contact: legal@algoshred.com
|