{"id":29251778,"url":"https://github.com/macrat/parallelline","last_synced_at":"2025-10-10T01:36:29.306Z","repository":{"id":104355966,"uuid":"103932762","full_name":"macrat/parallelline","owner":"macrat","description":"A Framework for buffering heavy calculation (or I/O) with multiprocessing for Python.","archived":false,"fork":false,"pushed_at":"2017-09-20T07:40:11.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T00:59:49.442Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macrat.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-18T11:53:58.000Z","updated_at":"2017-09-19T03:45:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"48e80347-b027-47ba-8491-2ad60a0bbf9b","html_url":"https://github.com/macrat/parallelline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/macrat/parallelline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fparallelline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fparallelline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fparallelline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fparallelline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macrat","download_url":"https://codeload.github.com/macrat/parallelline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macrat%2Fparallelline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002400,"owners_count":26083374,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-07-04T01:08:18.869Z","updated_at":"2025-10-10T01:36:29.275Z","avatar_url":"https://github.com/macrat.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parallel Line\n\nA Framework for buffering heavy calculation (or I/O) with multiprocessing for Python.\n\n## Demo\n``` shell\n$ git clone http://github.com/macrat/parallelline\n$ cd parallelline\n$ python3 parallelline.py\n```\n\n## Usage\nMake something Task. The Task is a function that takes one Pipe instance.\n\n``` python\n\u003e\u003e\u003e def load_task(pipe: Pipe) -\u003e None:\n...     for i in range(10):\n...         with open('{}.dat', 'rb') as f:\n...             pipe.put(f.read())\n```\n\nThe Task function can replace with a generator. Please use `@generator_task` decorator.\nThe pipe in arguments is Pipe instance but can use as an iterator.\nOf course, can use Pipe as an iterator in the normal Task function.\n\n``` python\n\u003e\u003e\u003e @generator_task\n... def something_process(pipe: Pipe) -\u003e typing.Iterator:\n...     for data in pipe:\n...         yield something_heavy_process(data)\n```\n\nYou can use `@task` decorator if Task hasn't to hold state.\nPlease make a function that takes one object and return one object, and allies `@task` decorator. In this example, show function will return None but work well.\n\n``` python\n\u003e\u003e\u003e @task\n... def show(data: typing.Any) -\u003e typing.Any:\n...     print(data)\n```\n\n\nAt last, concatenate all tasks by Pipeline class, and start processes.\nThe Pipeline will do coloring all messages that wrote into stdio by tasks.\n\n``` python\n\u003e\u003e\u003e Pipeline(load_task, something_heavy_process, show).start()\n```\n\n## License\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacrat%2Fparallelline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacrat%2Fparallelline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacrat%2Fparallelline/lists"}