useshards 0.1.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.
- useshards-0.1.0/.gitignore +6 -0
- useshards-0.1.0/LICENSE +202 -0
- useshards-0.1.0/NOTICE +17 -0
- useshards-0.1.0/PKG-INFO +139 -0
- useshards-0.1.0/README.md +123 -0
- useshards-0.1.0/pyproject.toml +65 -0
- useshards-0.1.0/src/useshards/__init__.py +123 -0
- useshards-0.1.0/src/useshards/_archive.py +249 -0
- useshards-0.1.0/src/useshards/_async/_backend.py +44 -0
- useshards-0.1.0/src/useshards/_async/_command.py +404 -0
- useshards-0.1.0/src/useshards/_async/_files.py +303 -0
- useshards-0.1.0/src/useshards/_async/_follow.py +135 -0
- useshards-0.1.0/src/useshards/_async/_sandbox.py +295 -0
- useshards-0.1.0/src/useshards/_async/_shard.py +337 -0
- useshards-0.1.0/src/useshards/_async/_transport.py +153 -0
- useshards-0.1.0/src/useshards/_async/_ws.py +171 -0
- useshards-0.1.0/src/useshards/_capture.py +43 -0
- useshards-0.1.0/src/useshards/_config.py +117 -0
- useshards-0.1.0/src/useshards/_frames.py +152 -0
- useshards-0.1.0/src/useshards/_generated/__init__.py +8 -0
- useshards-0.1.0/src/useshards/_generated/api/__init__.py +1 -0
- useshards-0.1.0/src/useshards/_generated/api/app/__init__.py +1 -0
- useshards-0.1.0/src/useshards/_generated/api/app/attach_app.py +114 -0
- useshards-0.1.0/src/useshards/_generated/api/app/stop_app.py +127 -0
- useshards-0.1.0/src/useshards/_generated/api/exec_/__init__.py +1 -0
- useshards-0.1.0/src/useshards/_generated/api/exec_/create_exec.py +128 -0
- useshards-0.1.0/src/useshards/_generated/api/exec_/delete_exec.py +118 -0
- useshards-0.1.0/src/useshards/_generated/api/exec_/get_exec.py +141 -0
- useshards-0.1.0/src/useshards/_generated/api/exec_/kill_exec.py +137 -0
- useshards-0.1.0/src/useshards/_generated/api/exec_/list_execs.py +138 -0
- useshards-0.1.0/src/useshards/_generated/api/exec_/resize_exec.py +137 -0
- useshards-0.1.0/src/useshards/_generated/api/files/__init__.py +1 -0
- useshards-0.1.0/src/useshards/_generated/api/files/delete_file.py +136 -0
- useshards-0.1.0/src/useshards/_generated/api/files/list_dir.py +127 -0
- useshards-0.1.0/src/useshards/_generated/api/files/make_dir.py +126 -0
- useshards-0.1.0/src/useshards/_generated/api/files/read_archive.py +127 -0
- useshards-0.1.0/src/useshards/_generated/api/files/read_file.py +127 -0
- useshards-0.1.0/src/useshards/_generated/api/files/stat_file.py +89 -0
- useshards-0.1.0/src/useshards/_generated/api/files/write_archive.py +152 -0
- useshards-0.1.0/src/useshards/_generated/api/files/write_file.py +174 -0
- useshards-0.1.0/src/useshards/_generated/api/meta/__init__.py +1 -0
- useshards-0.1.0/src/useshards/_generated/api/meta/get_capabilities.py +96 -0
- useshards-0.1.0/src/useshards/_generated/api/meta/get_version.py +96 -0
- useshards-0.1.0/src/useshards/_generated/api/meta/list_scopes.py +96 -0
- useshards-0.1.0/src/useshards/_generated/api/policies/__init__.py +1 -0
- useshards-0.1.0/src/useshards/_generated/api/policies/get_policy.py +110 -0
- useshards-0.1.0/src/useshards/_generated/api/policies/list_policies.py +127 -0
- useshards-0.1.0/src/useshards/_generated/api/policies/put_policy.py +129 -0
- useshards-0.1.0/src/useshards/_generated/api/policies/remove_policy.py +108 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/__init__.py +1 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/attach_policy.py +128 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/create_sandbox.py +133 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/detach_policy.py +110 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/fork_sandbox.py +129 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/get_sandbox.py +127 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/get_sandbox_egress_log.py +136 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/get_sandbox_logs.py +129 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/grant_secret.py +120 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/list_sandboxes.py +138 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/pause_sandbox.py +110 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/remove_sandbox.py +125 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/resume_sandbox.py +110 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/start_sandbox.py +110 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/stop_sandbox.py +129 -0
- useshards-0.1.0/src/useshards/_generated/api/sandboxes/ungrant_secret.py +120 -0
- useshards-0.1.0/src/useshards/_generated/api/secrets/__init__.py +1 -0
- useshards-0.1.0/src/useshards/_generated/api/secrets/list_secrets.py +127 -0
- useshards-0.1.0/src/useshards/_generated/api/secrets/put_secret.py +128 -0
- useshards-0.1.0/src/useshards/_generated/api/secrets/remove_secret.py +125 -0
- useshards-0.1.0/src/useshards/_generated/api/snapshots/__init__.py +1 -0
- useshards-0.1.0/src/useshards/_generated/api/snapshots/create_snapshot.py +117 -0
- useshards-0.1.0/src/useshards/_generated/api/snapshots/get_snapshot.py +110 -0
- useshards-0.1.0/src/useshards/_generated/api/snapshots/list_snapshots.py +127 -0
- useshards-0.1.0/src/useshards/_generated/api/snapshots/remove_snapshot.py +108 -0
- useshards-0.1.0/src/useshards/_generated/client.py +215 -0
- useshards-0.1.0/src/useshards/_generated/errors.py +16 -0
- useshards-0.1.0/src/useshards/_generated/models/__init__.py +141 -0
- useshards-0.1.0/src/useshards/_generated/models/app_exit.py +54 -0
- useshards-0.1.0/src/useshards/_generated/models/app_stop_request.py +38 -0
- useshards-0.1.0/src/useshards/_generated/models/capabilities.py +89 -0
- useshards-0.1.0/src/useshards/_generated/models/copy_request.py +38 -0
- useshards-0.1.0/src/useshards/_generated/models/create_line.py +89 -0
- useshards-0.1.0/src/useshards/_generated/models/create_request.py +149 -0
- useshards-0.1.0/src/useshards/_generated/models/destination.py +48 -0
- useshards-0.1.0/src/useshards/_generated/models/destination_kind.py +11 -0
- useshards-0.1.0/src/useshards/_generated/models/effective.py +64 -0
- useshards-0.1.0/src/useshards/_generated/models/effective_rule.py +105 -0
- useshards-0.1.0/src/useshards/_generated/models/effective_rule_action.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/effective_rule_implied.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/effective_rule_protocol.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/egress_decision.py +104 -0
- useshards-0.1.0/src/useshards/_generated/models/egress_decision_source.py +10 -0
- useshards-0.1.0/src/useshards/_generated/models/egress_decision_verdict.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/end_message.py +41 -0
- useshards-0.1.0/src/useshards/_generated/models/end_message_reason.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/entries_response.py +56 -0
- useshards-0.1.0/src/useshards/_generated/models/error.py +48 -0
- useshards-0.1.0/src/useshards/_generated/models/error_object.py +65 -0
- useshards-0.1.0/src/useshards/_generated/models/event.py +89 -0
- useshards-0.1.0/src/useshards/_generated/models/event_status.py +14 -0
- useshards-0.1.0/src/useshards/_generated/models/exec_.py +140 -0
- useshards-0.1.0/src/useshards/_generated/models/exec_request.py +113 -0
- useshards-0.1.0/src/useshards/_generated/models/exec_state.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/execs_response.py +69 -0
- useshards-0.1.0/src/useshards/_generated/models/exit_message.py +63 -0
- useshards-0.1.0/src/useshards/_generated/models/exit_status.py +47 -0
- useshards-0.1.0/src/useshards/_generated/models/failure_error.py +47 -0
- useshards-0.1.0/src/useshards/_generated/models/failure_message.py +48 -0
- useshards-0.1.0/src/useshards/_generated/models/file_entry.py +84 -0
- useshards-0.1.0/src/useshards/_generated/models/file_entry_type.py +11 -0
- useshards-0.1.0/src/useshards/_generated/models/inspection.py +230 -0
- useshards-0.1.0/src/useshards/_generated/models/inspection_state.py +14 -0
- useshards-0.1.0/src/useshards/_generated/models/kill_request.py +38 -0
- useshards-0.1.0/src/useshards/_generated/models/mkdir_request.py +64 -0
- useshards-0.1.0/src/useshards/_generated/models/policies_response.py +70 -0
- useshards-0.1.0/src/useshards/_generated/models/policy.py +63 -0
- useshards-0.1.0/src/useshards/_generated/models/policy_attach_request.py +40 -0
- useshards-0.1.0/src/useshards/_generated/models/policy_request.py +58 -0
- useshards-0.1.0/src/useshards/_generated/models/policy_view.py +81 -0
- useshards-0.1.0/src/useshards/_generated/models/policy_view_dns.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/resource_request.py +54 -0
- useshards-0.1.0/src/useshards/_generated/models/resources.py +54 -0
- useshards-0.1.0/src/useshards/_generated/models/restart.py +93 -0
- useshards-0.1.0/src/useshards/_generated/models/restart_policy.py +10 -0
- useshards-0.1.0/src/useshards/_generated/models/restart_spec.py +57 -0
- useshards-0.1.0/src/useshards/_generated/models/restart_spec_policy.py +10 -0
- useshards-0.1.0/src/useshards/_generated/models/rule.py +82 -0
- useshards-0.1.0/src/useshards/_generated/models/rule_action.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/rule_protocol.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/rule_text.py +48 -0
- useshards-0.1.0/src/useshards/_generated/models/rule_text_action.py +9 -0
- useshards-0.1.0/src/useshards/_generated/models/sandbox.py +212 -0
- useshards-0.1.0/src/useshards/_generated/models/sandbox_state.py +14 -0
- useshards-0.1.0/src/useshards/_generated/models/sandboxes_response.py +80 -0
- useshards-0.1.0/src/useshards/_generated/models/scope.py +47 -0
- useshards-0.1.0/src/useshards/_generated/models/scopes_response.py +56 -0
- useshards-0.1.0/src/useshards/_generated/models/secret.py +62 -0
- useshards-0.1.0/src/useshards/_generated/models/secret_request.py +58 -0
- useshards-0.1.0/src/useshards/_generated/models/secrets_response.py +80 -0
- useshards-0.1.0/src/useshards/_generated/models/snapshot.py +113 -0
- useshards-0.1.0/src/useshards/_generated/models/snapshot_request.py +48 -0
- useshards-0.1.0/src/useshards/_generated/models/snapshots_response.py +70 -0
- useshards-0.1.0/src/useshards/_generated/models/stop_request.py +25 -0
- useshards-0.1.0/src/useshards/_generated/models/terminal_size.py +46 -0
- useshards-0.1.0/src/useshards/_generated/models/version_response.py +47 -0
- useshards-0.1.0/src/useshards/_generated/types.py +54 -0
- useshards-0.1.0/src/useshards/_sync/_backend.py +38 -0
- useshards-0.1.0/src/useshards/_sync/_command.py +403 -0
- useshards-0.1.0/src/useshards/_sync/_files.py +300 -0
- useshards-0.1.0/src/useshards/_sync/_follow.py +136 -0
- useshards-0.1.0/src/useshards/_sync/_sandbox.py +292 -0
- useshards-0.1.0/src/useshards/_sync/_shard.py +336 -0
- useshards-0.1.0/src/useshards/_sync/_transport.py +152 -0
- useshards-0.1.0/src/useshards/_sync/_ws.py +170 -0
- useshards-0.1.0/src/useshards/_types.py +452 -0
- useshards-0.1.0/src/useshards/_version.py +1 -0
- useshards-0.1.0/src/useshards/_wire.py +159 -0
- useshards-0.1.0/src/useshards/errors.py +187 -0
- useshards-0.1.0/src/useshards/py.typed +0 -0
useshards-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
useshards-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Shard
|
|
2
|
+
Copyright 2026 Preslav Mihaylov
|
|
3
|
+
|
|
4
|
+
This product includes software developed at
|
|
5
|
+
https://github.com/presmihaylov/shard
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
useshards-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: useshards
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: The Python SDK for shard, the sandbox manager.
|
|
5
|
+
Project-URL: Source, https://github.com/presmihaylov/shard
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
License-File: NOTICE
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Typing :: Typed
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: attrs>=23.1
|
|
13
|
+
Requires-Dist: httpx<1,>=0.27
|
|
14
|
+
Requires-Dist: typing-extensions>=4.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# useshards
|
|
18
|
+
|
|
19
|
+
The Python SDK for [shard](https://github.com/presmihaylov/shard), the sandbox manager. `Shard` is for
|
|
20
|
+
blocking code and `AsyncShard` is for asyncio. Both have the same verbs.
|
|
21
|
+
|
|
22
|
+
`useshards` is not on PyPI. Until its GitHub release is published, install it from the repository:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
pip install "useshards @ git+https://github.com/presmihaylov/shard#subdirectory=sdks/python"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Once the GitHub release is published, install its wheel:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
pip install https://github.com/presmihaylov/shard/releases/download/sdk-python-v0.1.0/useshards-0.1.0-py3-none-any.whl
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Python 3.11 or later. The runtime dependencies are HTTPX, attrs and typing-extensions.
|
|
35
|
+
|
|
36
|
+
## Connect
|
|
37
|
+
|
|
38
|
+
The SDK talks to `shard serve` over HTTPS, or over HTTP on localhost or a trusted encrypted network, where it
|
|
39
|
+
warns once per client as the CLI does. Mint a key on the host with `shard tokens mint`, then:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
export SHARD_REMOTE=https://shard.example.com
|
|
43
|
+
export SHARD_API_KEY=<the token>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
An argument beats the environment: `Shard(remote=..., api_key=...)`. `ca_file=` (or `SHARD_CA_FILE`) trusts a
|
|
47
|
+
private CA, for an https remote only. A remote with no port takes 443 for https and 80 for http.
|
|
48
|
+
|
|
49
|
+
## Quickstart
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from useshards import Shard
|
|
53
|
+
|
|
54
|
+
with Shard() as shard:
|
|
55
|
+
sandbox = shard.create("docker.io/library/alpine:3")
|
|
56
|
+
try:
|
|
57
|
+
result = sandbox.exec(["uname", "-sr"])
|
|
58
|
+
print(result.exit_code, result.stdout)
|
|
59
|
+
|
|
60
|
+
sandbox.files.write("/tmp/hello.txt", "hello\n")
|
|
61
|
+
print(sandbox.exec("cat /tmp/hello.txt").stdout)
|
|
62
|
+
finally:
|
|
63
|
+
sandbox.remove(force=True)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The same on asyncio:
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
import asyncio
|
|
70
|
+
from useshards import AsyncShard
|
|
71
|
+
|
|
72
|
+
async def main() -> None:
|
|
73
|
+
async with AsyncShard() as shard:
|
|
74
|
+
sandbox = await shard.create("docker.io/library/alpine:3")
|
|
75
|
+
try:
|
|
76
|
+
results = await asyncio.gather(*(sandbox.exec(f"echo {n}") for n in range(3)))
|
|
77
|
+
print([r.stdout for r in results])
|
|
78
|
+
finally:
|
|
79
|
+
await sandbox.remove(force=True)
|
|
80
|
+
|
|
81
|
+
asyncio.run(main())
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`examples/` has both in full. Set `SHARD_REMOTE` and `SHARD_API_KEY`, then run `python examples/quickstart.py`.
|
|
85
|
+
|
|
86
|
+
## What to know
|
|
87
|
+
|
|
88
|
+
- **A sandbox outlives its app.** `shard.run(image, command)` answers an `App`. When the app exits,
|
|
89
|
+
its sandbox stays running, so you can still exec into it. Only `stop()` or `remove()` ends it.
|
|
90
|
+
- **A string command runs under `/bin/sh -c`.** A list runs as it is.
|
|
91
|
+
- **`exec(..., background=True)` answers a `Command`.** `wait()`, `kill()`, `write_stdin()` and
|
|
92
|
+
`resize()` act on it. `commands.get(id)` finds it again from another client. In the foreground `stdin=` is
|
|
93
|
+
the whole input; in the background `stdin=True` keeps the input open for `write_stdin()`.
|
|
94
|
+
- **A cancel never kills the remote command.** An asyncio cancel, a timeout or a dropped connection
|
|
95
|
+
ends only the wait. The command runs on until it exits or you call `kill()`.
|
|
96
|
+
- **Output is capped.** A result keeps the newest 8 MiB across stdout and stderr together
|
|
97
|
+
(`output_limit_bytes=`). `on_stdout=` and `on_stderr=` see every chunk as it arrives.
|
|
98
|
+
- **Files stream.** `files.download()` writes to a temporary file and renames it at the end, so a
|
|
99
|
+
large file never sits in memory. An upload sends its length first: `files.upload()` takes a path,
|
|
100
|
+
and `files.write()` takes bytes, a seekable file, or a stream with `size=`.
|
|
101
|
+
|
|
102
|
+
## Errors
|
|
103
|
+
|
|
104
|
+
`ShardError` is the base of every exception below, which covers the daemon, the transport and the settings. A
|
|
105
|
+
bad local argument raises the native exception instead: an `upload` of a missing file raises
|
|
106
|
+
`FileNotFoundError`, and `create()` with neither an image nor a snapshot raises `ValueError`.
|
|
107
|
+
|
|
108
|
+
| Exception | When |
|
|
109
|
+
|---|---|
|
|
110
|
+
| `ConfigurationError` | A setting is missing or refused. The message never shows the API key, and names a CA file path or the remote when that is what to fix. |
|
|
111
|
+
| `ShardConnectionError` | The daemon is unreachable, or a stream ended before the command did. |
|
|
112
|
+
| `CommandNotStartedError` | The command never ran, as when its binary does not exist. |
|
|
113
|
+
| `APIError` | The daemon refused the request: `AuthenticationError` (401), `PermissionDeniedError` (403), `NotFoundError` (404), `InvalidRequestError` (400, 413), `ConflictError` (409), `UnsupportedError`, `ServerError` (5xx). An exec past the running-exec bound is a plain `APIError` with status 429 and code `exec_limit`. |
|
|
114
|
+
|
|
115
|
+
`ProtocolError` is an answer the SDK cannot read, `UnknownLengthError` an upload of unknown size or
|
|
116
|
+
one whose source changed size while it was sent, and `UnsafeArchiveError` a `download_dir` tar entry
|
|
117
|
+
the SDK refuses to land, as one outside the destination, named by `entry` and `reason`. A non-zero
|
|
118
|
+
exit code is not an exception. Read `result.exit_code`.
|
|
119
|
+
|
|
120
|
+
## The shared suite
|
|
121
|
+
|
|
122
|
+
`uv run python -m suite` runs the checks of `sdks/suite/checks.txt` against `SHARD_REMOTE`, with
|
|
123
|
+
`SHARD_API_KEY` and `SHARD_SUITE_WILDCARD_KEY` each a `"*"` token. `SHARD_SUITE_ONLY=name,name` runs a subset,
|
|
124
|
+
`SHARD_SUITE_MODE=sync|async` runs one mode, and `SHARD_SUITE_IMAGE` picks the image.
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
Apache-2.0.
|
|
129
|
+
|
|
130
|
+
## Lists and errors
|
|
131
|
+
|
|
132
|
+
`shard.list()` returns `SandboxList(sandboxes, warnings)`. `shard.secrets.list()` returns
|
|
133
|
+
`SecretList(secrets, warnings)`. The async client returns the same result types. The warnings name
|
|
134
|
+
entries the daemon could not read. Both lists collect warnings from every page, keeping each exact
|
|
135
|
+
text once in first-seen order. Check them before you treat the result as complete. Other lists return
|
|
136
|
+
plain lists.
|
|
137
|
+
|
|
138
|
+
An `APIError` can carry `holders`, the sandbox ids that prevent an operation such as secret removal.
|
|
139
|
+
The attribute is `None` when the error has no holders field.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# useshards
|
|
2
|
+
|
|
3
|
+
The Python SDK for [shard](https://github.com/presmihaylov/shard), the sandbox manager. `Shard` is for
|
|
4
|
+
blocking code and `AsyncShard` is for asyncio. Both have the same verbs.
|
|
5
|
+
|
|
6
|
+
`useshards` is not on PyPI. Until its GitHub release is published, install it from the repository:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
pip install "useshards @ git+https://github.com/presmihaylov/shard#subdirectory=sdks/python"
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Once the GitHub release is published, install its wheel:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
pip install https://github.com/presmihaylov/shard/releases/download/sdk-python-v0.1.0/useshards-0.1.0-py3-none-any.whl
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Python 3.11 or later. The runtime dependencies are HTTPX, attrs and typing-extensions.
|
|
19
|
+
|
|
20
|
+
## Connect
|
|
21
|
+
|
|
22
|
+
The SDK talks to `shard serve` over HTTPS, or over HTTP on localhost or a trusted encrypted network, where it
|
|
23
|
+
warns once per client as the CLI does. Mint a key on the host with `shard tokens mint`, then:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
export SHARD_REMOTE=https://shard.example.com
|
|
27
|
+
export SHARD_API_KEY=<the token>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
An argument beats the environment: `Shard(remote=..., api_key=...)`. `ca_file=` (or `SHARD_CA_FILE`) trusts a
|
|
31
|
+
private CA, for an https remote only. A remote with no port takes 443 for https and 80 for http.
|
|
32
|
+
|
|
33
|
+
## Quickstart
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from useshards import Shard
|
|
37
|
+
|
|
38
|
+
with Shard() as shard:
|
|
39
|
+
sandbox = shard.create("docker.io/library/alpine:3")
|
|
40
|
+
try:
|
|
41
|
+
result = sandbox.exec(["uname", "-sr"])
|
|
42
|
+
print(result.exit_code, result.stdout)
|
|
43
|
+
|
|
44
|
+
sandbox.files.write("/tmp/hello.txt", "hello\n")
|
|
45
|
+
print(sandbox.exec("cat /tmp/hello.txt").stdout)
|
|
46
|
+
finally:
|
|
47
|
+
sandbox.remove(force=True)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The same on asyncio:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import asyncio
|
|
54
|
+
from useshards import AsyncShard
|
|
55
|
+
|
|
56
|
+
async def main() -> None:
|
|
57
|
+
async with AsyncShard() as shard:
|
|
58
|
+
sandbox = await shard.create("docker.io/library/alpine:3")
|
|
59
|
+
try:
|
|
60
|
+
results = await asyncio.gather(*(sandbox.exec(f"echo {n}") for n in range(3)))
|
|
61
|
+
print([r.stdout for r in results])
|
|
62
|
+
finally:
|
|
63
|
+
await sandbox.remove(force=True)
|
|
64
|
+
|
|
65
|
+
asyncio.run(main())
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`examples/` has both in full. Set `SHARD_REMOTE` and `SHARD_API_KEY`, then run `python examples/quickstart.py`.
|
|
69
|
+
|
|
70
|
+
## What to know
|
|
71
|
+
|
|
72
|
+
- **A sandbox outlives its app.** `shard.run(image, command)` answers an `App`. When the app exits,
|
|
73
|
+
its sandbox stays running, so you can still exec into it. Only `stop()` or `remove()` ends it.
|
|
74
|
+
- **A string command runs under `/bin/sh -c`.** A list runs as it is.
|
|
75
|
+
- **`exec(..., background=True)` answers a `Command`.** `wait()`, `kill()`, `write_stdin()` and
|
|
76
|
+
`resize()` act on it. `commands.get(id)` finds it again from another client. In the foreground `stdin=` is
|
|
77
|
+
the whole input; in the background `stdin=True` keeps the input open for `write_stdin()`.
|
|
78
|
+
- **A cancel never kills the remote command.** An asyncio cancel, a timeout or a dropped connection
|
|
79
|
+
ends only the wait. The command runs on until it exits or you call `kill()`.
|
|
80
|
+
- **Output is capped.** A result keeps the newest 8 MiB across stdout and stderr together
|
|
81
|
+
(`output_limit_bytes=`). `on_stdout=` and `on_stderr=` see every chunk as it arrives.
|
|
82
|
+
- **Files stream.** `files.download()` writes to a temporary file and renames it at the end, so a
|
|
83
|
+
large file never sits in memory. An upload sends its length first: `files.upload()` takes a path,
|
|
84
|
+
and `files.write()` takes bytes, a seekable file, or a stream with `size=`.
|
|
85
|
+
|
|
86
|
+
## Errors
|
|
87
|
+
|
|
88
|
+
`ShardError` is the base of every exception below, which covers the daemon, the transport and the settings. A
|
|
89
|
+
bad local argument raises the native exception instead: an `upload` of a missing file raises
|
|
90
|
+
`FileNotFoundError`, and `create()` with neither an image nor a snapshot raises `ValueError`.
|
|
91
|
+
|
|
92
|
+
| Exception | When |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `ConfigurationError` | A setting is missing or refused. The message never shows the API key, and names a CA file path or the remote when that is what to fix. |
|
|
95
|
+
| `ShardConnectionError` | The daemon is unreachable, or a stream ended before the command did. |
|
|
96
|
+
| `CommandNotStartedError` | The command never ran, as when its binary does not exist. |
|
|
97
|
+
| `APIError` | The daemon refused the request: `AuthenticationError` (401), `PermissionDeniedError` (403), `NotFoundError` (404), `InvalidRequestError` (400, 413), `ConflictError` (409), `UnsupportedError`, `ServerError` (5xx). An exec past the running-exec bound is a plain `APIError` with status 429 and code `exec_limit`. |
|
|
98
|
+
|
|
99
|
+
`ProtocolError` is an answer the SDK cannot read, `UnknownLengthError` an upload of unknown size or
|
|
100
|
+
one whose source changed size while it was sent, and `UnsafeArchiveError` a `download_dir` tar entry
|
|
101
|
+
the SDK refuses to land, as one outside the destination, named by `entry` and `reason`. A non-zero
|
|
102
|
+
exit code is not an exception. Read `result.exit_code`.
|
|
103
|
+
|
|
104
|
+
## The shared suite
|
|
105
|
+
|
|
106
|
+
`uv run python -m suite` runs the checks of `sdks/suite/checks.txt` against `SHARD_REMOTE`, with
|
|
107
|
+
`SHARD_API_KEY` and `SHARD_SUITE_WILDCARD_KEY` each a `"*"` token. `SHARD_SUITE_ONLY=name,name` runs a subset,
|
|
108
|
+
`SHARD_SUITE_MODE=sync|async` runs one mode, and `SHARD_SUITE_IMAGE` picks the image.
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
Apache-2.0.
|
|
113
|
+
|
|
114
|
+
## Lists and errors
|
|
115
|
+
|
|
116
|
+
`shard.list()` returns `SandboxList(sandboxes, warnings)`. `shard.secrets.list()` returns
|
|
117
|
+
`SecretList(secrets, warnings)`. The async client returns the same result types. The warnings name
|
|
118
|
+
entries the daemon could not read. Both lists collect warnings from every page, keeping each exact
|
|
119
|
+
text once in first-seen order. Check them before you treat the result as complete. Other lists return
|
|
120
|
+
plain lists.
|
|
121
|
+
|
|
122
|
+
An `APIError` can carry `holders`, the sandbox ids that prevent an operation such as secret removal.
|
|
123
|
+
The attribute is `None` when the error has no holders field.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "useshards"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
description = "The Python SDK for shard, the sandbox manager."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
8
|
+
requires-python = ">=3.11"
|
|
9
|
+
dependencies = [
|
|
10
|
+
"httpx>=0.27,<1",
|
|
11
|
+
"attrs>=23.1",
|
|
12
|
+
"typing-extensions>=4.9",
|
|
13
|
+
]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Typing :: Typed",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
Source = "https://github.com/presmihaylov/shard"
|
|
21
|
+
|
|
22
|
+
[dependency-groups]
|
|
23
|
+
dev = [
|
|
24
|
+
"pytest==8.3.4",
|
|
25
|
+
"websockets==14.1",
|
|
26
|
+
"ruff==0.8.4",
|
|
27
|
+
"mypy==1.14.0",
|
|
28
|
+
"openapi-python-client==0.29.1",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[build-system]
|
|
32
|
+
requires = ["hatchling==1.27.0"]
|
|
33
|
+
build-backend = "hatchling.build"
|
|
34
|
+
|
|
35
|
+
[tool.hatch.version]
|
|
36
|
+
path = "src/useshards/_version.py"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.wheel]
|
|
39
|
+
packages = ["src/useshards"]
|
|
40
|
+
|
|
41
|
+
[tool.hatch.build.targets.sdist]
|
|
42
|
+
include = ["src/useshards", "README.md", "LICENSE", "NOTICE"]
|
|
43
|
+
|
|
44
|
+
[tool.ruff]
|
|
45
|
+
line-length = 120
|
|
46
|
+
target-version = "py311"
|
|
47
|
+
extend-exclude = ["src/useshards/_generated"]
|
|
48
|
+
|
|
49
|
+
[tool.ruff.lint]
|
|
50
|
+
select = ["E", "F", "W", "I", "B", "UP", "RUF", "SIM", "ASYNC"]
|
|
51
|
+
# The async client mirrors the sync one, whose callers pass a timeout, so asyncio.timeout is no substitute.
|
|
52
|
+
ignore = ["ASYNC109"]
|
|
53
|
+
|
|
54
|
+
[tool.ruff.lint.per-file-ignores]
|
|
55
|
+
# A twin is the async source with the keywords cut, so an async for that yields reads as a plain loop there.
|
|
56
|
+
"**/_sync/*.py" = ["UP028"]
|
|
57
|
+
|
|
58
|
+
[tool.mypy]
|
|
59
|
+
strict = true
|
|
60
|
+
python_version = "3.11"
|
|
61
|
+
files = ["src/useshards", "suite", "scripts", "tests", "examples"]
|
|
62
|
+
exclude = ["src/useshards/_generated/"]
|
|
63
|
+
|
|
64
|
+
[tool.pytest.ini_options]
|
|
65
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"""The Python SDK of shard: Shard for blocking code, AsyncShard for asyncio, with the same verbs on both."""
|
|
2
|
+
|
|
3
|
+
from ._async._command import AsyncCommand
|
|
4
|
+
from ._async._files import AsyncFiles
|
|
5
|
+
from ._async._follow import AsyncFollow
|
|
6
|
+
from ._async._sandbox import AsyncApp, AsyncCommands, AsyncSandbox
|
|
7
|
+
from ._async._shard import AsyncPolicies, AsyncSecrets, AsyncShard, AsyncSnapshots
|
|
8
|
+
from ._capture import DEFAULT_OUTPUT_LIMIT
|
|
9
|
+
from ._sync._command import Command
|
|
10
|
+
from ._sync._files import Files
|
|
11
|
+
from ._sync._follow import Follow
|
|
12
|
+
from ._sync._sandbox import App, Commands, Sandbox
|
|
13
|
+
from ._sync._shard import Policies, Secrets, Shard, Snapshots
|
|
14
|
+
from ._types import (
|
|
15
|
+
AppExit,
|
|
16
|
+
AppInfo,
|
|
17
|
+
Capabilities,
|
|
18
|
+
CommandInfo,
|
|
19
|
+
CommandResult,
|
|
20
|
+
EgressDecision,
|
|
21
|
+
ExitStatus,
|
|
22
|
+
FileEntry,
|
|
23
|
+
FileInfo,
|
|
24
|
+
FileType,
|
|
25
|
+
OutputCallback,
|
|
26
|
+
Policy,
|
|
27
|
+
PolicyRule,
|
|
28
|
+
Resources,
|
|
29
|
+
Restart,
|
|
30
|
+
RestartInfo,
|
|
31
|
+
RestartPolicy,
|
|
32
|
+
SandboxInfo,
|
|
33
|
+
SandboxList,
|
|
34
|
+
SecretInfo,
|
|
35
|
+
SecretList,
|
|
36
|
+
Signal,
|
|
37
|
+
Snapshot,
|
|
38
|
+
TerminalSize,
|
|
39
|
+
Version,
|
|
40
|
+
)
|
|
41
|
+
from ._version import __version__
|
|
42
|
+
from .errors import (
|
|
43
|
+
APIError,
|
|
44
|
+
AuthenticationError,
|
|
45
|
+
CommandNotStartedError,
|
|
46
|
+
ConfigurationError,
|
|
47
|
+
ConflictError,
|
|
48
|
+
InvalidRequestError,
|
|
49
|
+
NotFoundError,
|
|
50
|
+
PermissionDeniedError,
|
|
51
|
+
ProtocolError,
|
|
52
|
+
ServerError,
|
|
53
|
+
ShardConnectionError,
|
|
54
|
+
ShardError,
|
|
55
|
+
UnknownLengthError,
|
|
56
|
+
UnsafeArchiveError,
|
|
57
|
+
UnsupportedError,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
__all__ = [
|
|
61
|
+
"DEFAULT_OUTPUT_LIMIT",
|
|
62
|
+
"APIError",
|
|
63
|
+
"App",
|
|
64
|
+
"AppExit",
|
|
65
|
+
"AppInfo",
|
|
66
|
+
"AsyncApp",
|
|
67
|
+
"AsyncCommand",
|
|
68
|
+
"AsyncCommands",
|
|
69
|
+
"AsyncFiles",
|
|
70
|
+
"AsyncFollow",
|
|
71
|
+
"AsyncPolicies",
|
|
72
|
+
"AsyncSandbox",
|
|
73
|
+
"AsyncSecrets",
|
|
74
|
+
"AsyncShard",
|
|
75
|
+
"AsyncSnapshots",
|
|
76
|
+
"AuthenticationError",
|
|
77
|
+
"Capabilities",
|
|
78
|
+
"Command",
|
|
79
|
+
"CommandInfo",
|
|
80
|
+
"CommandNotStartedError",
|
|
81
|
+
"CommandResult",
|
|
82
|
+
"Commands",
|
|
83
|
+
"ConfigurationError",
|
|
84
|
+
"ConflictError",
|
|
85
|
+
"EgressDecision",
|
|
86
|
+
"ExitStatus",
|
|
87
|
+
"FileEntry",
|
|
88
|
+
"FileInfo",
|
|
89
|
+
"FileType",
|
|
90
|
+
"Files",
|
|
91
|
+
"Follow",
|
|
92
|
+
"InvalidRequestError",
|
|
93
|
+
"NotFoundError",
|
|
94
|
+
"OutputCallback",
|
|
95
|
+
"PermissionDeniedError",
|
|
96
|
+
"Policies",
|
|
97
|
+
"Policy",
|
|
98
|
+
"PolicyRule",
|
|
99
|
+
"ProtocolError",
|
|
100
|
+
"Resources",
|
|
101
|
+
"Restart",
|
|
102
|
+
"RestartInfo",
|
|
103
|
+
"RestartPolicy",
|
|
104
|
+
"Sandbox",
|
|
105
|
+
"SandboxInfo",
|
|
106
|
+
"SandboxList",
|
|
107
|
+
"SecretInfo",
|
|
108
|
+
"SecretList",
|
|
109
|
+
"Secrets",
|
|
110
|
+
"ServerError",
|
|
111
|
+
"Shard",
|
|
112
|
+
"ShardConnectionError",
|
|
113
|
+
"ShardError",
|
|
114
|
+
"Signal",
|
|
115
|
+
"Snapshot",
|
|
116
|
+
"Snapshots",
|
|
117
|
+
"TerminalSize",
|
|
118
|
+
"UnknownLengthError",
|
|
119
|
+
"UnsafeArchiveError",
|
|
120
|
+
"UnsupportedError",
|
|
121
|
+
"Version",
|
|
122
|
+
"__version__",
|
|
123
|
+
]
|