Skip to main content

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

Website

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)

Source distribution for backkr 0.0.4
File Size Uploaded
backkr-0.0.4.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for backkr 0.0.4
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

3 release files

0.0.2

3 release files

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page