stratyfy-cli 0.2.0__tar.gz → 0.3.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.
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/PKG-INFO +17 -5
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/README.md +16 -4
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/create_dataset.py +5 -0
- stratyfy_cli-0.3.0/pre_api_client/api/default/create_key.py +184 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/create_model_version.py +5 -0
- stratyfy_cli-0.3.0/pre_api_client/api/default/delete_workspace_data.py +156 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/get_dataset.py +5 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/get_model.py +5 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/get_sample_database.py +5 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/get_workspace.py +5 -0
- stratyfy_cli-0.3.0/pre_api_client/api/default/get_workspace_usage.py +180 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/list_datasets.py +5 -0
- stratyfy_cli-0.3.0/pre_api_client/api/default/list_keys.py +139 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/list_models.py +5 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/list_rules.py +5 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/list_samples.py +5 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/predict.py +5 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/revoke_current_key.py +5 -0
- stratyfy_cli-0.3.0/pre_api_client/api/default/revoke_key.py +169 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/train_model.py +5 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/__init__.py +14 -0
- stratyfy_cli-0.3.0/pre_api_client/models/api_key.py +86 -0
- stratyfy_cli-0.3.0/pre_api_client/models/create_key_body.py +61 -0
- stratyfy_cli-0.3.0/pre_api_client/models/delete_workspace_data_response_200.py +69 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/error_code.py +2 -0
- stratyfy_cli-0.3.0/pre_api_client/models/get_workspace_usage_response_200.py +83 -0
- stratyfy_cli-0.3.0/pre_api_client/models/list_keys_response_200.py +75 -0
- stratyfy_cli-0.3.0/pre_api_client/models/new_api_key.py +86 -0
- stratyfy_cli-0.3.0/pre_api_client/models/usage.py +86 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_cli/main.py +158 -15
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_cli/sandbox.py +3 -2
- stratyfy_cli-0.3.0/pre_cli/skill.py +51 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_cli/skills/onboard/SKILL.md +23 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pyproject.toml +1 -1
- stratyfy_cli-0.2.0/pre_cli/skill.py +0 -26
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/hatch_build.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/__init__.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/__init__.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/__init__.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/get_device_token.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/start_device_login.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/client.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/errors.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/clause.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/clause_operator.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/column.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/column_domain.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/create_dataset_body.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/create_model_version_body.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/dataset.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/device_code.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/device_token.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/device_token_token_type.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/error.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/get_device_token_body.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/list_datasets_response_200.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/list_models_response_200.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/list_rules_response_200.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/list_samples_response_200.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/metrics.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/metrics_calibration_item.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/metrics_lift_item.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/model.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/model_status.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/predict_body.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/predict_body_rows_item.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/predict_response_200.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/prediction.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/prediction_fired_rules_item.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/rule.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/rule_change.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/rule_change_action.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/rule_input.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/sample.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/train_request.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/models/workspace.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/types.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_cli/__init__.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_cli/config.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_cli/data.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_cli/schema.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_report/__init__.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_report/render.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_report/template.html +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_report/types.py +0 -0
- {stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_words/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: stratyfy-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: The pre command: describe a database, train a PRE model, read its rules
|
|
5
5
|
Requires-Python: <4,>=3.11
|
|
6
6
|
Requires-Dist: attrs>=23
|
|
@@ -41,10 +41,19 @@ failure the command exits with 1 and prints `code`, `message` and `next_step`.
|
|
|
41
41
|
| `pre login [--no-wait] [--api-url <url>]` | Signs in as `gh auth login` does. It prints a link and a code. The user signs in with an email code and approves the device. Then it writes a new key for this machine to `.pre/config.json`. With `--no-wait` it prints the link and exits; the next `pre login` waits for that same sign-in. That way an agent can show the user the link first. The default API is `https://api.stratyfy.ai/v1`. |
|
|
42
42
|
| `pre logout` | Revokes the key on the API and removes it from `.pre/config.json`. If the API does not answer, it still removes the key and names its id for an admin to revoke. |
|
|
43
43
|
| `pre try [name]` | Lists the sample apps, or downloads one into `./<name>/`: its SQLite database, a README, a copy of this folder's key, and a `CLAUDE.md` and the skill so Claude Code started there knows what to do. |
|
|
44
|
+
| `pre keys list` | Lists the workspace's live keys. The key in use here is marked. |
|
|
45
|
+
| `pre keys create <name> [--to-file <path>]` | Makes a key for a job or an app, not tied to this machine. It is shown once. Inside a coding agent it is written only to a file, never to the screen. |
|
|
46
|
+
| `pre keys revoke <id>` | Revokes one key. It stops working at once, everywhere. |
|
|
47
|
+
| `pre usage [--days 30]` | The workspace's use per day: rows scored and calls. |
|
|
48
|
+
| `pre delete-data [--yes]` | Deletes every dataset and model in the workspace, on the API. It asks first and refuses inside a coding agent. Keys, outcomes and local files stay. See the docs page "Your data". |
|
|
49
|
+
| `pre delete-account` | Prints the page that deletes the account and everything in it, after a code sent by email. No key needed. |
|
|
50
|
+
| `pre version` | Prints the version, as `pre --version` does. |
|
|
44
51
|
| `pre guide` | Prints the method a coding agent follows, from set-up to the report. It is the plugin's `onboard` skill, bundled in the CLI. |
|
|
45
52
|
| `pre init --api-key <key> [--api-url <url>]` | Writes a key you already have to `.pre/config.json`. The key can also come from `PRE_API_KEY`. |
|
|
53
|
+
|
|
54
|
+
`PRE_API_KEY` and `PRE_API_URL` win over `.pre/config.json` for every call, so a job on a server needs no config. `pre logout` still revokes only the folder's own key.
|
|
46
55
|
| `pre connect <db>` | Describes a SQLite or Postgres database: tables, row counts, columns, types, null share, sample values and foreign keys. It opens the database read-only. |
|
|
47
|
-
| `pre setup claude [--yes] [--dry-run] [--local]` | For Claude Code. Run it in your own terminal. It adds the API host and a remote Postgres host to Claude Code's sandbox network allowlist. It shows the change and asks first. It refuses to write when an agent runs it. See [Sandboxes](#sandboxes). |
|
|
56
|
+
| `pre setup claude [--yes] [--dry-run] [--local]` | For Claude Code. Run it in your own terminal. It writes the PRE skill to `.claude/skills/pre-onboard/`, and adds the API host and a remote Postgres host to Claude Code's sandbox network allowlist. It shows the change and asks first. It refuses to write when an agent runs it. See [Sandboxes](#sandboxes). |
|
|
48
57
|
| `pre status` | Checks that the API answers and accepts the key, and names the workspace. Lists the datasets and models this folder made. |
|
|
49
58
|
| `pre outcome define --name <slug> --sql <query> [--case account --cases accounts --event churn --event-past churned]` | Runs the outcome query and stores it. The query returns one row per case: the case id, then a 0/1 label. It refuses no rows, a label that is not 0 or 1, a repeated case id and a label that is always the same. The words go into every sentence the CLI prints. It guesses each word you leave out from the column names and says so. |
|
|
50
59
|
| `pre outcome show` | Lists the stored outcomes and their queries. |
|
|
@@ -83,10 +92,13 @@ other column. It maps the hashes back to the case ids in memory.
|
|
|
83
92
|
|
|
84
93
|
`pre setup` writes the smallest change it can. It merges into the file, so a second run changes nothing.
|
|
85
94
|
|
|
86
|
-
It writes `.claude/settings.json`, key `sandbox.network.allowedDomains`.
|
|
95
|
+
It writes `.claude/settings.local.json`, key `sandbox.network.allowedDomains`. That is Claude Code's personal
|
|
96
|
+
settings file; the team's `.claude/settings.json` stays as it is. Do not commit it. For a Postgres on this machine, `--local`
|
|
87
97
|
also sets `sandbox.network.allowLocalBinding`, which opens every local port. It never sets `allowAllUnixSockets`.
|
|
88
|
-
Claude Code is the only agent at launch; others are on the roadmap.
|
|
89
|
-
|
|
98
|
+
Claude Code is the only agent at launch; others are on the roadmap. It also writes the onboard skill to
|
|
99
|
+
`.claude/skills/pre-onboard/SKILL.md`. It records the copy's SHA-256 in `.pre/config.json`, and later replaces only
|
|
100
|
+
that copy: a skill you edited stays as it is. Commit the skill to share it with the team. Its source is
|
|
101
|
+
`tools/agent-plugin`.
|
|
90
102
|
|
|
91
103
|
These key names come from secondary sources. They live in `pre_cli/sandbox.py`.
|
|
92
104
|
|
|
@@ -28,10 +28,19 @@ failure the command exits with 1 and prints `code`, `message` and `next_step`.
|
|
|
28
28
|
| `pre login [--no-wait] [--api-url <url>]` | Signs in as `gh auth login` does. It prints a link and a code. The user signs in with an email code and approves the device. Then it writes a new key for this machine to `.pre/config.json`. With `--no-wait` it prints the link and exits; the next `pre login` waits for that same sign-in. That way an agent can show the user the link first. The default API is `https://api.stratyfy.ai/v1`. |
|
|
29
29
|
| `pre logout` | Revokes the key on the API and removes it from `.pre/config.json`. If the API does not answer, it still removes the key and names its id for an admin to revoke. |
|
|
30
30
|
| `pre try [name]` | Lists the sample apps, or downloads one into `./<name>/`: its SQLite database, a README, a copy of this folder's key, and a `CLAUDE.md` and the skill so Claude Code started there knows what to do. |
|
|
31
|
+
| `pre keys list` | Lists the workspace's live keys. The key in use here is marked. |
|
|
32
|
+
| `pre keys create <name> [--to-file <path>]` | Makes a key for a job or an app, not tied to this machine. It is shown once. Inside a coding agent it is written only to a file, never to the screen. |
|
|
33
|
+
| `pre keys revoke <id>` | Revokes one key. It stops working at once, everywhere. |
|
|
34
|
+
| `pre usage [--days 30]` | The workspace's use per day: rows scored and calls. |
|
|
35
|
+
| `pre delete-data [--yes]` | Deletes every dataset and model in the workspace, on the API. It asks first and refuses inside a coding agent. Keys, outcomes and local files stay. See the docs page "Your data". |
|
|
36
|
+
| `pre delete-account` | Prints the page that deletes the account and everything in it, after a code sent by email. No key needed. |
|
|
37
|
+
| `pre version` | Prints the version, as `pre --version` does. |
|
|
31
38
|
| `pre guide` | Prints the method a coding agent follows, from set-up to the report. It is the plugin's `onboard` skill, bundled in the CLI. |
|
|
32
39
|
| `pre init --api-key <key> [--api-url <url>]` | Writes a key you already have to `.pre/config.json`. The key can also come from `PRE_API_KEY`. |
|
|
40
|
+
|
|
41
|
+
`PRE_API_KEY` and `PRE_API_URL` win over `.pre/config.json` for every call, so a job on a server needs no config. `pre logout` still revokes only the folder's own key.
|
|
33
42
|
| `pre connect <db>` | Describes a SQLite or Postgres database: tables, row counts, columns, types, null share, sample values and foreign keys. It opens the database read-only. |
|
|
34
|
-
| `pre setup claude [--yes] [--dry-run] [--local]` | For Claude Code. Run it in your own terminal. It adds the API host and a remote Postgres host to Claude Code's sandbox network allowlist. It shows the change and asks first. It refuses to write when an agent runs it. See [Sandboxes](#sandboxes). |
|
|
43
|
+
| `pre setup claude [--yes] [--dry-run] [--local]` | For Claude Code. Run it in your own terminal. It writes the PRE skill to `.claude/skills/pre-onboard/`, and adds the API host and a remote Postgres host to Claude Code's sandbox network allowlist. It shows the change and asks first. It refuses to write when an agent runs it. See [Sandboxes](#sandboxes). |
|
|
35
44
|
| `pre status` | Checks that the API answers and accepts the key, and names the workspace. Lists the datasets and models this folder made. |
|
|
36
45
|
| `pre outcome define --name <slug> --sql <query> [--case account --cases accounts --event churn --event-past churned]` | Runs the outcome query and stores it. The query returns one row per case: the case id, then a 0/1 label. It refuses no rows, a label that is not 0 or 1, a repeated case id and a label that is always the same. The words go into every sentence the CLI prints. It guesses each word you leave out from the column names and says so. |
|
|
37
46
|
| `pre outcome show` | Lists the stored outcomes and their queries. |
|
|
@@ -70,10 +79,13 @@ other column. It maps the hashes back to the case ids in memory.
|
|
|
70
79
|
|
|
71
80
|
`pre setup` writes the smallest change it can. It merges into the file, so a second run changes nothing.
|
|
72
81
|
|
|
73
|
-
It writes `.claude/settings.json`, key `sandbox.network.allowedDomains`.
|
|
82
|
+
It writes `.claude/settings.local.json`, key `sandbox.network.allowedDomains`. That is Claude Code's personal
|
|
83
|
+
settings file; the team's `.claude/settings.json` stays as it is. Do not commit it. For a Postgres on this machine, `--local`
|
|
74
84
|
also sets `sandbox.network.allowLocalBinding`, which opens every local port. It never sets `allowAllUnixSockets`.
|
|
75
|
-
Claude Code is the only agent at launch; others are on the roadmap.
|
|
76
|
-
|
|
85
|
+
Claude Code is the only agent at launch; others are on the roadmap. It also writes the onboard skill to
|
|
86
|
+
`.claude/skills/pre-onboard/SKILL.md`. It records the copy's SHA-256 in `.pre/config.json`, and later replaces only
|
|
87
|
+
that copy: a skill you edited stays as it is. Commit the skill to share it with the team. Its source is
|
|
88
|
+
`tools/agent-plugin`.
|
|
77
89
|
|
|
78
90
|
These key names come from secondary sources. They live in `pre_cli/sandbox.py`.
|
|
79
91
|
|
|
@@ -53,6 +53,11 @@ def _parse_response(
|
|
|
53
53
|
|
|
54
54
|
return response_413
|
|
55
55
|
|
|
56
|
+
if response.status_code == 429:
|
|
57
|
+
response_429 = Error.from_dict(response.json())
|
|
58
|
+
|
|
59
|
+
return response_429
|
|
60
|
+
|
|
56
61
|
if client.raise_on_unexpected_status:
|
|
57
62
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
58
63
|
else:
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.create_key_body import CreateKeyBody
|
|
9
|
+
from ...models.error import Error
|
|
10
|
+
from ...models.new_api_key import NewApiKey
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: CreateKeyBody,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/keys",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["json"] = body.to_dict()
|
|
26
|
+
|
|
27
|
+
headers["Content-Type"] = "application/json"
|
|
28
|
+
|
|
29
|
+
_kwargs["headers"] = headers
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(
|
|
34
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
35
|
+
) -> Error | NewApiKey | None:
|
|
36
|
+
if response.status_code == 201:
|
|
37
|
+
response_201 = NewApiKey.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_201
|
|
40
|
+
|
|
41
|
+
if response.status_code == 400:
|
|
42
|
+
response_400 = Error.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_400
|
|
45
|
+
|
|
46
|
+
if response.status_code == 401:
|
|
47
|
+
response_401 = Error.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_401
|
|
50
|
+
|
|
51
|
+
if response.status_code == 429:
|
|
52
|
+
response_429 = Error.from_dict(response.json())
|
|
53
|
+
|
|
54
|
+
return response_429
|
|
55
|
+
|
|
56
|
+
if client.raise_on_unexpected_status:
|
|
57
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
58
|
+
else:
|
|
59
|
+
return None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _build_response(
|
|
63
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
64
|
+
) -> Response[Error | NewApiKey]:
|
|
65
|
+
return Response(
|
|
66
|
+
status_code=HTTPStatus(response.status_code),
|
|
67
|
+
content=response.content,
|
|
68
|
+
headers=response.headers,
|
|
69
|
+
parsed=_parse_response(client=client, response=response),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def sync_detailed(
|
|
74
|
+
*,
|
|
75
|
+
client: AuthenticatedClient,
|
|
76
|
+
body: CreateKeyBody,
|
|
77
|
+
) -> Response[Error | NewApiKey]:
|
|
78
|
+
"""Make a key for a job or an app, such as a nightly scoring run. It is not tied to one machine.
|
|
79
|
+
|
|
80
|
+
The response holds the key. Store it then. It is not shown again.
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
body (CreateKeyBody):
|
|
84
|
+
|
|
85
|
+
Raises:
|
|
86
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
87
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Response[Error | NewApiKey]
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
kwargs = _get_kwargs(
|
|
94
|
+
body=body,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
response = client.get_httpx_client().request(
|
|
98
|
+
**kwargs,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
return _build_response(client=client, response=response)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def sync(
|
|
105
|
+
*,
|
|
106
|
+
client: AuthenticatedClient,
|
|
107
|
+
body: CreateKeyBody,
|
|
108
|
+
) -> Error | NewApiKey | None:
|
|
109
|
+
"""Make a key for a job or an app, such as a nightly scoring run. It is not tied to one machine.
|
|
110
|
+
|
|
111
|
+
The response holds the key. Store it then. It is not shown again.
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
body (CreateKeyBody):
|
|
115
|
+
|
|
116
|
+
Raises:
|
|
117
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
118
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
Error | NewApiKey
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
return sync_detailed(
|
|
125
|
+
client=client,
|
|
126
|
+
body=body,
|
|
127
|
+
).parsed
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
async def asyncio_detailed(
|
|
131
|
+
*,
|
|
132
|
+
client: AuthenticatedClient,
|
|
133
|
+
body: CreateKeyBody,
|
|
134
|
+
) -> Response[Error | NewApiKey]:
|
|
135
|
+
"""Make a key for a job or an app, such as a nightly scoring run. It is not tied to one machine.
|
|
136
|
+
|
|
137
|
+
The response holds the key. Store it then. It is not shown again.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
body (CreateKeyBody):
|
|
141
|
+
|
|
142
|
+
Raises:
|
|
143
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
144
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
145
|
+
|
|
146
|
+
Returns:
|
|
147
|
+
Response[Error | NewApiKey]
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
kwargs = _get_kwargs(
|
|
151
|
+
body=body,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
155
|
+
|
|
156
|
+
return _build_response(client=client, response=response)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
async def asyncio(
|
|
160
|
+
*,
|
|
161
|
+
client: AuthenticatedClient,
|
|
162
|
+
body: CreateKeyBody,
|
|
163
|
+
) -> Error | NewApiKey | None:
|
|
164
|
+
"""Make a key for a job or an app, such as a nightly scoring run. It is not tied to one machine.
|
|
165
|
+
|
|
166
|
+
The response holds the key. Store it then. It is not shown again.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
body (CreateKeyBody):
|
|
170
|
+
|
|
171
|
+
Raises:
|
|
172
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
173
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
174
|
+
|
|
175
|
+
Returns:
|
|
176
|
+
Error | NewApiKey
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
await asyncio_detailed(
|
|
181
|
+
client=client,
|
|
182
|
+
body=body,
|
|
183
|
+
)
|
|
184
|
+
).parsed
|
{stratyfy_cli-0.2.0 → stratyfy_cli-0.3.0}/pre_api_client/api/default/create_model_version.py
RENAMED
|
@@ -62,6 +62,11 @@ def _parse_response(
|
|
|
62
62
|
|
|
63
63
|
return response_409
|
|
64
64
|
|
|
65
|
+
if response.status_code == 429:
|
|
66
|
+
response_429 = Error.from_dict(response.json())
|
|
67
|
+
|
|
68
|
+
return response_429
|
|
69
|
+
|
|
65
70
|
if client.raise_on_unexpected_status:
|
|
66
71
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
67
72
|
else:
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.delete_workspace_data_response_200 import DeleteWorkspaceDataResponse200
|
|
9
|
+
from ...models.error import Error
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs() -> dict[str, Any]:
|
|
14
|
+
|
|
15
|
+
_kwargs: dict[str, Any] = {
|
|
16
|
+
"method": "delete",
|
|
17
|
+
"url": "/workspace",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return _kwargs
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _parse_response(
|
|
24
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
25
|
+
) -> DeleteWorkspaceDataResponse200 | Error | None:
|
|
26
|
+
if response.status_code == 200:
|
|
27
|
+
response_200 = DeleteWorkspaceDataResponse200.from_dict(response.json())
|
|
28
|
+
|
|
29
|
+
return response_200
|
|
30
|
+
|
|
31
|
+
if response.status_code == 401:
|
|
32
|
+
response_401 = Error.from_dict(response.json())
|
|
33
|
+
|
|
34
|
+
return response_401
|
|
35
|
+
|
|
36
|
+
if response.status_code == 409:
|
|
37
|
+
response_409 = Error.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_409
|
|
40
|
+
|
|
41
|
+
if response.status_code == 429:
|
|
42
|
+
response_429 = Error.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_429
|
|
45
|
+
|
|
46
|
+
if client.raise_on_unexpected_status:
|
|
47
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(
|
|
53
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
54
|
+
) -> Response[DeleteWorkspaceDataResponse200 | Error]:
|
|
55
|
+
return Response(
|
|
56
|
+
status_code=HTTPStatus(response.status_code),
|
|
57
|
+
content=response.content,
|
|
58
|
+
headers=response.headers,
|
|
59
|
+
parsed=_parse_response(client=client, response=response),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def sync_detailed(
|
|
64
|
+
*,
|
|
65
|
+
client: AuthenticatedClient,
|
|
66
|
+
) -> Response[DeleteWorkspaceDataResponse200 | Error]:
|
|
67
|
+
"""Delete every dataset and model in the workspace, with their files. The workspace and its keys stay.
|
|
68
|
+
|
|
69
|
+
This cannot be undone. Our database backups and the old versions of files keep deleted data for up
|
|
70
|
+
to 7 days, then it is gone. Refused with 409 workspace_busy while a model is queued or training.
|
|
71
|
+
|
|
72
|
+
Raises:
|
|
73
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
74
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
75
|
+
|
|
76
|
+
Returns:
|
|
77
|
+
Response[DeleteWorkspaceDataResponse200 | Error]
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
kwargs = _get_kwargs()
|
|
81
|
+
|
|
82
|
+
response = client.get_httpx_client().request(
|
|
83
|
+
**kwargs,
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
return _build_response(client=client, response=response)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def sync(
|
|
90
|
+
*,
|
|
91
|
+
client: AuthenticatedClient,
|
|
92
|
+
) -> DeleteWorkspaceDataResponse200 | Error | None:
|
|
93
|
+
"""Delete every dataset and model in the workspace, with their files. The workspace and its keys stay.
|
|
94
|
+
|
|
95
|
+
This cannot be undone. Our database backups and the old versions of files keep deleted data for up
|
|
96
|
+
to 7 days, then it is gone. Refused with 409 workspace_busy while a model is queued or training.
|
|
97
|
+
|
|
98
|
+
Raises:
|
|
99
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
100
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
DeleteWorkspaceDataResponse200 | Error
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
return sync_detailed(
|
|
107
|
+
client=client,
|
|
108
|
+
).parsed
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
async def asyncio_detailed(
|
|
112
|
+
*,
|
|
113
|
+
client: AuthenticatedClient,
|
|
114
|
+
) -> Response[DeleteWorkspaceDataResponse200 | Error]:
|
|
115
|
+
"""Delete every dataset and model in the workspace, with their files. The workspace and its keys stay.
|
|
116
|
+
|
|
117
|
+
This cannot be undone. Our database backups and the old versions of files keep deleted data for up
|
|
118
|
+
to 7 days, then it is gone. Refused with 409 workspace_busy while a model is queued or training.
|
|
119
|
+
|
|
120
|
+
Raises:
|
|
121
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
122
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
123
|
+
|
|
124
|
+
Returns:
|
|
125
|
+
Response[DeleteWorkspaceDataResponse200 | Error]
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
kwargs = _get_kwargs()
|
|
129
|
+
|
|
130
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
131
|
+
|
|
132
|
+
return _build_response(client=client, response=response)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
async def asyncio(
|
|
136
|
+
*,
|
|
137
|
+
client: AuthenticatedClient,
|
|
138
|
+
) -> DeleteWorkspaceDataResponse200 | Error | None:
|
|
139
|
+
"""Delete every dataset and model in the workspace, with their files. The workspace and its keys stay.
|
|
140
|
+
|
|
141
|
+
This cannot be undone. Our database backups and the old versions of files keep deleted data for up
|
|
142
|
+
to 7 days, then it is gone. Refused with 409 workspace_busy while a model is queued or training.
|
|
143
|
+
|
|
144
|
+
Raises:
|
|
145
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
146
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
DeleteWorkspaceDataResponse200 | Error
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
await asyncio_detailed(
|
|
154
|
+
client=client,
|
|
155
|
+
)
|
|
156
|
+
).parsed
|
|
@@ -43,6 +43,11 @@ def _parse_response(
|
|
|
43
43
|
|
|
44
44
|
return response_404
|
|
45
45
|
|
|
46
|
+
if response.status_code == 429:
|
|
47
|
+
response_429 = Error.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_429
|
|
50
|
+
|
|
46
51
|
if client.raise_on_unexpected_status:
|
|
47
52
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
53
|
else:
|
|
@@ -43,6 +43,11 @@ def _parse_response(
|
|
|
43
43
|
|
|
44
44
|
return response_404
|
|
45
45
|
|
|
46
|
+
if response.status_code == 429:
|
|
47
|
+
response_429 = Error.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_429
|
|
50
|
+
|
|
46
51
|
if client.raise_on_unexpected_status:
|
|
47
52
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
53
|
else:
|
|
@@ -43,6 +43,11 @@ def _parse_response(
|
|
|
43
43
|
|
|
44
44
|
return response_404
|
|
45
45
|
|
|
46
|
+
if response.status_code == 429:
|
|
47
|
+
response_429 = Error.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_429
|
|
50
|
+
|
|
46
51
|
if client.raise_on_unexpected_status:
|
|
47
52
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
48
53
|
else:
|
|
@@ -33,6 +33,11 @@ def _parse_response(
|
|
|
33
33
|
|
|
34
34
|
return response_401
|
|
35
35
|
|
|
36
|
+
if response.status_code == 429:
|
|
37
|
+
response_429 = Error.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_429
|
|
40
|
+
|
|
36
41
|
if client.raise_on_unexpected_status:
|
|
37
42
|
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
38
43
|
else:
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.error import Error
|
|
9
|
+
from ...models.get_workspace_usage_response_200 import GetWorkspaceUsageResponse200
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
days: int | Unset = 30,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
|
|
18
|
+
params: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
params["days"] = days
|
|
21
|
+
|
|
22
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
23
|
+
|
|
24
|
+
_kwargs: dict[str, Any] = {
|
|
25
|
+
"method": "get",
|
|
26
|
+
"url": "/workspace/usage",
|
|
27
|
+
"params": params,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(
|
|
34
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
35
|
+
) -> Error | GetWorkspaceUsageResponse200 | None:
|
|
36
|
+
if response.status_code == 200:
|
|
37
|
+
response_200 = GetWorkspaceUsageResponse200.from_dict(response.json())
|
|
38
|
+
|
|
39
|
+
return response_200
|
|
40
|
+
|
|
41
|
+
if response.status_code == 400:
|
|
42
|
+
response_400 = Error.from_dict(response.json())
|
|
43
|
+
|
|
44
|
+
return response_400
|
|
45
|
+
|
|
46
|
+
if response.status_code == 401:
|
|
47
|
+
response_401 = Error.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_401
|
|
50
|
+
|
|
51
|
+
if response.status_code == 429:
|
|
52
|
+
response_429 = Error.from_dict(response.json())
|
|
53
|
+
|
|
54
|
+
return response_429
|
|
55
|
+
|
|
56
|
+
if client.raise_on_unexpected_status:
|
|
57
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
58
|
+
else:
|
|
59
|
+
return None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _build_response(
|
|
63
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
64
|
+
) -> Response[Error | GetWorkspaceUsageResponse200]:
|
|
65
|
+
return Response(
|
|
66
|
+
status_code=HTTPStatus(response.status_code),
|
|
67
|
+
content=response.content,
|
|
68
|
+
headers=response.headers,
|
|
69
|
+
parsed=_parse_response(client=client, response=response),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def sync_detailed(
|
|
74
|
+
*,
|
|
75
|
+
client: AuthenticatedClient,
|
|
76
|
+
days: int | Unset = 30,
|
|
77
|
+
) -> Response[Error | GetWorkspaceUsageResponse200]:
|
|
78
|
+
"""Read the workspace's use per day (UTC), newest first. Each call to the API counts, and so does each
|
|
79
|
+
row scored.
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
days (int | Unset): Default: 30.
|
|
83
|
+
|
|
84
|
+
Raises:
|
|
85
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
86
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
Response[Error | GetWorkspaceUsageResponse200]
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
kwargs = _get_kwargs(
|
|
93
|
+
days=days,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
response = client.get_httpx_client().request(
|
|
97
|
+
**kwargs,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
return _build_response(client=client, response=response)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def sync(
|
|
104
|
+
*,
|
|
105
|
+
client: AuthenticatedClient,
|
|
106
|
+
days: int | Unset = 30,
|
|
107
|
+
) -> Error | GetWorkspaceUsageResponse200 | None:
|
|
108
|
+
"""Read the workspace's use per day (UTC), newest first. Each call to the API counts, and so does each
|
|
109
|
+
row scored.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
days (int | Unset): Default: 30.
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
116
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
Error | GetWorkspaceUsageResponse200
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
return sync_detailed(
|
|
123
|
+
client=client,
|
|
124
|
+
days=days,
|
|
125
|
+
).parsed
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
async def asyncio_detailed(
|
|
129
|
+
*,
|
|
130
|
+
client: AuthenticatedClient,
|
|
131
|
+
days: int | Unset = 30,
|
|
132
|
+
) -> Response[Error | GetWorkspaceUsageResponse200]:
|
|
133
|
+
"""Read the workspace's use per day (UTC), newest first. Each call to the API counts, and so does each
|
|
134
|
+
row scored.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
days (int | Unset): Default: 30.
|
|
138
|
+
|
|
139
|
+
Raises:
|
|
140
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
141
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
142
|
+
|
|
143
|
+
Returns:
|
|
144
|
+
Response[Error | GetWorkspaceUsageResponse200]
|
|
145
|
+
"""
|
|
146
|
+
|
|
147
|
+
kwargs = _get_kwargs(
|
|
148
|
+
days=days,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
152
|
+
|
|
153
|
+
return _build_response(client=client, response=response)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
async def asyncio(
|
|
157
|
+
*,
|
|
158
|
+
client: AuthenticatedClient,
|
|
159
|
+
days: int | Unset = 30,
|
|
160
|
+
) -> Error | GetWorkspaceUsageResponse200 | None:
|
|
161
|
+
"""Read the workspace's use per day (UTC), newest first. Each call to the API counts, and so does each
|
|
162
|
+
row scored.
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
days (int | Unset): Default: 30.
|
|
166
|
+
|
|
167
|
+
Raises:
|
|
168
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
169
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
170
|
+
|
|
171
|
+
Returns:
|
|
172
|
+
Error | GetWorkspaceUsageResponse200
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
return (
|
|
176
|
+
await asyncio_detailed(
|
|
177
|
+
client=client,
|
|
178
|
+
days=days,
|
|
179
|
+
)
|
|
180
|
+
).parsed
|