burdenoff-workspaces-sdk 2026.1031.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.
@@ -0,0 +1,39 @@
1
+ node_modules/
2
+ dist/
3
+ *.log
4
+
5
+ # Environment files
6
+ .env
7
+ .env.local
8
+ .env.*.local
9
+
10
+ # Virtual environments
11
+ venv/
12
+ .venv/
13
+ env/
14
+ test_venv/
15
+
16
+ # Python cache files
17
+ __pycache__/
18
+ *.py[cod]
19
+ *.egg-info/
20
+ .coverage
21
+ .pytest_cache/
22
+ htmlcov/
23
+ coverage.xml
24
+
25
+ # Tests (keep test files but ignore test artifacts)
26
+ test/__pycache__/
27
+ test/.pytest_cache/
28
+ .vibe-env.json
29
+ bun.lock.workspace
30
+ .package.npm.json
31
+ .package.workspace.json
32
+ .claude/
33
+ .DS_Store
34
+ sanity.log
35
+ .npmrc
36
+ temp/
37
+
38
+ .build-sha
39
+ **/.build-sha
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ All notable changes to burdenoff-workspaces-sdk are documented here.
4
+ The project uses CalVer (`YYYY.MDD.PATCH`); the version is stamped by the
5
+ release workflow and is not committed.
6
+
7
+ ## [Unreleased]
8
+
9
+ ### Changed
10
+ - Rebuilt as a thin shell over `burdenoff-sdk-libs` (BOFF-4420). The
11
+ hand-written 2025 client, which targeted a schema snapshot from July 2025,
12
+ is removed. Every operation now comes from the shared sdk-libs modules,
13
+ which are checked against the production supergraph.
14
+ - Distribution name is `burdenoff-workspaces-sdk`; the import package is
15
+ `workspaces_sdk`.
16
+ - Mounts 17 modules: auth, conversations, export, files, groups, health,
17
+ integrations, notifications, organizations, products, rbac, security, store,
18
+ support, tags, tours, workspaces.
19
+
20
+ ### Added
21
+ - Release workflow (`.github/workflows/release.yml`) on the shared
22
+ algoshred/dev release-pypi workflow, with a hash-locked `uv.lock`.
@@ -0,0 +1,26 @@
1
+ Proprietary License
2
+
3
+ Copyright © 2025 Burdenoff Consultancy Services Pvt. Ltd.
4
+
5
+ All rights reserved.
6
+
7
+ This software and associated documentation files (the "Software") are the proprietary
8
+ and confidential information of Burdenoff Consultancy Services Pvt. Ltd. ("Confidential Information").
9
+
10
+ You shall not disclose such Confidential Information and shall use it only in accordance
11
+ with the terms of the license agreement you entered into with Burdenoff Consultancy Services Pvt. Ltd..
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
14
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
15
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
16
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
17
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18
+ DEALINGS IN THE SOFTWARE.
19
+
20
+ UNAUTHORIZED COPYING, MODIFICATION, DISTRIBUTION, OR USE OF THIS SOFTWARE, VIA ANY MEDIUM,
21
+ IS STRICTLY PROHIBITED.
22
+
23
+ For licensing inquiries, please contact:
24
+ Burdenoff Consultancy Services Pvt. Ltd.
25
+ Email: contact@burdenoff.com
26
+ Website: https://burdenoff.com
@@ -0,0 +1,197 @@
1
+ Metadata-Version: 2.5
2
+ Name: burdenoff-workspaces-sdk
3
+ Version: 2026.1031.1
4
+ Summary: Official Python SDK for Burdenoff Workspaces — thin shell over burdenoff-sdk-libs
5
+ Project-URL: Homepage, https://github.com/algoshred/workspaces-sdk-python
6
+ Project-URL: Documentation, https://docs.burdenoff.com/developers/python-sdk
7
+ Project-URL: Repository, https://github.com/algoshred/workspaces-sdk-python
8
+ Project-URL: Issues, https://github.com/algoshred/workspaces-sdk-python/issues
9
+ Project-URL: Changelog, https://github.com/algoshred/workspaces-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: Proprietary License
13
+
14
+ Copyright © 2025 Burdenoff Consultancy Services Pvt. Ltd.
15
+
16
+ All rights reserved.
17
+
18
+ This software and associated documentation files (the "Software") are the proprietary
19
+ and confidential information of Burdenoff Consultancy Services Pvt. Ltd. ("Confidential Information").
20
+
21
+ You shall not disclose such Confidential Information and shall use it only in accordance
22
+ with the terms of the license agreement you entered into with Burdenoff Consultancy Services Pvt. Ltd..
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
25
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
26
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
27
+ FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
28
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29
+ DEALINGS IN THE SOFTWARE.
30
+
31
+ UNAUTHORIZED COPYING, MODIFICATION, DISTRIBUTION, OR USE OF THIS SOFTWARE, VIA ANY MEDIUM,
32
+ IS STRICTLY PROHIBITED.
33
+
34
+ For licensing inquiries, please contact:
35
+ Burdenoff Consultancy Services Pvt. Ltd.
36
+ Email: contact@burdenoff.com
37
+ Website: https://burdenoff.com
38
+ License-File: LICENSE
39
+ Keywords: api-client,burdenoff,collaboration,graphql,python,sdk,workspaces
40
+ Classifier: Development Status :: 3 - Alpha
41
+ Classifier: Intended Audience :: Developers
42
+ Classifier: License :: Other/Proprietary License
43
+ Classifier: Operating System :: OS Independent
44
+ Classifier: Programming Language :: Python :: 3
45
+ Classifier: Programming Language :: Python :: 3.10
46
+ Classifier: Programming Language :: Python :: 3.11
47
+ Classifier: Programming Language :: Python :: 3.12
48
+ Classifier: Programming Language :: Python :: 3.13
49
+ Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
50
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
51
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
52
+ Requires-Python: >=3.10
53
+ Requires-Dist: burdenoff-sdk-libs>=2026.1031.1
54
+ Requires-Dist: httpx>=0.24.0
55
+ Requires-Dist: typing-extensions>=4.0.0; python_version < '3.11'
56
+ Provides-Extra: dev
57
+ Requires-Dist: black>=23.0.0; extra == 'dev'
58
+ Requires-Dist: flake8>=6.0.0; extra == 'dev'
59
+ Requires-Dist: isort>=5.12.0; extra == 'dev'
60
+ Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
61
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
62
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
63
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
64
+ Provides-Extra: docs
65
+ Requires-Dist: sphinx-autodoc-typehints>=1.19.0; extra == 'docs'
66
+ Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == 'docs'
67
+ Requires-Dist: sphinx>=6.0.0; extra == 'docs'
68
+ Provides-Extra: test
69
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'test'
70
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
71
+ Requires-Dist: pytest>=7.0.0; extra == 'test'
72
+ Requires-Dist: respx>=0.21.0; extra == 'test'
73
+ Description-Content-Type: text/markdown
74
+
75
+ # Burdenoff Workspaces SDK for Python
76
+
77
+ `burdenoff-workspaces-sdk` is the official async Python client for the
78
+ [Burdenoff Workspaces](https://burdenoff.com) platform API.
79
+
80
+ It is a thin shell over [`burdenoff-sdk-libs`](https://pypi.org/project/burdenoff-sdk-libs/):
81
+ every GraphQL operation lives in a shared sdk-libs module, so this SDK, the
82
+ Workspaces CLI and the other Burdenoff product SDKs send the same documents.
83
+ This package picks the modules the Workspaces product exposes, points them at
84
+ the production gateways and gives you one typed client.
85
+
86
+ ## Install
87
+
88
+ ```bash
89
+ pip install burdenoff-workspaces-sdk
90
+ ```
91
+
92
+ Python 3.10 or newer.
93
+
94
+ ## Quick start
95
+
96
+ ```python
97
+ import asyncio
98
+ import os
99
+
100
+ from burdenoff_sdk_libs.modules.auth.types import SignInInput
101
+ from workspaces_sdk import WorkspacesSDK
102
+
103
+
104
+ async def main() -> None:
105
+ sdk = WorkspacesSDK() # production endpoints by default
106
+ try:
107
+ await sdk.auth.sign_in(
108
+ SignInInput(
109
+ username=os.environ["WORKSPACES_EMAIL"],
110
+ password=os.environ["WORKSPACES_PASSWORD"],
111
+ )
112
+ )
113
+ me = await sdk.auth.get_current_user()
114
+ print("Signed in as", me.email)
115
+
116
+ workspaces = await sdk.workspaces.list()
117
+ for workspace in workspaces.items:
118
+ print(workspace.id, workspace.name)
119
+ finally:
120
+ await sdk.close()
121
+
122
+
123
+ asyncio.run(main())
124
+ ```
125
+
126
+ Other ways to authenticate:
127
+
128
+ - `sdk.auth.login_with_api_key(key)` for an API key.
129
+ - `sdk.auth.login_with_client_credentials(client_id, client_secret)` for an app.
130
+ - `sdk.auth.login_with_device_code()` for the OAuth2 device-code flow.
131
+ - Pass `access_token=` / `refresh_token=` to the constructor to reuse tokens.
132
+
133
+ Workspace-scoped calls use the token you get from
134
+ `sdk.auth.issue_workspace_token(workspace_id, organization_id)`.
135
+
136
+ ## Modules
137
+
138
+ | Attribute | What it covers |
139
+ |---|---|
140
+ | `auth` | Sign in/up, OAuth device code and PKCE, API keys, current user, workspace tokens |
141
+ | `workspaces` | Workspaces, members, projects, invites, activity log |
142
+ | `organizations` | Organizations, members, invites |
143
+ | `tags` | Universal tags and tag analytics |
144
+ | `groups` | Groups, members, hierarchy |
145
+ | `conversations` | Conversations, messages, threads, reactions |
146
+ | `files` | Files, folders, sharing |
147
+ | `notifications` | Notification inbox and preferences |
148
+ | `rbac` | Roles, policies, permission checks |
149
+ | `integrations` | Integration providers and connections |
150
+ | `security` | Vaults and secrets |
151
+ | `export` | Export jobs and templates |
152
+ | `products` | Products, shortcuts, content pages, feature flags |
153
+ | `store` | Marketplace search, cart, orders, installed apps |
154
+ | `support` | Support tickets and knowledge base |
155
+ | `tours` | Product tours and progress |
156
+ | `health` | Gateway health checks |
157
+
158
+ Billing, channels, developer portal, sandbox and scheduler are not mounted yet:
159
+ some of their sdk-libs operations do not match the production schema. They
160
+ will be added once sdk-libs repairs them.
161
+
162
+ ## Endpoints
163
+
164
+ Defaults are the production gateways. Override them per client or by
165
+ environment variable:
166
+
167
+ | Precedence | Workspace gateway | Global gateway |
168
+ |---|---|---|
169
+ | Constructor | `workspace_endpoint=` | `global_endpoint=` |
170
+ | Product env | `WORKSPACES_WORKSPACE_ENDPOINT` | `WORKSPACES_GLOBAL_ENDPOINT` |
171
+ | Generic env | `BURDENOFF_WORKSPACE_ENDPOINT` | `BURDENOFF_GLOBAL_ENDPOINT` |
172
+ | Default | `https://graphqlworkspaces.burdenoff.com/workspaces/graphql` | `https://graphql.burdenoff.com/global/graphql` |
173
+
174
+ ## Development
175
+
176
+ ```bash
177
+ uv sync --all-extras
178
+ uv run pytest # unit tests, mocked transport, no network
179
+ uv run flake8 src/
180
+ ```
181
+
182
+ ## Releasing
183
+
184
+ Releases are CalVer (`YYYY.MDD.PATCH`) and run through
185
+ `.github/workflows/release.yml`, the shared algoshred/dev release-pypi
186
+ workflow. Push a CalVer tag on a commit that is on `main`, or dispatch the
187
+ workflow with an empty version to take today's next free patch. The version
188
+ is stamped at build time and never committed back. Guide:
189
+ `dev/platform/context/delivery/cicd/HOW_TO_RELEASE_CLIENT_PACKAGES.md`.
190
+
191
+ ## Documentation
192
+
193
+ https://docs.burdenoff.com/developers/python-sdk
194
+
195
+ ## License
196
+
197
+ Proprietary. Copyright Burdenoff Consultancy Services Pvt. Ltd.
@@ -0,0 +1,123 @@
1
+ # Burdenoff Workspaces SDK for Python
2
+
3
+ `burdenoff-workspaces-sdk` is the official async Python client for the
4
+ [Burdenoff Workspaces](https://burdenoff.com) platform API.
5
+
6
+ It is a thin shell over [`burdenoff-sdk-libs`](https://pypi.org/project/burdenoff-sdk-libs/):
7
+ every GraphQL operation lives in a shared sdk-libs module, so this SDK, the
8
+ Workspaces CLI and the other Burdenoff product SDKs send the same documents.
9
+ This package picks the modules the Workspaces product exposes, points them at
10
+ the production gateways and gives you one typed client.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install burdenoff-workspaces-sdk
16
+ ```
17
+
18
+ Python 3.10 or newer.
19
+
20
+ ## Quick start
21
+
22
+ ```python
23
+ import asyncio
24
+ import os
25
+
26
+ from burdenoff_sdk_libs.modules.auth.types import SignInInput
27
+ from workspaces_sdk import WorkspacesSDK
28
+
29
+
30
+ async def main() -> None:
31
+ sdk = WorkspacesSDK() # production endpoints by default
32
+ try:
33
+ await sdk.auth.sign_in(
34
+ SignInInput(
35
+ username=os.environ["WORKSPACES_EMAIL"],
36
+ password=os.environ["WORKSPACES_PASSWORD"],
37
+ )
38
+ )
39
+ me = await sdk.auth.get_current_user()
40
+ print("Signed in as", me.email)
41
+
42
+ workspaces = await sdk.workspaces.list()
43
+ for workspace in workspaces.items:
44
+ print(workspace.id, workspace.name)
45
+ finally:
46
+ await sdk.close()
47
+
48
+
49
+ asyncio.run(main())
50
+ ```
51
+
52
+ Other ways to authenticate:
53
+
54
+ - `sdk.auth.login_with_api_key(key)` for an API key.
55
+ - `sdk.auth.login_with_client_credentials(client_id, client_secret)` for an app.
56
+ - `sdk.auth.login_with_device_code()` for the OAuth2 device-code flow.
57
+ - Pass `access_token=` / `refresh_token=` to the constructor to reuse tokens.
58
+
59
+ Workspace-scoped calls use the token you get from
60
+ `sdk.auth.issue_workspace_token(workspace_id, organization_id)`.
61
+
62
+ ## Modules
63
+
64
+ | Attribute | What it covers |
65
+ |---|---|
66
+ | `auth` | Sign in/up, OAuth device code and PKCE, API keys, current user, workspace tokens |
67
+ | `workspaces` | Workspaces, members, projects, invites, activity log |
68
+ | `organizations` | Organizations, members, invites |
69
+ | `tags` | Universal tags and tag analytics |
70
+ | `groups` | Groups, members, hierarchy |
71
+ | `conversations` | Conversations, messages, threads, reactions |
72
+ | `files` | Files, folders, sharing |
73
+ | `notifications` | Notification inbox and preferences |
74
+ | `rbac` | Roles, policies, permission checks |
75
+ | `integrations` | Integration providers and connections |
76
+ | `security` | Vaults and secrets |
77
+ | `export` | Export jobs and templates |
78
+ | `products` | Products, shortcuts, content pages, feature flags |
79
+ | `store` | Marketplace search, cart, orders, installed apps |
80
+ | `support` | Support tickets and knowledge base |
81
+ | `tours` | Product tours and progress |
82
+ | `health` | Gateway health checks |
83
+
84
+ Billing, channels, developer portal, sandbox and scheduler are not mounted yet:
85
+ some of their sdk-libs operations do not match the production schema. They
86
+ will be added once sdk-libs repairs them.
87
+
88
+ ## Endpoints
89
+
90
+ Defaults are the production gateways. Override them per client or by
91
+ environment variable:
92
+
93
+ | Precedence | Workspace gateway | Global gateway |
94
+ |---|---|---|
95
+ | Constructor | `workspace_endpoint=` | `global_endpoint=` |
96
+ | Product env | `WORKSPACES_WORKSPACE_ENDPOINT` | `WORKSPACES_GLOBAL_ENDPOINT` |
97
+ | Generic env | `BURDENOFF_WORKSPACE_ENDPOINT` | `BURDENOFF_GLOBAL_ENDPOINT` |
98
+ | Default | `https://graphqlworkspaces.burdenoff.com/workspaces/graphql` | `https://graphql.burdenoff.com/global/graphql` |
99
+
100
+ ## Development
101
+
102
+ ```bash
103
+ uv sync --all-extras
104
+ uv run pytest # unit tests, mocked transport, no network
105
+ uv run flake8 src/
106
+ ```
107
+
108
+ ## Releasing
109
+
110
+ Releases are CalVer (`YYYY.MDD.PATCH`) and run through
111
+ `.github/workflows/release.yml`, the shared algoshred/dev release-pypi
112
+ workflow. Push a CalVer tag on a commit that is on `main`, or dispatch the
113
+ workflow with an empty version to take today's next free patch. The version
114
+ is stamped at build time and never committed back. Guide:
115
+ `dev/platform/context/delivery/cicd/HOW_TO_RELEASE_CLIENT_PACKAGES.md`.
116
+
117
+ ## Documentation
118
+
119
+ https://docs.burdenoff.com/developers/python-sdk
120
+
121
+ ## License
122
+
123
+ Proprietary. Copyright Burdenoff Consultancy Services Pvt. Ltd.
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,57 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+
9
+ project = 'Burdenoff Workspaces SDK for Python'
10
+ copyright = '2024, Vignesh T.V'
11
+ author = 'Vignesh T.V'
12
+ release = '0.1.0'
13
+
14
+ # -- General configuration ---------------------------------------------------
15
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
16
+
17
+ extensions = [
18
+ 'sphinx.ext.autodoc',
19
+ 'sphinx.ext.automodule',
20
+ 'sphinx.ext.viewcode',
21
+ 'sphinx.ext.napoleon',
22
+ 'sphinx_autodoc_typehints',
23
+ ]
24
+
25
+ templates_path = ['_templates']
26
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
27
+
28
+ # -- Options for HTML output -------------------------------------------------
29
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
30
+
31
+ html_theme = 'sphinx_rtd_theme'
32
+ html_static_path = ['_static']
33
+
34
+ # -- Options for autodoc ----------------------------------------------------
35
+ autodoc_default_options = {
36
+ 'members': True,
37
+ 'member-order': 'bysource',
38
+ 'special-members': '__init__',
39
+ 'undoc-members': True,
40
+ 'exclude-members': '__weakref__'
41
+ }
42
+
43
+ # -- Options for napoleon ---------------------------------------------------
44
+ napoleon_google_docstring = True
45
+ napoleon_numpy_docstring = True
46
+ napoleon_include_init_with_doc = False
47
+ napoleon_include_private_with_doc = False
48
+ napoleon_include_special_with_doc = True
49
+ napoleon_use_admonition_for_examples = False
50
+ napoleon_use_admonition_for_notes = False
51
+ napoleon_use_admonition_for_references = False
52
+ napoleon_use_ivar = False
53
+ napoleon_use_param = True
54
+ napoleon_use_rtype = True
55
+ napoleon_preprocess_types = False
56
+ napoleon_type_aliases = None
57
+ napoleon_attr_annotations = True
@@ -0,0 +1,23 @@
1
+ Burdenoff Workspaces SDK for Python
2
+ ===================================
3
+
4
+ ``burdenoff-workspaces-sdk`` is the official async Python client for the
5
+ Burdenoff Workspaces platform. It is a thin shell over ``burdenoff-sdk-libs``:
6
+ every GraphQL operation lives in a shared sdk-libs module, and this package
7
+ mounts the modules the Workspaces product exposes.
8
+
9
+ User guide: https://docs.burdenoff.com/developers/python-sdk
10
+
11
+ API reference
12
+ -------------
13
+
14
+ .. automodule:: workspaces_sdk
15
+ :members:
16
+ :undoc-members:
17
+
18
+ Indices and tables
19
+ ==================
20
+
21
+ * :ref:`genindex`
22
+ * :ref:`modindex`
23
+ * :ref:`search`
@@ -0,0 +1,44 @@
1
+ """Basic usage of the Burdenoff Workspaces SDK.
2
+
3
+ Signs in with a username and password, prints the current user and lists the
4
+ caller's workspaces.
5
+
6
+ Credentials come from the environment, never from source:
7
+
8
+ WORKSPACES_EMAIL=you@example.com WORKSPACES_PASSWORD=... \\
9
+ python examples/basic_usage.py
10
+
11
+ Endpoints default to production; set WORKSPACES_WORKSPACE_ENDPOINT and
12
+ WORKSPACES_GLOBAL_ENDPOINT to target another environment.
13
+ """
14
+
15
+ import asyncio
16
+ import os
17
+
18
+ from burdenoff_sdk_libs.modules.auth.types import SignInInput
19
+
20
+ from workspaces_sdk import WorkspacesSDK
21
+
22
+
23
+ async def main() -> None:
24
+ sdk = WorkspacesSDK()
25
+ try:
26
+ await sdk.auth.sign_in(
27
+ SignInInput(
28
+ username=os.environ["WORKSPACES_EMAIL"],
29
+ password=os.environ["WORKSPACES_PASSWORD"],
30
+ )
31
+ )
32
+ me = await sdk.auth.get_current_user()
33
+ print(f"Signed in as {me.email}")
34
+
35
+ workspaces = await sdk.workspaces.list()
36
+ print(f"{workspaces.total} workspace(s)")
37
+ for workspace in workspaces.items:
38
+ print(f" {workspace.id} {workspace.name}")
39
+ finally:
40
+ await sdk.close()
41
+
42
+
43
+ if __name__ == "__main__":
44
+ asyncio.run(main())