{"id":23080453,"url":"https://github.com/mishankov/tipe","last_synced_at":"2025-08-20T00:16:16.346Z","repository":{"id":156222293,"uuid":"592447025","full_name":"mishankov/tipe","owner":"mishankov","description":"🐍 Typed pipes","archived":false,"fork":false,"pushed_at":"2025-03-03T12:21:10.000Z","size":110,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T13:47:46.907Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mishankov.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}},"created_at":"2023-01-23T18:49:50.000Z","updated_at":"2024-12-02T13:44:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca3dc0ad-c241-420e-9efb-56ad30a11eee","html_url":"https://github.com/mishankov/tipe","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mishankov/tipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishankov%2Ftipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishankov%2Ftipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishankov%2Ftipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishankov%2Ftipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mishankov","download_url":"https://codeload.github.com/mishankov/tipe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishankov%2Ftipe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271242315,"owners_count":24725019,"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-08-19T02:00:09.176Z","response_time":63,"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":["functional-programming","pipe","python"],"created_at":"2024-12-16T13:14:03.614Z","updated_at":"2025-08-20T00:16:15.914Z","avatar_url":"https://github.com/mishankov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI](https://img.shields.io/pypi/v/tipe)](https://pypi.org/project/tipe/)\n\n# Tipe - typed pipe\n\nTipe allows you to create constructions similar to [pipe operator](https://elixirschool.com/en/lessons/basics/pipe_operator), where result of a function used as an input of next function\n\n## Instalation\n\n```bash\npip install tipe\n```\n\n\n## Examples\n\n```python\n\u003e\u003e\u003e from tipe import Pipe\n\u003e\u003e\u003e \n\u003e\u003e\u003e Pipe(2).pipe(lambda x: x + 1).pipe(float).unwrap()\n3.0\n\u003e\u003e\u003e Pipe([2, 3, 4]) \\\n...         .pipe(len) \\\n...         .pipe(lambda x: x + 1) \\\n...         .pipe(float) \\\n...         .unwrap()\n4.0\n\u003e\u003e\u003e Pipe(2).pipe(range, 4).pipe(len).unwrap()\n2\n```\n\nEquivalent for examples above would be\n\n```python\n\u003e\u003e\u003e float(2+1)\n3.0\n\u003e\u003e\u003e float(len([2, 3, 4]) + 1)\n4.0\n\u003e\u003e\u003e len(range(2, 4))\n2\n```\n\n\n## API\n\n### `Pipe()`\n\nTo use `.pipe()` on a value wrap it with `Pipe` class\n\n```python\n\u003e\u003e\u003e Pipe(2)\nPipe(2)\n```\n\n### `Pipe.pipe()`\n\nPass function to execute on `Pipe` value and additional params for it. Wraps function result in `Pipe` and returns it\n\n\n### `Pipe.check()`\n\nLike `Pipe.pipe()` but does not change the value inside `Pipe`. May be useful for debugging purposes\n\n```python\n\u003e\u003e\u003e Pipe(2).pipe(lambda x: x ** x).check(print).pipe(float).unwrap()\n4\n4.0\n```\n\n### `Pipe.unwrap()`\n\nReturns value from `Pipe`\n\n\n### Short forms\n\nFor convenience you can use `P` as short version of `Pipe` and short versions of the methods:\n- `p`: `pipe`\n- `c`: `check`\n- `u`: `unwrap`\n\n\n## Types\n\n`tipe` tries its best to stay typesafe, so every function knows what exactly what it returns as long as it is inferable from arguments\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishankov%2Ftipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmishankov%2Ftipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishankov%2Ftipe/lists"}