{"id":20635841,"url":"https://github.com/orsinium-labs/asynchrony","last_synced_at":"2025-04-15T21:25:55.941Z","repository":{"id":44032306,"uuid":"511171839","full_name":"orsinium-labs/asynchrony","owner":"orsinium-labs","description":"asyncio Python framework for writing safe and fast concurrent code","archived":false,"fork":false,"pushed_at":"2022-07-09T06:52:03.000Z","size":31,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T15:42:33.023Z","etag":null,"topics":["async","asyncio","concurrency","framework","python","python3","task"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/orsinium-labs.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}},"created_at":"2022-07-06T14:31:05.000Z","updated_at":"2023-02-01T12:45:55.000Z","dependencies_parsed_at":"2022-09-01T16:40:31.734Z","dependency_job_id":null,"html_url":"https://github.com/orsinium-labs/asynchrony","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Fasynchrony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Fasynchrony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Fasynchrony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Fasynchrony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orsinium-labs","download_url":"https://codeload.github.com/orsinium-labs/asynchrony/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249155847,"owners_count":21221669,"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":["async","asyncio","concurrency","framework","python","python3","task"],"created_at":"2024-11-16T15:07:43.420Z","updated_at":"2025-04-15T21:25:55.913Z","avatar_url":"https://github.com/orsinium-labs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asynchrony\n\nPython [asyncio](https://docs.python.org/3/library/asyncio.html) framework for writing safe and fast concurrent code.\n\nFeatures:\n\n+ Type annotated and type safe\n+ Makes it easy to work with cancellation, errors, and scheduling.\n+ Well tested and well documented.\n+ Zero dependency.\n+ Based on real world experience and pain.\n\n## Installation and usage\n\n```bash\npython3 -m pip install asynchrony\n```\n\nA simple example of starting concurrent tasks for all URLs (maximum 100 tasks at the same time) and waiting for all of them to finish:\n\n```python\nfrom asynchrony import Tasks\n\nasync def download_page(url: str) -\u003e bytes:\n    ...\n\nurls = [...]\ntasks = Tasks[bytes](timeout=10, max_concurrency=100)\ntasks.map(urls, download_page)\n\ntry:\n    pages = await tasks\nexcept Exception:\n    failed = sum(t.failed for t in tasks)\n    print(f'{failed} tasks failed')\n    cancelled = sum(t.cancelled for t in tasks)\n    print(f'{cancelled} tasks cancelled')\nelse:\n    print(f'finished {len(tasks)} tasks')\n```\n\nSee [tutorial](./tutorial) for runnable usage examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Fasynchrony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forsinium-labs%2Fasynchrony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Fasynchrony/lists"}