blazerops 0.1.0__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.
- blazerops/__init__.py +48 -0
- blazerops/api.py +693 -0
- blazerops/apps.py +879 -0
- blazerops/credentials.py +145 -0
- blazerops/errors.py +135 -0
- blazerops/py.typed +0 -0
- blazerops-0.1.0.dist-info/METADATA +84 -0
- blazerops-0.1.0.dist-info/RECORD +23 -0
- blazerops-0.1.0.dist-info/WHEEL +5 -0
- blazerops-0.1.0.dist-info/entry_points.txt +2 -0
- blazerops-0.1.0.dist-info/licenses/LICENSE +202 -0
- blazerops-0.1.0.dist-info/top_level.txt +2 -0
- blazerops_cli/__init__.py +11 -0
- blazerops_cli/api.py +10 -0
- blazerops_cli/bundle.py +87 -0
- blazerops_cli/code_loop.py +105 -0
- blazerops_cli/codegen.py +245 -0
- blazerops_cli/credentials.py +10 -0
- blazerops_cli/datapush.py +568 -0
- blazerops_cli/datarefs.py +196 -0
- blazerops_cli/main.py +1883 -0
- blazerops_cli/push_state.py +76 -0
- blazerops_cli/typed_client.py +531 -0
blazerops/__init__.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""blazerops — the importable client for the BlazerOps platform.
|
|
2
|
+
|
|
3
|
+
Two clients, one package:
|
|
4
|
+
|
|
5
|
+
- `BlazerOps` — the CONSUMER client for a published app, authenticated with an app-scoped
|
|
6
|
+
`blzk_` key (the Python counterpart of `@blazerops/sdk`):
|
|
7
|
+
|
|
8
|
+
from blazerops import BlazerOps
|
|
9
|
+
with BlazerOps() as bo: # $BLAZEROPS_API_KEY, $BLAZEROPS_BASE_URL
|
|
10
|
+
inv = bo.invoke("exam-answers", "stable", {"exam_pdf": Path("exam.pdf")},
|
|
11
|
+
subject="user-42")
|
|
12
|
+
|
|
13
|
+
- `Client` — the BUILDER client behind the `blazerops` CLI (`blazerops_cli`): the /v1
|
|
14
|
+
transport, the CLI login, the version handshake and the builder verbs (push, run).
|
|
15
|
+
"""
|
|
16
|
+
# The version is single-sourced from the installed package metadata (which
|
|
17
|
+
# setuptools-scm derives from the git tag), so the tag, the wheel, and
|
|
18
|
+
# `blazerops --version` can never disagree. Running from an uninstalled source
|
|
19
|
+
# checkout (no metadata) falls back rather than crashing.
|
|
20
|
+
from importlib.metadata import PackageNotFoundError, version as _pkg_version
|
|
21
|
+
|
|
22
|
+
try:
|
|
23
|
+
__version__ = _pkg_version("blazerops")
|
|
24
|
+
except PackageNotFoundError: # source checkout without an install
|
|
25
|
+
__version__ = "0.0.0+unknown"
|
|
26
|
+
|
|
27
|
+
from .api import ApiError, Client, SkewError, api_url # noqa: E402 (needs __version__)
|
|
28
|
+
from .apps import BlazerOps, File, Invocation, Upload, invoke # noqa: E402
|
|
29
|
+
from .credentials import CredentialError # noqa: E402
|
|
30
|
+
from .errors import ( # noqa: E402
|
|
31
|
+
AuthError,
|
|
32
|
+
BlazerOpsError,
|
|
33
|
+
ConflictError,
|
|
34
|
+
FailedError,
|
|
35
|
+
NetworkError,
|
|
36
|
+
NotFoundError,
|
|
37
|
+
QuotaError,
|
|
38
|
+
RateLimitError,
|
|
39
|
+
RefusedError,
|
|
40
|
+
TimeoutError,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
__all__ = [
|
|
44
|
+
"ApiError", "AuthError", "BlazerOps", "BlazerOpsError", "Client", "ConflictError",
|
|
45
|
+
"CredentialError", "FailedError", "File", "Invocation", "NetworkError", "NotFoundError",
|
|
46
|
+
"QuotaError", "RateLimitError", "RefusedError", "SkewError", "TimeoutError", "Upload",
|
|
47
|
+
"__version__", "api_url", "invoke",
|
|
48
|
+
]
|