{"id":21215298,"url":"https://github.com/romis2012/aiohttp-serve","last_synced_at":"2026-02-13T04:43:15.752Z","repository":{"id":57680652,"uuid":"493937883","full_name":"romis2012/aiohttp-serve","owner":"romis2012","description":"Multiprocessing based aiohttp application runner","archived":false,"fork":false,"pushed_at":"2022-05-26T05:51:44.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-22T01:29:08.820Z","etag":null,"topics":["aiohttp","aiohttp-server","asyncio","multiprocessing","supervisor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romis2012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-19T05:50:38.000Z","updated_at":"2022-05-19T06:20:26.000Z","dependencies_parsed_at":"2022-09-01T13:52:31.164Z","dependency_job_id":null,"html_url":"https://github.com/romis2012/aiohttp-serve","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/romis2012/aiohttp-serve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romis2012%2Faiohttp-serve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romis2012%2Faiohttp-serve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romis2012%2Faiohttp-serve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romis2012%2Faiohttp-serve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romis2012","download_url":"https://codeload.github.com/romis2012/aiohttp-serve/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romis2012%2Faiohttp-serve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29396838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T04:26:15.637Z","status":"ssl_error","status_checked_at":"2026-02-13T04:16:29.732Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aiohttp","aiohttp-server","asyncio","multiprocessing","supervisor"],"created_at":"2024-11-20T21:36:42.596Z","updated_at":"2026-02-13T04:43:15.734Z","avatar_url":"https://github.com/romis2012.png","language":"Python","readme":"## aiohttp-serve\n\n[![CI](https://github.com/romis2012/aiohttp-serve/actions/workflows/ci.yml/badge.svg)](https://github.com/romis2012/aiohttp-serve/actions/workflows/ci.yml)\n[![Coverage Status](https://codecov.io/gh/romis2012/aiohttp-serve/branch/master/graph/badge.svg)](https://codecov.io/gh/romis2012/aiohttp-serve)\n[![PyPI version](https://badge.fury.io/py/aiohttp-serve.svg)](https://pypi.python.org/pypi/aiohttp-serve)\n\n`aiohttp-serve` package allows you to run `aiohttp.web.Application` on multiple workers/processes \n(if for some reason you don't want to use external servers such as gunicorn etc.)\n\n## Requirements\n- Python \u003e= 3.7\n- aiohttp \u003e= 3.7.4\n- PyYAML\u003e=5.4.1 (optional)\n\n## Installation\n```\npip install aiohttp-serve\n```\n\n## Usage\n\n\u003ch5\u003e\u003ccode\u003eweb.py\u003c/code\u003e\u003c/h5\u003e\n\n```python\nfrom aiohttp import web\n\n\nasync def index(request):\n    return web.Response(body='Hello world')\n\n\napp = web.Application()\napp.router.add_get('/', index)\n```\n\n#### simple usage:\n\n```python\nfrom aiohttp_serve import serve\n\nif __name__ == '__main__':\n    serve(\n        'web:app',\n        host='127.0.0.1',\n        port=8080,\n        workers=4,\n    )\n```\n\n#### bind to multiple host/port/path:\n\n```python\nfrom aiohttp_serve import serve\n\nif __name__ == '__main__':\n    serve(\n        'web:app',\n        bind=[\n            'http://127.0.0.1:80',\n            'https://127.0.0.1:443',\n            'unix:/path/to/unix/socket.sock',\n        ],\n        workers=4,\n        ssl_certfile='/path/to/cert.crt',\n        ssl_keyfile='/path/to/key.key',\n    )\n```\n\n#### logging:\n\nJust configure logging at module level\n\n```python\nimport yaml\nimport logging.config\n\nfrom aiohttp_serve import serve\n\nwith open('./examples/logging.yaml', mode='r') as f:\n    logging.config.dictConfig(yaml.safe_load(f))\n\nif __name__ == '__main__':\n    serve(\n        'web:app',\n        host='127.0.0.1',\n        port=8080,\n        workers=4,\n    )\n```\n\nof use `log_config` arg (dict, .json or .yaml or .conf file)\n\n```python\nfrom aiohttp_serve import serve\n\nif __name__ == '__main__':\n    serve(\n        'web:app',\n        host='127.0.0.1',\n        port=8080,\n        workers=4,\n        log_config='./examples/logging.yaml',\n    )\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromis2012%2Faiohttp-serve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromis2012%2Faiohttp-serve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromis2012%2Faiohttp-serve/lists"}