{"library":"pypprof","title":"Pypprof HTTP Profiling Endpoints","description":"pypprof (version 0.0.1) adds HTTP-based endpoints to Python applications for collecting CPU and heap profiles, similar to Go's `net/http/pprof`. It leverages `zprofile` and `mprofile` under the hood for profile collection. The last release was in 2019, indicating the library is in a maintenance state rather than active development.","language":"python","status":"maintenance","last_verified":"Mon May 18","install":{"commands":["pip install pypprof"],"cli":null},"imports":["from pypprof.net_http import start_pprof_server"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pypprof.net_http import start_pprof_server\nimport time\nimport threading\n\ndef my_heavy_computation():\n    total = 0\n    for i in range(10000000):\n        total += i * i\n    return total\n\ndef background_task():\n    while True:\n        print(f\"Performing heavy computation: {my_heavy_computation()}\")\n        time.sleep(1)\n\nif __name__ == \"__main__\":\n    # Start the pprof server on port 8081\n    print(\"Starting pypprof server on port 8081...\")\n    start_pprof_server(port=8081)\n    print(\"pypprof server started. Access profiles at http://localhost:8081/debug/pprof/\")\n    print(\"To fetch a CPU profile: go tool pprof -http=:8088 :8081/debug/pprof/profile\")\n    print(\"To fetch a heap profile: go tool pprof :8081/debug/pprof/heap\")\n\n    # Run a background task to generate some CPU load for profiling\n    worker_thread = threading.Thread(target=background_task, daemon=True)\n    worker_thread.start()\n\n    try:\n        while True:\n            time.sleep(10) # Keep the main thread alive\n    except KeyboardInterrupt:\n        print(\"Exiting.\")\n","lang":"python","description":"This quickstart demonstrates how to integrate `pypprof` into a simple Python application to expose profiling endpoints. After running, you can access CPU and heap profiles via `go tool pprof` (requires Go installed) or `curl` against the exposed `/debug/pprof/` endpoints. A background thread continuously performs a CPU-intensive task to generate data for profiling.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-18","installed_version":"0.0.1","pypi_latest":"0.0.1","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":40,"avg_install_s":2.9,"avg_import_s":null,"wheel_type":"sdist"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pypprof","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pypprof","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":2.8,"import_time_s":null,"mem_mb":null,"disk_size":"27M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pypprof","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pypprof","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":2.5,"import_time_s":null,"mem_mb":null,"disk_size":"30M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pypprof","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pypprof","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":3.4,"import_time_s":null,"mem_mb":null,"disk_size":"20M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pypprof","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pypprof","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":6,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pypprof","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pypprof","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":3,"import_time_s":null,"mem_mb":null,"disk_size":"27M"}]}}