{"id":16651164,"url":"https://github.com/cbefus/eynnyd","last_synced_at":"2025-04-05T02:13:04.789Z","repository":{"id":139621825,"uuid":"200322965","full_name":"cbefus/Eynnyd","owner":"cbefus","description":"A minimally invasive light-weight WSGI Python 3 Web Framework ","archived":false,"fork":false,"pushed_at":"2022-06-28T14:38:29.000Z","size":284,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T10:19:25.255Z","etag":null,"topics":["clean-code","lightweight","python","python3","wsgi","wsgi-framework"],"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/cbefus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-08-03T02:39:19.000Z","updated_at":"2023-12-03T21:49:58.000Z","dependencies_parsed_at":"2023-04-23T22:30:47.423Z","dependency_job_id":null,"html_url":"https://github.com/cbefus/Eynnyd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbefus%2FEynnyd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbefus%2FEynnyd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbefus%2FEynnyd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbefus%2FEynnyd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbefus","download_url":"https://codeload.github.com/cbefus/Eynnyd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276189,"owners_count":20912288,"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":["clean-code","lightweight","python","python3","wsgi","wsgi-framework"],"created_at":"2024-10-12T09:23:58.612Z","updated_at":"2025-04-05T02:13:04.773Z","avatar_url":"https://github.com/cbefus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://img.shields.io/pypi/v/eynnyd.svg)](https://pypi.org/project/eynnyd/)\n[![Build Status](https://travis-ci.com/cbefus/eynnyd.svg?branch=master)](https://travis-ci.com/cbefus/eynnyd)\n[![Coverage Status](https://coveralls.io/repos/github/cbefus/Eynnyd/badge.svg?branch=master)](https://coveralls.io/github/cbefus/Eynnyd?branch=master)\n[![PyPI - License](https://img.shields.io/pypi/l/eynnyd)](https://pypi.org/project/eynnyd/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/eynnyd.svg)](https://pypi.org/project/eynnyd/)\n[![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.png?v=103)](https://github.com/open-source)\n[![Documentation Status](https://readthedocs.org/projects/eynnyd/badge/?version=latest)](https://eynnyd.readthedocs.io/en/latest/?badge=latest)\n\n\u003cdiv align=\"center\" style=\"margin-top: -32px!important;margin-bottom: -70px!important;\"\u003e\n    \u003cimg\n        src=\"https://raw.githubusercontent.com/cbefus/eynnyd/master/logo/banner.png\"\n        alt=\"Eynnyd web framework logo\"\n        style=\"width:100%\"\n    \u003e\n\u003c/div\u003e\n\n# Eynnyd Web Framework\nEynnyd (pronounced [Ey-nahyd]) is an acronym for **Everything You Need, Nothing\nYou Don't**. It is a light-weight WSGI compliant python 3 web framework.\nEynnyd was designed with the primary goal to not impose bad engineering decisions\non it's users. It is also designed to not overstep or assume the wants of it's user.\n\n#### Simplicity and Freedom is the Design\nThis is the framework for you if the following sound good:\n* You are permitted but not coerced into following REST.\n* A `request handler` takes a `request` and returns a `response`.\n* A `request interceptor` takes a `request` and returns a `request`.\n* A `response interceptor` takes a `request` and a `response` and returns a `response`.\n* You can have any number of `request interceptors`, `request handlers`, or `response interceptors`.\n* You can name your handler methods anything you want.\n* You can limit the scope (paths it applies to) of any interceptor.\n* We do not provide extraneous dependencies or opinions (like database connection libraries or templating engines)\n* There is no _Eynnyd way_ to do things.\n* There is nothing _clever_ or _magic_. (like global singletons or special decorators)\n* You can see your entire routing layout, succinctly, in your main.\n\nIf this at all sounds good we recommend you keep reading and see what else Eynnyd\ncan provide for you.\n\n## Documents\nRead the documents at [eynnyd.readthedocs.io](https://eynnyd.readthedocs.io/en/latest)\n\n## How to install it\nEynnyd is published to pypi and can be installed using:\n```bash\npip install eynnyd\n```\n\n## How to use it\nEynnyd does not come with a built in WSGI HTTP server. We recommend\n[gunicorn](https://gunicorn.org/) for running your application.\n\nA simple hello world example looks like:\n```python\n# hello_world_app.py\nfrom eynnyd import RoutesBuilder\nfrom eynnyd import EynnydWebappBuilder\nfrom eynnyd import ResponseBuilder\nfrom http import HTTPStatus\n\ndef hello_world(request):\n    return ResponseBuilder()\\\n        .set_status(HTTPStatus.OK)\\\n        .set_utf8_body(\"Hello World\")\\\n        .build()\n\n\ndef build_application():\n    routes = \\\n        RoutesBuilder()\\\n            .add_handler(\"GET\", \"/hello\", hello_world)\\\n            .build()\n\n    return EynnydWebappBuilder()\\\n            .set_routes(routes)\\\n            .build()\n\napplication = build_application()\n```\nUsing gunicorn this can now be run `gunicorn hello_world_app`.\n\n### An example with interceptors\n\n```python\n# hello_world_app.py\nimport logging\n\nfrom eynnyd import RoutesBuilder\nfrom eynnyd import EynnydWebappBuilder\nfrom eynnyd import ResponseBuilder\nfrom http import HTTPStatus\n\nLOG = logging.getLogger(\"hello_world_app\")\n\ndef hello_world(request):\n    return ResponseBuilder()\\\n        .set_status(HTTPStatus.OK)\\\n        .set_utf8_body(\"Hello World\")\\\n        .build()\n\ndef log_request(request):\n    LOG.info(\"Got Request: {r}\".format(r=request))\n    return request\n\ndef log_response(request, response):\n    LOG.info(\"Built Response: {s} for Request: {r}\".format(s=response, r=request))\n    return response\n\ndef build_application():\n    routes = \\\n        RoutesBuilder()\\\n            .add_request_interceptor(\"/hello\", log_request)\\\n            .add_handler(\"GET\", \"/hello\", hello_world)\\\n            .add_response_interceptor(\"/hello\", log_response)\\\n            .build()\n\n    return EynnydWebappBuilder()\\\n            .set_routes(routes)\\\n            .build()\n\napplication = build_application()\n```\n\n# For Developers / Contributors\n\n## Installing requirements\nrun:\n```bash\npip install -r test_requirements.txt\n```\n\n## Running the tests\nAfter installing the requirements run:\n```bash\npython -m unittest discover tests\n```\n\n## Checking coverage\nAfter installing the requirements run:\n```bash\ncoverage run --source eynnyd/ -m unittest discover tests/\ncoverage report\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbefus%2Feynnyd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbefus%2Feynnyd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbefus%2Feynnyd/lists"}