kotharcomputing 0.106.0__tar.gz → 1.0.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.
Files changed (47) hide show
  1. kotharcomputing-1.0.1/PKG-INFO +74 -0
  2. kotharcomputing-1.0.1/README.md +57 -0
  3. {kotharcomputing-0.106.0 → kotharcomputing-1.0.1}/pyproject.toml +4 -19
  4. kotharcomputing-1.0.1/src/kotharcomputing/__init__.py +54 -0
  5. kotharcomputing-1.0.1/src/kotharcomputing/_generated/__init__.py +1 -0
  6. kotharcomputing-1.0.1/src/kotharcomputing/_generated/operations.py +1702 -0
  7. kotharcomputing-1.0.1/src/kotharcomputing/_generated/types.py +1834 -0
  8. kotharcomputing-1.0.1/src/kotharcomputing/aleph_language_server.py +288 -0
  9. kotharcomputing-1.0.1/src/kotharcomputing/client.py +934 -0
  10. {kotharcomputing-0.106.0 → kotharcomputing-1.0.1}/src/kotharcomputing/errors.py +5 -13
  11. kotharcomputing-1.0.1/src/kotharcomputing/py.typed +1 -0
  12. kotharcomputing-1.0.1/src/kotharcomputing/transport.py +321 -0
  13. kotharcomputing-1.0.1/src/kotharcomputing.egg-info/PKG-INFO +74 -0
  14. kotharcomputing-1.0.1/src/kotharcomputing.egg-info/SOURCES.txt +15 -0
  15. kotharcomputing-0.106.0/LICENSE +0 -179
  16. kotharcomputing-0.106.0/PKG-INFO +0 -53
  17. kotharcomputing-0.106.0/README.md +0 -31
  18. kotharcomputing-0.106.0/src/kotharcomputing/__init__.py +0 -299
  19. kotharcomputing-0.106.0/src/kotharcomputing/agents.py +0 -186
  20. kotharcomputing-0.106.0/src/kotharcomputing/ai.py +0 -244
  21. kotharcomputing-0.106.0/src/kotharcomputing/aleph_language_server.py +0 -297
  22. kotharcomputing-0.106.0/src/kotharcomputing/api_tokens.py +0 -111
  23. kotharcomputing-0.106.0/src/kotharcomputing/client.py +0 -78
  24. kotharcomputing-0.106.0/src/kotharcomputing/common.py +0 -7
  25. kotharcomputing-0.106.0/src/kotharcomputing/content_types.py +0 -53
  26. kotharcomputing-0.106.0/src/kotharcomputing/credits.py +0 -80
  27. kotharcomputing-0.106.0/src/kotharcomputing/executions.py +0 -367
  28. kotharcomputing-0.106.0/src/kotharcomputing/fetch.py +0 -572
  29. kotharcomputing-0.106.0/src/kotharcomputing/files.py +0 -263
  30. kotharcomputing-0.106.0/src/kotharcomputing/jobs.py +0 -224
  31. kotharcomputing-0.106.0/src/kotharcomputing/py.typed +0 -0
  32. kotharcomputing-0.106.0/src/kotharcomputing/runtimes.py +0 -26
  33. kotharcomputing-0.106.0/src/kotharcomputing/service_prices.py +0 -28
  34. kotharcomputing-0.106.0/src/kotharcomputing/subscribe_user.py +0 -40
  35. kotharcomputing-0.106.0/src/kotharcomputing/subscribe_workspace.py +0 -58
  36. kotharcomputing-0.106.0/src/kotharcomputing/subscriptions.py +0 -85
  37. kotharcomputing-0.106.0/src/kotharcomputing/users.py +0 -81
  38. kotharcomputing-0.106.0/src/kotharcomputing/workspaces.py +0 -79
  39. kotharcomputing-0.106.0/src/kotharcomputing.egg-info/PKG-INFO +0 -53
  40. kotharcomputing-0.106.0/src/kotharcomputing.egg-info/SOURCES.txt +0 -33
  41. kotharcomputing-0.106.0/src/kotharcomputing.egg-info/requires.txt +0 -6
  42. kotharcomputing-0.106.0/tests/test_fetch_auth_headers.py +0 -56
  43. kotharcomputing-0.106.0/tests/test_fetch_url_building.py +0 -219
  44. kotharcomputing-0.106.0/tests/test_public_api.py +0 -203
  45. {kotharcomputing-0.106.0 → kotharcomputing-1.0.1}/setup.cfg +0 -0
  46. {kotharcomputing-0.106.0 → kotharcomputing-1.0.1}/src/kotharcomputing.egg-info/dependency_links.txt +0 -0
  47. {kotharcomputing-0.106.0 → kotharcomputing-1.0.1}/src/kotharcomputing.egg-info/top_level.txt +0 -0
@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.4
2
+ Name: kotharcomputing
3
+ Version: 1.0.1
4
+ Summary: Python SDK for the Kothar API
5
+ Author: Kothar Computing
6
+ License-Expression: Apache-2.0
7
+ Keywords: kothar,api,sdk
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Typing :: Typed
15
+ Requires-Python: >=3.11
16
+ Description-Content-Type: text/markdown
17
+
18
+ # Kothar Python SDK
19
+
20
+ Python SDK for the Kothar API generated from `schemas/openapi.yml`.
21
+
22
+ Install the published SDK with `pip install kotharcomputing`. Starting with `1.0.0`,
23
+ the package is released from `kothardev/kothar-platform` and its version follows the
24
+ platform tag (`v1.0.0` publishes `1.0.0`). It replaces the package previously built
25
+ in `kothar-backend`; use the workspace and target API examples below when updating
26
+ applications from the legacy SDK. Existing PyPI releases remain available for pinned installations.
27
+
28
+ ## Aleph language server
29
+
30
+ The SDK also provides a separate anonymous HTTP client for the Aleph language
31
+ server. It does not use Kothar API authentication:
32
+
33
+ ```python
34
+ from kotharcomputing import AlephLanguageServerClient
35
+
36
+ aleph = AlephLanguageServerClient()
37
+ analysis = aleph.analyze('print("hello")', include_ast=True)
38
+ parsed = aleph.ast('print("hello")', format=True, discover_test=True)
39
+ tests = aleph.discover_tests('test "example" {}')
40
+ formatted = aleph.format('print( "hello" )')
41
+ ```
42
+
43
+ Pass `base_url=` or `AlephLanguageServerClientOptions` to use another Aleph
44
+ deployment. The default endpoint is `https://aleph.kotharcomputing.com`.
45
+
46
+ `ast` accepts an optional structured `filter` and returns a required AST with syntax and light binding diagnostics,
47
+ without establishing full type correctness. Both `ast` and `analyze` accept `format` and `discover_test`; their optional
48
+ `tests` field and the direct `discover_tests` result use `AlephTestDiscoverySection`, with recursive sections and typed
49
+ test metadata. Discovery does not execute source or tests. The client-level `timeout` applies to these methods too.
50
+
51
+ The reviewed contract is pinned in `schemas/aleph-openapi.json`; maintenance and SDK parity checks are documented in
52
+ [RFC 0013](../../../docs/rfcs/0013-workshop-tasks-and-aleph-execution.md).
53
+
54
+ ## Workshop API tokens
55
+
56
+ Create an immutable token in **Account settings → API tokens**, explicitly select its permissions, and save the
57
+ credential when it is shown. Delete it to revoke access; create a replacement to change metadata, expiration, or grants.
58
+ Non-expiring tokens keep their issued grants until revoked.
59
+
60
+ This example needs **Files → List (All files)** and **Targets → List**. Set the credential and the workspace/user IDs shown
61
+ on the account page in environment variables. API tokens cannot use the session-only `personal` or `me` aliases. Never
62
+ save credentials in source code, logs, or browser storage.
63
+
64
+ ```python
65
+ import os
66
+ from kotharcomputing import KotharClient
67
+
68
+ client = KotharClient(access_token=os.environ["KOTHAR_API_TOKEN"])
69
+ files = client.workspaces.id(os.environ["KOTHAR_WORKSPACE_ID"]).files.list()
70
+ targets = client.users.id(os.environ["KOTHAR_USER_ID"]).targets.list()
71
+ ```
72
+
73
+ Creating tasks also needs read access to the chosen task definition and any specified target. Task search-schema
74
+ discovery needs **Targets → List** and **Task definitions → List**. Add these grants explicitly when needed.
@@ -0,0 +1,57 @@
1
+ # Kothar Python SDK
2
+
3
+ Python SDK for the Kothar API generated from `schemas/openapi.yml`.
4
+
5
+ Install the published SDK with `pip install kotharcomputing`. Starting with `1.0.0`,
6
+ the package is released from `kothardev/kothar-platform` and its version follows the
7
+ platform tag (`v1.0.0` publishes `1.0.0`). It replaces the package previously built
8
+ in `kothar-backend`; use the workspace and target API examples below when updating
9
+ applications from the legacy SDK. Existing PyPI releases remain available for pinned installations.
10
+
11
+ ## Aleph language server
12
+
13
+ The SDK also provides a separate anonymous HTTP client for the Aleph language
14
+ server. It does not use Kothar API authentication:
15
+
16
+ ```python
17
+ from kotharcomputing import AlephLanguageServerClient
18
+
19
+ aleph = AlephLanguageServerClient()
20
+ analysis = aleph.analyze('print("hello")', include_ast=True)
21
+ parsed = aleph.ast('print("hello")', format=True, discover_test=True)
22
+ tests = aleph.discover_tests('test "example" {}')
23
+ formatted = aleph.format('print( "hello" )')
24
+ ```
25
+
26
+ Pass `base_url=` or `AlephLanguageServerClientOptions` to use another Aleph
27
+ deployment. The default endpoint is `https://aleph.kotharcomputing.com`.
28
+
29
+ `ast` accepts an optional structured `filter` and returns a required AST with syntax and light binding diagnostics,
30
+ without establishing full type correctness. Both `ast` and `analyze` accept `format` and `discover_test`; their optional
31
+ `tests` field and the direct `discover_tests` result use `AlephTestDiscoverySection`, with recursive sections and typed
32
+ test metadata. Discovery does not execute source or tests. The client-level `timeout` applies to these methods too.
33
+
34
+ The reviewed contract is pinned in `schemas/aleph-openapi.json`; maintenance and SDK parity checks are documented in
35
+ [RFC 0013](../../../docs/rfcs/0013-workshop-tasks-and-aleph-execution.md).
36
+
37
+ ## Workshop API tokens
38
+
39
+ Create an immutable token in **Account settings → API tokens**, explicitly select its permissions, and save the
40
+ credential when it is shown. Delete it to revoke access; create a replacement to change metadata, expiration, or grants.
41
+ Non-expiring tokens keep their issued grants until revoked.
42
+
43
+ This example needs **Files → List (All files)** and **Targets → List**. Set the credential and the workspace/user IDs shown
44
+ on the account page in environment variables. API tokens cannot use the session-only `personal` or `me` aliases. Never
45
+ save credentials in source code, logs, or browser storage.
46
+
47
+ ```python
48
+ import os
49
+ from kotharcomputing import KotharClient
50
+
51
+ client = KotharClient(access_token=os.environ["KOTHAR_API_TOKEN"])
52
+ files = client.workspaces.id(os.environ["KOTHAR_WORKSPACE_ID"]).files.list()
53
+ targets = client.users.id(os.environ["KOTHAR_USER_ID"]).targets.list()
54
+ ```
55
+
56
+ Creating tasks also needs read access to the chosen task definition and any specified target. Task search-schema
57
+ discovery needs **Targets → List** and **Task definitions → List**. Add these grants explicitly when needed.
@@ -1,24 +1,24 @@
1
1
  [build-system]
2
- requires = ["setuptools>=82.0.1", "wheel>=0.47.0"]
2
+ requires = ["setuptools>=84.0.0", "wheel>=0.48.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "kotharcomputing"
7
- version = "0.106.0"
7
+ version = "1.0.1"
8
8
  description = "Python SDK for the Kothar API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
11
11
  license = "Apache-2.0"
12
- license-files = ["LICENSE"]
13
12
  authors = [{ name = "Kothar Computing" }]
14
13
  dependencies = []
15
- optional-dependencies = { dev = ["poethepoet>=0.46.0", "ruff>=0.15.14", "pytest>=9.0.3", "build>=1.5.0"] }
16
14
  keywords = ["kothar", "api", "sdk"]
17
15
  classifiers = [
18
16
  "Programming Language :: Python :: 3",
19
17
  "Programming Language :: Python :: 3 :: Only",
20
18
  "Programming Language :: Python :: 3.11",
21
19
  "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Programming Language :: Python :: 3.14",
22
22
  "Typing :: Typed",
23
23
  ]
24
24
 
@@ -30,18 +30,3 @@ where = ["src"]
30
30
 
31
31
  [tool.setuptools.package-data]
32
32
  kotharcomputing = ["py.typed"]
33
-
34
- [tool.ruff.lint]
35
- select = ["E4", "E7", "E9", "F"]
36
-
37
- [tool.poe.tasks]
38
- format = "ruff format src"
39
- format-check = "ruff format --check src"
40
- lint = "ruff check src"
41
- lint-fix = "ruff check --fix src"
42
- test = "pytest -q"
43
- build = "python scripts/build_package.py"
44
-
45
- [tool.poe.tasks.check]
46
- help = "Run formatting, linting and tests"
47
- sequence = ["format-check", "lint", "test"]
@@ -0,0 +1,54 @@
1
+ from ._generated import types as _types
2
+ from ._generated.types import * # noqa: F403
3
+ from .aleph_language_server import (
4
+ DEFAULT_ALEPH_LANGUAGE_SERVER_BASE_URL,
5
+ AlephAnalyzeResult,
6
+ AlephAstFilter,
7
+ AlephAstFilterClause,
8
+ AlephAstLocation,
9
+ AlephAstNode,
10
+ AlephAstNodeType,
11
+ AlephAstResult,
12
+ AlephAstTextFilter,
13
+ AlephDiagnostic,
14
+ AlephDiagnosticSeverity,
15
+ AlephLanguageServerClient,
16
+ AlephLanguageServerClientOptions,
17
+ AlephPosition,
18
+ AlephRange,
19
+ AlephTestDiscoveryLocation,
20
+ AlephTestDiscoverySection,
21
+ AlephTestDiscoveryTest,
22
+ )
23
+ from .client import DEFAULT_BASE_URL, KotharClient, KotharClientOptions
24
+ from .errors import KOTHAR_ERROR_TYPE_BASE_URL, KotharApiError, ProblemDetails
25
+ from .transport import ApiTransport, RawResponse
26
+
27
+ __all__ = [
28
+ "AlephAnalyzeResult",
29
+ "AlephAstFilter",
30
+ "AlephAstFilterClause",
31
+ "AlephAstLocation",
32
+ "AlephAstNode",
33
+ "AlephAstNodeType",
34
+ "AlephAstResult",
35
+ "AlephAstTextFilter",
36
+ "AlephDiagnostic",
37
+ "AlephDiagnosticSeverity",
38
+ "AlephLanguageServerClient",
39
+ "AlephLanguageServerClientOptions",
40
+ "AlephPosition",
41
+ "AlephRange",
42
+ "AlephTestDiscoveryLocation",
43
+ "AlephTestDiscoverySection",
44
+ "AlephTestDiscoveryTest",
45
+ "ApiTransport",
46
+ "DEFAULT_BASE_URL",
47
+ "DEFAULT_ALEPH_LANGUAGE_SERVER_BASE_URL",
48
+ "KOTHAR_ERROR_TYPE_BASE_URL",
49
+ "KotharApiError",
50
+ "KotharClient",
51
+ "KotharClientOptions",
52
+ "ProblemDetails",
53
+ "RawResponse",
54
+ ] + [name for name in dir(_types) if not name.startswith("_")]
@@ -0,0 +1 @@
1
+ """Generated OpenAPI types and operation helpers."""