Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/almas-ali/backkr
A backend framework the web
https://github.com/almas-ali/backkr
backend framework web
Last synced: 2 months ago
JSON representation
A backend framework the web
- Host: GitHub
- URL: https://github.com/almas-ali/backkr
- Owner: Almas-Ali
- License: mit
- Created: 2023-02-28T14:03:49.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T20:48:24.000Z (7 months ago)
- Last Synced: 2024-11-09T14:07:42.766Z (2 months ago)
- Topics: backend, framework, web
- Language: Python
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backkr - A backend framework the web
Created by [**@Almas-Ali**](https://github.com/Almas-Ali)
## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [License](#license)## Introduction
Try out the [**examples/**](https://github.com/Almas-Ali/backkr/tree/master/examples/) folder to see how to use the framework.
## Installation
```bash
pip install backkr
```## Usage
```python
from datetime import datetimefrom backkr import (
Backkr,
HTMLResponse
)app = Backkr()
@app.get('/')
async def index(request):
return HTMLResponse(
'Hello World, Time: {{ time }}
',
time=datetime.now().strftime("%H:%M:%S")
)@app.get('/{path}')
async def error_404(request):
path = request.match_info.get('path')
return HTMLResponse(f'''\
404 Not Found
Page /{path} not found
''')
if __name__ == "__main__":
app.run(
debug=True,
host='127.0.0.1',
port=8000
)```
## Documentation
[Website](https://almas-ali.github.io/backkr/)
## LICENSE
Licensed under the [**MIT LICENSE**](https://github.com/Almas-Ali/backkr/tree/master/LICENSE)