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
Metadata
Release files for backkr 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| backkr-0.0.4.tar.gz | 8.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| backkr-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / backkr-0.0.4.tar.gz
| Download URL | backkr-0.0.4.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ef3e3b53b3e878ee47c26959a2168c8691ef9214d364975f5719fcf0d3ec85c
|
|
BLAKE2b-256 checksum How to use checksums |
6176cf3633ab41d635cfe179ce534733f8a15fd390b16a264c5053e4740d6c6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / backkr-0.0.4-py3-none-any.whl
| Download URL | backkr-0.0.4-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7776873aeb2e76632666b8e49d602dec0b498f6b84e1eada3d1aeb47b673664
|
|
BLAKE2b-256 checksum How to use checksums |
2108c98d1ebcddea80f2c61d74f16339100c84e9a2d4172d37023730e1a58eda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|