{"id":17694467,"url":"https://github.com/felix-andreas/pyprofilers","last_synced_at":"2025-08-01T00:35:09.573Z","repository":{"id":57456312,"uuid":"211128335","full_name":"felix-andreas/pyprofilers","owner":"felix-andreas","description":"A simple wrapper library for various Python Profilers.","archived":false,"fork":false,"pushed_at":"2020-09-24T16:54:54.000Z","size":34,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T04:46:39.264Z","etag":null,"topics":["python","python-profilers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felix-andreas.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-09-26T15:59:23.000Z","updated_at":"2021-05-07T18:56:24.000Z","dependencies_parsed_at":"2022-09-14T05:10:30.647Z","dependency_job_id":null,"html_url":"https://github.com/felix-andreas/pyprofilers","commit_stats":null,"previous_names":["felix-andreas/pyprofilers","andreasfelix/pyprofilers"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felix-andreas%2Fpyprofilers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felix-andreas%2Fpyprofilers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felix-andreas%2Fpyprofilers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felix-andreas%2Fpyprofilers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felix-andreas","download_url":"https://codeload.github.com/felix-andreas/pyprofilers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246394153,"owners_count":20770081,"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":["python","python-profilers"],"created_at":"2024-10-24T13:48:51.837Z","updated_at":"2025-03-30T23:26:06.237Z","avatar_url":"https://github.com/felix-andreas.png","language":"Python","readme":"# PyProfilers\nPyProfilers is collection of wrapper functions for various Python profilers which aims to make profiling more convenient.\n\n## Installing\nInstall and update using pip:\n\n```sh\npip install -U pyprofilers\n```\n\n## Usage\n\n### Import PyProfilers\n```python\nimport pyprofilers as pp\n```\n\n\n### Profile with [cProfile](https://docs.python.org/3/library/profile.html#module-cProfile)\nUse the standard Python [cProfile](https://docs.python.org/3/library/profile.html#module-cProfile) to list\nthe cumulative time spent in the function `func` and all its subfunctions:\n\n```python\n@pp.profile(sort_by='cumulative', out_lines=30)\ndef func():\n  ...\n```\n\n- `sort_by` can be used to sort the results according to the supplied criteria. All criterias can be found [here.](https://docs.python.org/2/library/profile.html#pstats.Stats.sort_stats)\n- `out_lines` controls the number of lines in results. Use `None` or ommit the arugment to show all.\n\n### Profile with [line_profiler](https://github.com/pyutils/line_profiler)\n\nUse the [line_profiler](https://github.com/pyutils/line_profiler) to list time spent within each line of `func`:\n\n```python\n@pp.profile_by_line(exit=1)\ndef func():\n  ...\n```\n\nSet `exit` to `True` to stop the execution after the first call to `func` returns. This is useful if `func` is called multiple times to\navoid the repeated output of the profiler statistics.\n\n### Simple Timer\nTo just time the execution of a function use the `simple_timer` decoration:\n\n```python\n@pp.simple_timer(num=1)\ndef func():\n  ...\n```\n\nThe `num` argument can be used to specify how often the function should be executed.\n\n## License\n[GNU General Public License v3.0](https://github.com/andreasfelix/pyprofilers/blob/master/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelix-andreas%2Fpyprofilers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelix-andreas%2Fpyprofilers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelix-andreas%2Fpyprofilers/lists"}