INNER CODE UNIT · Python

shutdown

codeskyblue/uiautodev · uiautodev/app.py:124

def shutdown() -> str:
    """Shutdown the server"""
    os.kill(os.getpid(), signal.SIGINT)
    return "Server shutting down..."


@app.get("/demo")
def demo():
    """Demo endpoint"""
    static_dir = Path(__file__).parent / "static"
    print(static_dir / "demo.html")
    return FileResponse(static_dir / "demo.html")


@app.get("/redirect")
def index_redirect():
    """redirect to official homepage"""
    url = get_webpage_url()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…