{"id":27943524,"url":"https://github.com/zadigo/zah","last_synced_at":"2026-04-27T11:31:46.290Z","repository":{"id":112577940,"uuid":"192624508","full_name":"Zadigo/zah","owner":"Zadigo","description":"A simple web framework that works hand in hand with Vue JS","archived":false,"fork":false,"pushed_at":"2023-12-04T07:26:03.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-07T12:12:15.816Z","etag":null,"topics":["framework","python3","vue","vuejs","vuejs2","vuejs3","webframework","website"],"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/Zadigo.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,"zenodo":null}},"created_at":"2019-06-18T23:17:56.000Z","updated_at":"2021-12-28T21:16:50.000Z","dependencies_parsed_at":"2025-05-07T12:12:16.837Z","dependency_job_id":"754805ca-d771-4711-95b9-93b77d71e8fa","html_url":"https://github.com/Zadigo/zah","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Zadigo/zah","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zadigo%2Fzah","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zadigo%2Fzah/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zadigo%2Fzah/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zadigo%2Fzah/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zadigo","download_url":"https://codeload.github.com/Zadigo/zah/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zadigo%2Fzah/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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":["framework","python3","vue","vuejs","vuejs2","vuejs3","webframework","website"],"created_at":"2025-05-07T12:12:14.607Z","updated_at":"2026-04-27T11:31:46.278Z","avatar_url":"https://github.com/Zadigo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zah\n\nA lightweight web framework that works and hand in hand with VueJS.\n\nZah serves as a backend for your VueJS application.\n\n## Getting started\n\nCreating a Zah website is as simple as the following:\n\n```python\nfrom zah.server import BaseServer\n\nserver = BaseServer()\nserver.create()\n```\n\nThe `create` method will create a new instance of the BaseServer class and pass it through Werkzeug.\n\n## Starting a project\n\n### Using applications\n\nZah comes with a set of none integrated default apps that can be used for various purposes. To use these applications, you have to actively tell Zah integrate them via the `AppOptions` class.\n\nOnce these apps are intergrated, they become automatically accessible within your templates and throughout your application.\n\n```python\nclass Component:\n    pass\n\nserver.use_component(Component)\n```\n\n### Routing\n\nWhile the main purpose of Zah is to serve as a backbone for your Vue application, you can still create routes to classic Jinja2 based HTML files if you wish to. There are three techniques.\n\nZah was created as way to only include what you need and for that matter, since VueJS apps are SPA's and do not require backend routing, there is no router by default.\n\nTo implement backend routing just like you would do for any other application do:\n\n```python\nfrom zah.router.app import Router\n\nserver.use_component(Router)\nserver.add_route('/', render_page('home.html'))\n```\n\nOr in your settings file:\n\n```python\nAPPS = [\n    'zah.router.app.Router'\n]\n```\n\n#### Simple route\n\n```python\nfrom zah.urls import render_page\n\nserver.add_route('/', render_page('home.html'))\n```\n\nThis is the most basic and simple way to render a page. This is is very ideal for rendering for example the `index.html` file of the VueJS framework.\n\n#### Decorated route\n\nIf you need more complex logic within your view, you can use the `as_route` decorator.\n\n```python\n@server.as_route('/home')\ndef home(request, **kwargs):\n    return render(request, 'home.html')\n```\n\n#### Complex views\n\nIn the same manner, if you need more complexe logic within your route, you can also create a view and then pass it to the `add_route` method of the server.\n\n```python\ndef home(request, **kwargs):\n    return render(request, 'home.html')\n\nserver.add_route('/', home, name='home')\n```\n\n#### Urls file\n\nA final and more efficient way of creating multiple routes for your project can ba done by using a `urls.py` file which will be automatically loaded on project startup. The `urls.py` file requires a `patterns` attribute or it will raise an exception.\n\n```python\nfrom zah.urls import url \nfrom zah.views import home\n\npatterns = [\n    url('/', home, name='home')\n]\n```\n\n## Decorators\n\n### HTTP\n\nYou can decorate your routes with very specific decorators that will limit, restrict or modify the response or the request.\n\n#### only_GET decorator\n\nRequires that only GET HTTP method be treated by this view.\n\n```python\nfrom zah.decorators import only_GET\n\n@only_GET\ndef home(request, **kwargs):\n    return render(request, 'home.html', context)\n```\n\nA similar approach can be used using `render_page`.\n\n```python\nserver.add_route('/about', only_GET(render_page('about.html')))\n```\n\n## Applications\n\n### Router\n\n## Database\n\n## Commands\n\n## Settings\n\n### Overview\n\n### Full list of settings\n\n#### Host\n\n#### Port\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzadigo%2Fzah","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzadigo%2Fzah","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzadigo%2Fzah/lists"}