Backkr - A backend framework the web
Created by @Almas-Ali
Table of Contents
Introduction
Try out the examples/ folder to see how to use the framework.
Installation
pip install backkr
Usage
from datetime import datetime
from backkr import (
Backkr,
HTMLResponse
)
app = Backkr()
@app.get('/')
async def index(request):
return HTMLResponse(
'<h1>Hello World, Time: {{ time }}</h1>',
time=datetime.now().strftime("%H:%M:%S")
)
@app.get('/{path}')
async def error_404(request):
path = request.match_info.get('path')
return HTMLResponse(f'''\
<center>
<h1>404 Not Found</h1>
<p>Page /{path} not found</p>
</center>
''')
if __name__ == "__main__":
app.run(
debug=True,
host='127.0.0.1',
port=8000
)
Documentation
LICENSE
Licensed under the MIT LICENSE
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
backkr-0.0.4.tar.gz
(8.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file backkr-0.0.4.tar.gz.
File metadata
- Download URL: backkr-0.0.4.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ef3e3b53b3e878ee47c26959a2168c8691ef9214d364975f5719fcf0d3ec85c
|
|
| MD5 |
19d9687a29b088865a5668c4ad64801b
|
|
| BLAKE2b-256 |
6176cf3633ab41d635cfe179ce534733f8a15fd390b16a264c5053e4740d6c6d
|
File details
Details for the file backkr-0.0.4-py3-none-any.whl.
File metadata
- Download URL: backkr-0.0.4-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7776873aeb2e76632666b8e49d602dec0b498f6b84e1eada3d1aeb47b673664
|
|
| MD5 |
c224265d767f4a10830f236b5c7572ca
|
|
| BLAKE2b-256 |
2108c98d1ebcddea80f2c61d74f16339100c84e9a2d4172d37023730e1a58eda
|