You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a930959
Browse filesBrowse the repository at this point in the historyBrowse files
feat(secrets): add sync and async exact ID handles (#11)
* feat(secrets): add sync and async ID handles preserving name behavior
* refactor(secrets): trim ID handle changes to focused SDK scope
* test(secrets): consolidate SDK lifecycle coverage
-**`runloop.api`** - Direct access to the underlying REST API client
130
131
132
+
### Secrets: names and exact IDs
133
+
134
+
`Secret` / `AsyncSecret` objects from `create()`, `list()`, and `from_name()` always operate by name, even when they carry a captured `.id`. Use a separate `SecretById` / `AsyncSecretById` handle for one exact row:
135
+
136
+
```python
137
+
created = runloop.secret.create(name="API_TOKEN", value="synthetic-example")
138
+
assert created.id isnotNone
139
+
exact = runloop.secret.from_id(created.id) # Lazy; never falls back to a name.
140
+
exact.update("synthetic-rotated") # Returns SecretView, as do get_info() and delete().
141
+
exact.delete() # Deletes only this row.
142
+
```
143
+
144
+
For `AsyncRunloopSDK`, await the operations but not `from_id()`. The handle types are exported from `runloop_api_client.sdk`. ID handles have `.id`, not `.name`; use their instance methods rather than name-only manager helpers. Environment-secret maps still take names; pass `exact.id` explicitly for an ID-based gateway/MCP binding. Name reads/updates select the greatest ID; name deletion removes selected matches nonatomically. IDs identify mutable rows, not value versions, and existing retries can replay writes. Rotation does not rewrite running devbox environments or issued tokens. Avoid debug request logging with real credentials.
145
+
131
146
### Devbox
132
147
133
148
Object-oriented interface for working with devboxes. Created via `runloop.devbox.create()`, `runloop.devbox.create_from_blueprint_id()`, `runloop.devbox.create_from_blueprint_name()`, `runloop.devbox.create_from_snapshot()`, or `runloop.devbox.from_id()`:
0 commit comments