{"id":19665247,"url":"https://github.com/alttch/pptop","last_synced_at":"2025-04-28T22:31:05.921Z","repository":{"id":46019984,"uuid":"201283693","full_name":"alttch/pptop","owner":"alttch","description":"Open, extensible Python injector/profiler/analyzer","archived":false,"fork":false,"pushed_at":"2022-02-02T21:30:19.000Z","size":1649,"stargazers_count":65,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T23:39:07.681Z","etag":null,"topics":["analytics","analyzing","data-collection","debugger","debugging","hacking","injecting","profiler","profiling","python","python3","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alttch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-08T15:14:34.000Z","updated_at":"2025-02-05T16:26:30.000Z","dependencies_parsed_at":"2022-08-28T09:31:40.652Z","dependency_job_id":null,"html_url":"https://github.com/alttch/pptop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alttch%2Fpptop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alttch%2Fpptop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alttch%2Fpptop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alttch%2Fpptop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alttch","download_url":"https://codeload.github.com/alttch/pptop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251397577,"owners_count":21583034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","analyzing","data-collection","debugger","debugging","hacking","injecting","profiler","profiling","python","python3","testing"],"created_at":"2024-11-11T16:21:48.932Z","updated_at":"2025-04-28T22:31:04.797Z","avatar_url":"https://github.com/alttch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ppTOP\n\nProject home: https://pptop.bma.ai/\n\n\u003cimg src=\"https://github.com/alttch/pptop/blob/master/media/logo.png?raw=true\" align=\"right\" width=\"200\" /\u003e ppTOP is open, extensible Python injector/profiler/analyzer.\n\nThe main idea is to inject a custom code inside Python process (already running\nor going to be launched) and analyze its behavior with no any code\nmodifications.\n\n\u003cimg src=\"https://img.shields.io/pypi/v/pptop.svg\" /\u003e \u003cimg src=\"https://img.shields.io/badge/license-MIT-green\" /\u003e \u003cimg src=\"https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7-blue.svg\" /\u003e \u003cimg src=\"https://img.shields.io/badge/-beta-orange.svg\" /\u003e\n\nSay no to \"prints\" and garbage in debug logs - now you have ppTOP. A modern MRI\nscanner for Python.\n\n## Installation\n\n```\n  pip3 install pptop\n```\n\n* Python: 3.5+ is required, as ppTOP uses asyncio\n* Can be injected into any Python version (tested: 2.7+)\n* Injection into running processes requires *gdb* (present in almost\n  all Linux distributions)\n* Only Linux systems are currently supported\n\n\u003cimg src=\"https://github.com/alttch/pptop/blob/master/media/demo.gif?raw=true\" width=\"750\" /\u003e\n\n## Features\n\nppTOP can be injected into any running Python process\n\n[![asciicast](https://asciinema.org/a/265309.svg)](https://asciinema.org/a/265309)\n\nor you can load Python program manually and profile its launch\n\n[![asciicast](https://asciinema.org/a/265310.svg)](https://asciinema.org/a/265310)\n\nTo launch a program, press *Ctrl+L* or specify *-w sec* param in command line\nargs to start it automatically after the specified delay.\n\nData from connected process is collected in real-time and displayed in\ntable-based console UI, which can be easily extended with custom plugins.\n\nAll data tables can be scrolled, filtered, new data collection can be paused.\nIn case of problems, any plugin can be re-injected at any time.\n\n## Usage\n\nTo start ppTOP, type\n\n```shell\n    pptop\n```\n\nand then select Python process you want to inject to from the list.\n\nAlternatively, you can start it with\n\n```shell\n    pptop PID\n    # or\n    pptop PID-FILE\n```\n\nand specify the process from the command line.\n\nIf you want to analyze program startup, just type\n\n```shell\n    pptop /path/to/program.py\n```\n\nThe program will be loaded in waiting state, press *Ctrl+L* when you are ready.\n\nTo get a help for the current plugin, press *F1* to display module\ndocumentation.\n\n## Configuration\n\nPlugins and keyboard shortcuts are configured by default in\n*~/.pptop/pptop.yml* file (created automatically at first launch).\n\n## Standard plugins\n\n* **asyncio** asyncio loop monitor\n* **atasker** [atasker](https://github.com/alttch/atasker) monitor\n* **env** view process OS environment variables\n* **log** inject into all Python loggers and collect log messages\n* **malloc** trace object memory allocations\n* **neotasker** [neotasker](https://github.com/alttch/neotasker) monitor\n* **open_files** view process open files\n* **script_runner** launch a custom scripts inside process\n* **threads** view process threads\n* **vars** variable/function watcher\n* **yappi** [yappi](https://github.com/sumerc/yappi) profiler plugin\n\nMost of plugins contain 2 parts of code: one collects data inside profiling\nprocess, other display it in ppTOP UI. For the profiling process all plug-ins\nare invisible, safe and unloadable (at least they try their best :)\n\n## Console mode\n\nWith \"`\" button, remote Python console can be opened. It has no full\nfunctionality like a standard Python console, but supports all frequently used\nfeatures, like importing modules, defining functions and variables,\nexecuting functions and loops etc.\n\n[![asciicast](https://asciinema.org/a/265307.svg)](https://asciinema.org/a/265307)\n\nConsole has own remote *globals*, which are preserved until ppTOP quit and\ninjected server is terminated.\n\n## Grab stdout/stderr\n\nIf launched with \"-g\" option, ppTOP will grab stdout/stderr of injected process\nand print it to local console. You can view local console without entering\nconsole mode, by pressing *Ctrl+O*.\n\n## Documentation\n\nConfiguration, troubleshooting, advanced usage, plugin development:\nhttps://pptop.bma.ai/doc/\n\n## TODO\n\n* [ ] More plugins\n* [ ] Advanced filtering\n* [ ] Data snapshots\n* [ ] Step-by-step debugger\n* [ ] JSON API, web interface\n* [ ] Charts\n\nEnjoy! :)\n\np.s. Code in **master** can be completely broken, install with *pip* only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falttch%2Fpptop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falttch%2Fpptop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falttch%2Fpptop/lists"}