boxd 0.2.14.dev757__tar.gz → 0.2.15.dev780__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 (44) hide show
  1. {boxd-0.2.14.dev757/src/boxd.egg-info → boxd-0.2.15.dev780}/PKG-INFO +2 -3
  2. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/README.md +1 -2
  3. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/pyproject.toml +1 -1
  4. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/__init__.py +2 -0
  5. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_credentials.py +25 -13
  6. boxd-0.2.15.dev780/src/boxd/_generated/api_pb2.py +552 -0
  7. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_generated/api_pb2_grpc.py +43 -0
  8. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_mappers.py +2 -0
  9. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_requests.py +10 -0
  10. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/models.py +20 -0
  11. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/machines.py +137 -3
  12. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780/src/boxd.egg-info}/PKG-INFO +2 -3
  13. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd.egg-info/SOURCES.txt +1 -0
  14. boxd-0.2.15.dev780/tests/test_delete_self.py +81 -0
  15. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/tests/test_mappers.py +10 -0
  16. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/tests/test_namespaces.py +87 -0
  17. boxd-0.2.14.dev757/src/boxd/_generated/api_pb2.py +0 -548
  18. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/LICENSE +0 -0
  19. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/setup.cfg +0 -0
  20. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_client.py +0 -0
  21. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_generated/__init__.py +0 -0
  22. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_streaming.py +0 -0
  23. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_transport.py +0 -0
  24. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_urls.py +0 -0
  25. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/_version_check.py +0 -0
  26. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/errors.py +0 -0
  27. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/__init__.py +0 -0
  28. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/account.py +0 -0
  29. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/credentials.py +0 -0
  30. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/disks.py +0 -0
  31. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/domains.py +0 -0
  32. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/orgs.py +0 -0
  33. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/snapshots.py +0 -0
  34. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/teams.py +0 -0
  35. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd/resources/vars.py +0 -0
  36. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd.egg-info/dependency_links.txt +0 -0
  37. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd.egg-info/requires.txt +0 -0
  38. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/src/boxd.egg-info/top_level.txt +0 -0
  39. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/tests/test_credentials.py +0 -0
  40. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/tests/test_requests.py +0 -0
  41. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/tests/test_streaming.py +0 -0
  42. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/tests/test_transport.py +0 -0
  43. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/tests/test_urls.py +0 -0
  44. {boxd-0.2.14.dev757 → boxd-0.2.15.dev780}/tests/test_version_check.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boxd
3
- Version: 0.2.14.dev757
3
+ Version: 0.2.15.dev780
4
4
  Summary: Python SDK for the boxd cloud VM platform
5
5
  Author: Azin
6
6
  License-Expression: MIT
@@ -269,8 +269,7 @@ machine restored from a snapshot starts unrestricted.
269
269
 
270
270
  There are four sizes: 1 vCPU/4G, 2/8G, 4/16G, 8/32G. Name either dimension and
271
271
  the other follows, so `vcpu=2` and `memory="8G"` are the same request. Anything
272
- above your org's quota is refused, never quietly clamped; 8/32G is above the
273
- default quota, so it needs the quota raised first.
272
+ above your org's quota is refused, never quietly clamped.
274
273
 
275
274
  A machine keeps the size it was created with, through stop/start, wake, and
276
275
  migration alike. Changing it is an explicit call:
@@ -237,8 +237,7 @@ machine restored from a snapshot starts unrestricted.
237
237
 
238
238
  There are four sizes: 1 vCPU/4G, 2/8G, 4/16G, 8/32G. Name either dimension and
239
239
  the other follows, so `vcpu=2` and `memory="8G"` are the same request. Anything
240
- above your org's quota is refused, never quietly clamped; 8/32G is above the
241
- default quota, so it needs the quota raised first.
240
+ above your org's quota is refused, never quietly clamped.
242
241
 
243
242
  A machine keeps the size it was created with, through stop/start, wake, and
244
243
  migration alike. Changing it is an explicit call:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boxd"
3
- version = "0.2.14.dev757"
3
+ version = "0.2.15.dev780"
4
4
  description = "Python SDK for the boxd cloud VM platform"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -52,6 +52,7 @@ from .models import (
52
52
  DiskStatus,
53
53
  EnvVar,
54
54
  ExecResult,
55
+ SelfDeleteResult,
55
56
  ExposedPort,
56
57
  BillingActivityEntry,
57
58
  BillingActivityPage,
@@ -129,6 +130,7 @@ __all__ = [
129
130
  "DiskStatus",
130
131
  "EnvVar",
131
132
  "ExecResult",
133
+ "SelfDeleteResult",
132
134
  "ExposedPort",
133
135
  "BillingActivityEntry",
134
136
  "BillingActivityPage",
@@ -117,6 +117,29 @@ async def probe_async(host: str, port: int, timeout: float = _PROBE_TIMEOUT_SECS
117
117
  return True
118
118
 
119
119
 
120
+ def metadata_base(not_inside: str = _NO_CREDENTIALS) -> str:
121
+ """The in-VM metadata adapter's base URL, or ``AuthenticationError(not_inside)``
122
+ when this code is not running inside a boxd machine. Detection needs BOTH
123
+ signals, the environment hint and a live probe — neither alone is
124
+ sufficient."""
125
+ if not looks_like_a_machine():
126
+ raise AuthenticationError(not_inside)
127
+ gateway = detect_gateway()
128
+ if not gateway or not probe(gateway, METADATA_PORT):
129
+ raise AuthenticationError(not_inside)
130
+ return f"http://{gateway}:{METADATA_PORT}"
131
+
132
+
133
+ async def metadata_base_async(not_inside: str = _NO_CREDENTIALS) -> str:
134
+ """Async twin of :func:`metadata_base`."""
135
+ if not looks_like_a_machine():
136
+ raise AuthenticationError(not_inside)
137
+ gateway = detect_gateway()
138
+ if not gateway or not await probe_async(gateway, METADATA_PORT):
139
+ raise AuthenticationError(not_inside)
140
+ return f"http://{gateway}:{METADATA_PORT}"
141
+
142
+
120
143
  # ── Response parsing (shared by both clients) ────────────────────────
121
144
 
122
145
 
@@ -256,13 +279,7 @@ class SyncCredentials(_CredentialsBase):
256
279
  self.discovered_base_url = api_url
257
280
 
258
281
  def _metadata_base(self) -> str:
259
- """Detection needs BOTH signals — neither alone is sufficient."""
260
- if not looks_like_a_machine():
261
- raise AuthenticationError(_NO_CREDENTIALS)
262
- gateway = detect_gateway()
263
- if not gateway or not probe(gateway, METADATA_PORT):
264
- raise AuthenticationError(_NO_CREDENTIALS)
265
- return f"http://{gateway}:{METADATA_PORT}"
282
+ return metadata_base()
266
283
 
267
284
 
268
285
  class AsyncCredentials(_CredentialsBase):
@@ -321,12 +338,7 @@ class AsyncCredentials(_CredentialsBase):
321
338
  self.discovered_base_url = api_url
322
339
 
323
340
  async def _metadata_base(self) -> str:
324
- if not looks_like_a_machine():
325
- raise AuthenticationError(_NO_CREDENTIALS)
326
- gateway = detect_gateway()
327
- if not gateway or not await probe_async(gateway, METADATA_PORT):
328
- raise AuthenticationError(_NO_CREDENTIALS)
329
- return f"http://{gateway}:{METADATA_PORT}"
341
+ return await metadata_base_async()
330
342
 
331
343
 
332
344
  def _json_or_none(resp: httpx.Response) -> Any: