{"id":34075130,"url":"https://github.com/divbzero/aioserver","last_synced_at":"2025-12-14T09:04:23.654Z","repository":{"id":57409129,"uuid":"111185734","full_name":"divbzero/aioserver","owner":"divbzero","description":"An async web framework for humans","archived":false,"fork":false,"pushed_at":"2025-05-08T22:16:27.000Z","size":30,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-18T02:55:04.792Z","etag":null,"topics":["aiohttp","async","asyncio","cors","forhumans","framework","http","server","simple","web"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/aioserver","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/divbzero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-18T07:27:54.000Z","updated_at":"2025-05-08T22:16:32.000Z","dependencies_parsed_at":"2022-09-26T17:11:09.553Z","dependency_job_id":null,"html_url":"https://github.com/divbzero/aioserver","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/divbzero/aioserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divbzero%2Faioserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divbzero%2Faioserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divbzero%2Faioserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divbzero%2Faioserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divbzero","download_url":"https://codeload.github.com/divbzero/aioserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divbzero%2Faioserver/sbom","scorecard":{"id":345185,"data":{"date":"2025-08-11","repo":{"name":"github.com/divbzero/aioserver","commit":"4d79e265335f58536a886d5f347c0098a59f6f1a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2013-22 / GHSA-27x4-j476-jp5f","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T06:53:17.546Z","repository_id":57409129,"created_at":"2025-08-18T06:53:17.547Z","updated_at":"2025-08-18T06:53:17.547Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27724158,"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-12-14T02:00:11.348Z","response_time":56,"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":["aiohttp","async","asyncio","cors","forhumans","framework","http","server","simple","web"],"created_at":"2025-12-14T09:04:22.967Z","updated_at":"2025-12-14T09:04:23.646Z","avatar_url":"https://github.com/divbzero.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Installation\n---\n\n```\npip install aioserver\n```\n\n## Getting Started\n\nStart a test server with the examples in the **Usage** section below:\n\n```\nmake test\n```\n\nMake requests against the running test server:\n\n ```\ncurl -v localhost:8080\ncurl -v localhost:8080/found\ncurl -v localhost:8080/not-found\ncurl -v localhost:8080/server-error\n ```\n\nUsage\n---\n\n#### Create Application\n\n```python\nfrom aioserver import Application\n\napp = Application()\n```\n\n#### Basic Routes\n\n```python\n@app.get('/')\nasync def index(request):\n    return {'message': 'Hello, world!'}\n\n@app.get('/found')\nasync def found(request):\n    return 302, {'Location': 'https://www.example.com/'}, {'message': 'Found'}\n\n@app.get('/not-found')\nasync def not_found(request):\n    return 404, {'message': 'Not Found'}\n\n@app.get('/server-error')\nasync def server_error(request):\n    return 500\n```\n\n#### CORS Headers\n\n```python\n@app.cors('*')\n@app.get('/cross-origin-resource-sharing')\nasync def cross_origin_resource_sharing(request):\n    return {'message': 'Greetings from a different origin!'}\n\n@app.cors('*', ['X-Custom-Header'])\n@app.get('/cross-origin-header-sharing')\nasync def cross_origin_header_sharing(request):\n    return 200, {'X-Custom-Header': 'share-this-header-too'}, {'message': 'Hello!'}\n```\n\n### Session Cookie\n\n```python\nfrom aioserver.middleware import hours\n\n@app.get('/session-cookie')\n@app.session(max_age=24 * hours)\nasync def session_cookie(request):\n    print(f'session uuid {request.session}')\n    return 200, {'message': 'Session UUID set as cookie for 24 hours.'}\n```\n\n#### Custom Middleware\n\nRoute-specific middleware:\n\n```python\n@app.middleware\nasync def always_ok(request, handler):\n    response = await handler(request)\n    response.set_status(200, 'OK')\n    return response\n\n@always_ok\n@app.get('/not-found-but-still-ok')\nasync def not_found_but_still_ok(request):\n    return 404, {'message': 'Not found but still OK!'}\n```\n\nGlobal middleware:\n\n```python\nasync def strict_transport_security(request, handler):\n    response = await handler(request)\n    response.headers['Strict-Transport-Security'] = 'max-age=31536000'\n    return response\n\napp.use(strict_transport_security)\n```\n\n#### Run Application\n\n```python\napp.run(host='127.0.0.1', port=8080)\n```\n\nChangelog\n---\n\n### v0.2.0\n\n- Decorator-based request handlers\n\n### v0.4.0\n\n- Allow handler to specify HTTP response status\n- Allow handler to specify additional HTTP headers\n\n### v0.5.0\n\n- Serialize XML ElementTree as text/xml response\n\n### v0.6.0\n\n- Decorator-based CORS\n\n### v0.6.2\n\n- Fix project description\n\n### v0.7.0\n\n- Route-specific middleware using decorators\n- Global middleware using `app.use(...)`\n- Refactor CORS headers as middleware\n- Add session cookie as middleware\n\n### v0.7.1\n\n- Package as a module instead of as a single file\n\n### v0.7.2\n\n- Update existing routes when adding new middleware\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivbzero%2Faioserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivbzero%2Faioserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivbzero%2Faioserver/lists"}