{"id":13502188,"url":"https://github.com/kennethreitz-archive/procs","last_synced_at":"2025-03-29T10:32:49.259Z","repository":{"id":22596750,"uuid":"25938759","full_name":"kennethreitz-archive/procs","owner":"kennethreitz-archive","description":"Python, Processes, and Prana.","archived":true,"fork":false,"pushed_at":"2015-03-10T18:01:40.000Z","size":335,"stargazers_count":226,"open_issues_count":6,"forks_count":7,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-08-04T04:05:22.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kennethreitz-archive.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-29T19:56:25.000Z","updated_at":"2024-08-04T04:05:22.316Z","dependencies_parsed_at":"2022-08-21T09:00:31.261Z","dependency_job_id":null,"html_url":"https://github.com/kennethreitz-archive/procs","commit_stats":null,"previous_names":["kennethreitz/procs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz-archive%2Fprocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz-archive%2Fprocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz-archive%2Fprocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kennethreitz-archive%2Fprocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kennethreitz-archive","download_url":"https://codeload.github.com/kennethreitz-archive/procs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246174207,"owners_count":20735406,"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":[],"created_at":"2024-07-31T22:02:05.292Z","updated_at":"2025-03-29T10:32:48.935Z","avatar_url":"https://github.com/kennethreitz-archive.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Procs: Python, Processes, and... Pipes\n======================================\n\nPython's Subprocess module is well designed for lower functions. Pipes is designed\nto encourage higher functions.\n\n\nIdeas\n-----\n\n- Simple shelling out, allow argument seperation.\n- command timeouts\n- Process monitoring\n- programatically compose a chain of streams.\n- process call timeouts\n\nUsage\n-----\n\nSimple Usage::\n\n    \u003e\u003e\u003e import procs\n\n    \u003e\u003e\u003e c = procs.run('uptime')\n    \u003e\u003e\u003e c.returncode\n    0\n    \u003e\u003e\u003e c.ok\n    True\n    \u003e\u003e\u003e print c.stdout\n    16:08  up  1:16, 7 users, load averages: 1.02 1.90 1.75\n\n\nAdvanced Usage::\n\n    \u003e\u003e\u003e ls = procs.Process('ls /usr/bin')\n    \u003e\u003e\u003e grep = procs.Process('grep python')\n    \u003e\u003e\u003e wc = procs.Process('wc -l')\n    \u003e\u003e\u003e chain = ls | grep | wc\n    \u003e\u003e\u003e chain.run()\n    \u003e\u003e\u003e print(chain.stdout)\n    19\n\n    \u003e\u003e\u003e from procs import ProcessHandler\n\n    class MyCommmand(ProcessHandler):\n\n        def __init__(self):\n            pass\n\n        def on_start(self):\n            pass\n\n        def on_exit(self):\n            pass\n\n        def on_crash(self):\n            pass\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethreitz-archive%2Fprocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkennethreitz-archive%2Fprocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennethreitz-archive%2Fprocs/lists"}