{"id":22409906,"url":"https://github.com/v-spassky/drainage","last_synced_at":"2025-07-04T20:34:34.660Z","repository":{"id":265366230,"uuid":"625614101","full_name":"v-spassky/drainage","owner":"v-spassky","description":"🚿 Implementation of pipe expressions for Python.","archived":false,"fork":false,"pushed_at":"2023-05-15T07:31:01.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T12:13:15.583Z","etag":null,"topics":["functional-programming","pipe","python"],"latest_commit_sha":null,"homepage":"","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/v-spassky.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-09T16:51:20.000Z","updated_at":"2023-04-09T17:14:42.000Z","dependencies_parsed_at":"2024-11-29T09:33:58.350Z","dependency_job_id":null,"html_url":"https://github.com/v-spassky/drainage","commit_stats":null,"previous_names":["v-spassky/drainage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/v-spassky/drainage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-spassky%2Fdrainage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-spassky%2Fdrainage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-spassky%2Fdrainage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-spassky%2Fdrainage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v-spassky","download_url":"https://codeload.github.com/v-spassky/drainage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-spassky%2Fdrainage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263615870,"owners_count":23489206,"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":["functional-programming","pipe","python"],"created_at":"2024-12-05T12:10:22.059Z","updated_at":"2025-07-04T20:34:34.637Z","avatar_url":"https://github.com/v-spassky.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `drainage`\n\nA Python library that provides an implementation of UNIX-like pipes for Python\nfunctions. Chain your functions together using the pipe (`|`) operator and\nmake your code more functional and expressive.\n\n\n### Installation\n\n```\npip install git+https://github.com/v-spassky/drainage.git\n```\n\n### Usage\n\n```python\nfrom drainage import piped, filtered, collect\n\n@piped\ndef add_one(x):\n    return x + 1\n\n@filtered\ndef is_even(x):\n    return x % 2 == 0\n\nresult = [1, 2, 3, 4] | add_one | is_even | collect()\nprint(result)  # Output: [2, 4]\n```\n\n### Development\n\nIn the project directory, run:\n\n```\npoetry install\n```\n\n```\npoetry shell\n```\n\nThere are `poe` scripts for all kinds of checks:\n\n- to run tests:\n\n```\npoe test\n```\n\n- to run linter:\n\n```\npoe lint\n```\n\n- to run type checker:\n\n```\npoe typecheck\n```\n\n- to run all checks:\n\n```\npoe check-all\n```\n\n- to build docs locally:\n\n```\npoe doc\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-spassky%2Fdrainage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv-spassky%2Fdrainage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-spassky%2Fdrainage/lists"}