Check the HfApi documentation page for the reference of methods to manage your Space on the Hub.
Space runtime
Check the HfApi documentation page for the reference of methods to manage your Space on the Hub.
- Fetch current runtime:
get_space_runtime - Fetch build or run logs:
fetch_space_logs - Manage secrets:
add_space_secretanddelete_space_secret - Manage hardware:
request_space_hardware - Manage state:
pause_space,restart_space,set_space_sleep_time - Wait until Space is ready:
wait_for_space - Check your ZeroGPU quota:
get_zero_gpu_quota
Data structures
SpaceRuntime
[[autodoc]] SpaceRuntime
SpaceHardware
[[autodoc]] SpaceHardware
SpaceStage
[[autodoc]] SpaceStage
SpaceStorage
[[autodoc]] SpaceStorage
SpaceVariable
[[autodoc]] SpaceVariable
SpaceTemplate
[[autodoc]] SpaceTemplate
ZeroGpuQuota
[[autodoc]] ZeroGpuQuota
Source and license
Source: Hub Python Library documentation, adapted for this site. Licensing and attribution follow the terms of the upstream project.