{"id":24154914,"url":"https://github.com/raymondbutcher/python-timeprint","last_synced_at":"2025-03-01T22:28:55.889Z","repository":{"id":57475602,"uuid":"83151691","full_name":"raymondbutcher/python-timeprint","owner":"raymondbutcher","description":"Python context manager and decorator for showing time elapsed","archived":false,"fork":false,"pushed_at":"2017-03-01T22:27:01.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T00:02:55.567Z","etag":null,"topics":["python","python-3"],"latest_commit_sha":null,"homepage":null,"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/raymondbutcher.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":"2017-02-25T18:09:16.000Z","updated_at":"2020-07-06T00:32:09.000Z","dependencies_parsed_at":"2022-09-07T13:51:26.155Z","dependency_job_id":null,"html_url":"https://github.com/raymondbutcher/python-timeprint","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/raymondbutcher%2Fpython-timeprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raymondbutcher%2Fpython-timeprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raymondbutcher%2Fpython-timeprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raymondbutcher%2Fpython-timeprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raymondbutcher","download_url":"https://codeload.github.com/raymondbutcher/python-timeprint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241435157,"owners_count":19962399,"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-3"],"created_at":"2025-01-12T12:26:39.334Z","updated_at":"2025-03-01T22:28:55.853Z","avatar_url":"https://github.com/raymondbutcher.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Timeprint\nPython context manager and decorator for showing time elapsed.\n\n# Setup\n\n```\npip install timeprint\n```\n\n# Usage as a context manager\n\n```python\nimport timeprint\n\nwith timeprint:\n  do_stuff()\n\n# it took 100ms\n\nwith timeprint('some stuff')\n  do_stuff()\n\n# some stuff took 100ms\n```\n\n# Usage as a decorator\n\n```python\nimport timeprint\n\n@timeprint\ndef first_function():\n  do_stuff()\n\n# first_function took 100ms\n\n@timeprint('some other stuff')\ndef second_function():\n  do_stuff()\n\n# some other stuff took 100ms\n```\n\n# Is that it?\n\nYes. I was tired of finding and copying my old [Gist](https://gist.github.com/raymondbutcher/5168588) into files every time I wanted to measure a small chunk of code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraymondbutcher%2Fpython-timeprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraymondbutcher%2Fpython-timeprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraymondbutcher%2Fpython-timeprint/lists"}