{"id":15788352,"url":"https://github.com/joellefkowitz/simple-pipes","last_synced_at":"2025-03-31T18:24:12.956Z","repository":{"id":57467553,"uuid":"311696005","full_name":"JoelLefkowitz/simple-pipes","owner":"JoelLefkowitz","description":"Subprocess utils.","archived":false,"fork":false,"pushed_at":"2024-05-27T22:09:50.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-10T13:48:45.537Z","etag":null,"topics":["pipe","stdout","subprocess"],"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/JoelLefkowitz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-10T15:09:58.000Z","updated_at":"2024-05-27T22:49:30.000Z","dependencies_parsed_at":"2024-05-27T20:50:45.058Z","dependency_job_id":"b80806b4-8eed-4563-a2c9-88460912975b","html_url":"https://github.com/JoelLefkowitz/simple-pipes","commit_stats":null,"previous_names":["joellefkowitz/pipes"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fsimple-pipes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fsimple-pipes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fsimple-pipes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fsimple-pipes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoelLefkowitz","download_url":"https://codeload.github.com/JoelLefkowitz/simple-pipes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246515996,"owners_count":20790151,"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":["pipe","stdout","subprocess"],"created_at":"2024-10-04T21:41:54.933Z","updated_at":"2025-03-31T18:24:12.937Z","avatar_url":"https://github.com/JoelLefkowitz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple pipes\n\nSubprocess utils.\n\n![Review](https://img.shields.io/github/actions/workflow/status/JoelLefkowitz/simple-pipes/review.yml)\n![Version](https://img.shields.io/pypi/v/simple-pipes)\n![Downloads](https://img.shields.io/pypi/dw/simple-pipes)\n![Quality](https://img.shields.io/codacy/grade/dc58dc1425df48c5be692f01029b732e)\n![Coverage](https://img.shields.io/codacy/coverage/dc58dc1425df48c5be692f01029b732e)\n\n## Installing\n\n```bash\npip install simple-pipes\n```\n\n## Documentation\n\nDocumentation and more detailed examples are hosted on [Github Pages](https://joellefkowitz.github.io/simple-pipes).\n\n### Usage\n\nPass a command in exec form:\n\n```python\nfrom simple_pipes import pipe_call, pipe_capture\n\npipe_call([\"echo\", \"Hello\"])\n```\n\nThis is equivalent to:\n\n```python\nimport subprocess\n\nsubprocess.Popen([\"echo\", \"Hello\"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\n```\n\nChanging directory before execution:\n\n```python\npipe_call([\"echo\", \"Hello\"], cwd=\".\")\n```\n\nIf you're running a command does not terminate, such as starting a server, the program will remain attached.\n\nTo detach the running process on a given string output:\n\n```python\nwrapper = pipe_call([\"echo\", \"Hello\"], break_str=\"Hello\"):\n```\n\nYou must keep the wrapper object in scope or the detached process will be terminated in garbage collection.\n\nOften you want to run a process until it terminates and capture the entire output:\n\n```python\noutput = pipe_capture([\"echo\", \"Hello\"], cwd=\".\")\n\nprint(output)\n\n\u003e\u003e Hello\n```\n\n## Tooling\n\n### Dependencies\n\nTo install dependencies:\n\n```bash\nyarn install\npip install .[all]\n```\n\n### Tests\n\nTo run tests:\n\n```bash\nthx test\n```\n\n### Documentation\n\nTo generate the documentation locally:\n\n```bash\nthx docs\n```\n\n### Linters\n\nTo run linters:\n\n```bash\nthx lint\n```\n\n### Formatters\n\nTo run formatters:\n\n```bash\nthx format\n```\n\n## Contributing\n\nPlease read this repository's [Code of Conduct](CODE_OF_CONDUCT.md) which outlines our collaboration standards and the [Changelog](CHANGELOG.md) for details on breaking changes that have been made.\n\nThis repository adheres to semantic versioning standards. For more information on semantic versioning visit [SemVer](https://semver.org).\n\nBump2version is used to version and tag changes. For example:\n\n```bash\nbump2version patch\n```\n\n### Contributors\n\n- [Joel Lefkowitz](https://github.com/joellefkowitz) - Initial work\n\n## Remarks\n\nLots of love to the open source community!\n\n\u003cdiv align='center'\u003e\n    \u003cimg width=200 height=200 src='https://media.giphy.com/media/osAcIGTSyeovPq6Xph/giphy.gif' alt='Be kind to your mind' /\u003e\n    \u003cimg width=200 height=200 src='https://media.giphy.com/media/KEAAbQ5clGWJwuJuZB/giphy.gif' alt='Love each other' /\u003e\n    \u003cimg width=200 height=200 src='https://media.giphy.com/media/WRWykrFkxJA6JJuTvc/giphy.gif' alt=\"It's ok to have a bad day\" /\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoellefkowitz%2Fsimple-pipes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoellefkowitz%2Fsimple-pipes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoellefkowitz%2Fsimple-pipes/lists"}