def main():
    """Start and stop one server

    Uses test-user and hub from jupyterhub_config.py in this directory
    """
    user = "test-user"
    hub_url = "http://127.0.0.1:8000"

    session = make_session(get_token())
    server_url = start_server(session, hub_url, user)
    r = session.get(f"{server_url}/api/status")
    r.raise_for_status()
    log.info(f"Server status: {r.text}")

    stop_server(session, hub_url, user)
Start and stop one server

Uses test-user and hub from jupyterhub_config.py in this directory
examples/server-api/start-stop-server.py