HopxExecutionEnvironmentConfig
Base classes¶
â‹” Inheritance diagram¶
graph TD
1197897779["configs.HopxExecutionEnvironmentConfig"]
2844377061["configs.BaseExecutionEnvironmentConfig"]
330168112["schema.Schema"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
2844377061 --> 1197897779
330168112 --> 2844377061
3879467795 --> 330168112
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: BaseExecutionEnvironmentConfig
Hopx execution environment configuration.
Executes code in Hopx cloud VM sandboxes for secure, ephemeral execution environments.
Source code in src/exxec_config/configs.py
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | |
api_key
class-attribute
instance-attribute
¶
Hopx API key (or use HOPX_API_KEY env var).
base_url
class-attribute
instance-attribute
¶
Hopx API base URL.
internet_access
class-attribute
instance-attribute
¶
Enable internet access in the sandbox.
keep_alive
class-attribute
instance-attribute
¶
Keep sandbox running after execution.
language
class-attribute
instance-attribute
¶
language: Language = Field(
default="python", title="Programming Language", examples=["python", "javascript", "typescript"]
)
Programming language to use.
region
class-attribute
instance-attribute
¶
Preferred region for sandbox creation.
sandbox_timeout
class-attribute
instance-attribute
¶
sandbox_timeout: float = Field(
default=300.0, gt=0.0, title="Sandbox Lifetime", examples=[300.0, 600.0, 3600.0]
)
How long the sandbox stays alive in seconds.
template
class-attribute
instance-attribute
¶
template: str | None = Field(
default=None, title="Hopx Template", examples=["code-interpreter", "base"]
)
Hopx template name to use.
template_id
class-attribute
instance-attribute
¶
Hopx template ID (alternative to template name).
get_provider
¶
get_provider(
lifespan_handler: AbstractAsyncContextManager[ServerInfo] | None = None,
) -> HopxExecutionEnvironment
Create Hopx execution environment instance.