{"id":23344371,"url":"https://github.com/rec/sproc","last_synced_at":"2025-04-10T02:32:49.250Z","repository":{"id":57463259,"uuid":"244002369","full_name":"rec/sproc","owner":"rec","description":"⛏ Subprocesses for subhumanses ⛏","archived":false,"fork":false,"pushed_at":"2024-02-14T14:42:28.000Z","size":692,"stargazers_count":11,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T04:04:05.185Z","etag":null,"topics":["python","subprocess","tools"],"latest_commit_sha":null,"homepage":"https://rec.github.io/sproc/","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/rec.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELIST","contributing":null,"funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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},"funding":{"github":"rec"}},"created_at":"2020-02-29T16:29:48.000Z","updated_at":"2024-12-30T22:24:52.000Z","dependencies_parsed_at":"2023-07-15T17:09:21.147Z","dependency_job_id":"b8592961-9cc2-49d1-99d9-96060fefc1c0","html_url":"https://github.com/rec/sproc","commit_stats":{"total_commits":72,"total_committers":3,"mean_commits":24.0,"dds":0.02777777777777779,"last_synced_commit":"84a2aae8b7ef586c4885fd00f783b114c5946527"},"previous_names":["rec/subprocessor","rec/run_subprocess"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rec%2Fsproc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rec%2Fsproc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rec%2Fsproc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rec%2Fsproc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rec","download_url":"https://codeload.github.com/rec/sproc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247688674,"owners_count":20979715,"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","subprocess","tools"],"created_at":"2024-12-21T06:26:27.517Z","updated_at":"2025-04-10T02:32:49.215Z","avatar_url":"https://github.com/rec.png","language":"Python","readme":"# ⛏️sproc: subprocesseses for subhumanses  ⛏\n\nRun a command in a subprocess and yield lines of text from `stdout` and\n`stderr` independently.\n\nUseful for handling long-running proceesses that write to both `stdout` and\n`stderr`.\n\n### Simple Example\n\n    import sproc\n\n    CMD = 'my-unix-command \"My Cool File.txt\" No-file.txt'\n\n    for ok, line in sproc.Sub(CMD) as sp:\n        if ok:\n             print(' ', line)\n        else:\n             print('!', line)\n\n    if sp.returncode:\n        print('Error code', sp.returncode)\n\n    # Return two lists of text lines and a returncode\n    out_lines, err_lines, returncode = sproc.run(CMD)\n\n    # Call callback functions with lines of text read from stdout and stderr\n    returncode = sproc.call(CMD, save_results, print_errors)\n\n    # Log stdout and stderr, with prefixes\n    returncode = sproc.log(CMD)\n\n\n### [API Documentation](https://rec.github.io/sproc#sproc--api-documentation)\n","funding_links":["https://github.com/sponsors/rec"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frec%2Fsproc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frec%2Fsproc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frec%2Fsproc/lists"}