Last Verified: 2025-01-27
Package:
hopx-ai on PyPI
Overview
Ready checks are utilities used in template building to verify that a template is ready before it’s considered complete. Use ready checks to ensure services are running, files exist, or commands succeed before the template is marked as ready.Import
Available Ready Checks
wait_for_port
Wait for a port to be listening.
port(int): Port number to checktimeout(int, optional): Timeout in seconds (default:60)
wait_for_url
Wait for a URL to be accessible.
url(str): URL to checktimeout(int, optional): Timeout in seconds
wait_for_file
Wait for a file to exist.
path(str): File path to checktimeout(int, optional): Timeout in seconds
wait_for_process
Wait for a process to be running.
process_name(str): Process name to checktimeout(int, optional): Timeout in seconds
wait_for_command
Wait for a command to succeed.
command(str): Command to executetimeout(int, optional): Timeout in seconds
Examples
Example 1: Port Ready Check
Example 2: URL Ready Check
Related Classes
- Template Builder - Use ready checks in templates
- Sandbox - Create sandboxes from templates
See Also
- Template Builder - Learn about building templates
- Core Concepts: Templates - Learn about templates
Next Steps
Now that you understand ready checks, explore:- Template Builder - Use ready checks in template building
- Building Templates - Learn template building concepts
- Template Configuration - Configure templates
- CLI Reference - Use HopX from the command line
- Custom Templates - Build custom templates

