Region
Regions: where a resource runs and keeps its data, in NoClick's own names
(us-east, us-west, eu, ap), never a cloud's.
A resource takes its region when it's created and keeps it: the region=
you pass, else (for a child agent) its parent's, else your account's default
region, else none, which means wherever NoClick has capacity. Pass
region=other.region to put two resources together.
for region in noclick.regions():
print(region.name, region.label, region.default)
with noclick.Sandbox.create(region="eu") as sb:
print(sb.region) # euclass RegionA place NoClick runs resources and keeps their data; region= takes its name.
| name | str | What |
| label | str | For people: |
| location | str | Where it is, in words. |
| kinds | list[str] | The kinds of resource it places today: |
| default | bool | Whether it's your account's default region, which a resource takes when you name none. |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
regions
noclick.regions(kind=None, *, client=None) -> list[Region]Every region, or those that place kind ("sandbox", "agent", "bucket",
"database", "project", "machine", "browser", "dict" or "queue"; any other
raises noclick.InvalidRequest naming those that are placed by region). Dicts and queues are
kept in us-east only for now, and browsers run everywhere but us-west. Your account's
default is set in the console. Needs the scope of any kind it places: sandboxes, agents,
storage, databases, apps, machines, browsers, dicts, queues or volumes.
NoneThe client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Each region's name (what region= takes), its label and location, the
kinds it places, and whether it's your account's default.
See where things can run, and your account's default:
for region in noclick.regions():
print(region.name, region.location, "(default)" if region.default else "")Put a sandbox where an agent already runs:
analyst = noclick.Agent.from_name("analyst")
with noclick.Sandbox.create(region=analyst.region) as sb:
print(sb.exec("python -c 'print(1 + 1)'").stdout)