Skip to main content

Pure Python website engine. Zero dependencies. Real JSX templates.

Project description

Boask

Pure Python website engine.
Zero external dependencies.
Real JSX-style templates without React.

pip install boask

Quick Start

from boask import route, use, run_server, html_templates

@route("/")
def home(handler):
    return html_templates.render("home.html", title="Boask")

if __name__ == "__main__":
    run_server()

Comparison to Flask

  1. Lightweight.
  2. No external dependecies.
  3. Unlike flask, it uses built in python libaries only! It uses built-in libs, and some python file libs that are using only built in functions!
  4. No "{{ url_for('static', filename='css/main.css') }}" (example), we use /static/css/main.css for example!

Info

  1. Do not install a earlier version than 1.0.4, you can 1.0.0 but that one is not supported! You can't import them! Also, do not install 1.1.4! It had a bug in strict slashes and it did 500 always! I don't know how the 1.1.4 issue happened! Do not install 1.1.5a2 also! It has import error instead of import .error
Changelog

What is new in 1.1.5? We got: Middleware with: Logging (example: from boask.middleware.logging import logging_middleware use(logging_middleware)) CORS (Enable with

from boask.middleware.cors import cors
use(cors())

) Rate Limiting (Enable with

from boask.middleware.rate_limit import rate_limit
use(rate_limit(60, 60))

)

Auth (aka. Authetication enable with

from boask.middleware.auth import auth_middleware
use(auth_middleware(token="YOUR-TOKEN-HERE-KEEP-IT-SECRET-AND-DO-NOT-REPEAT-PASSOWRDS"))

) Basic auth (aka. Basic authetication, enable with

use(basic_auth("admin", "1234"))

) Also... : Usage (per-route auth 🔐)

from boask.middleware.auth import auth_middleware
from boask.core import protect

protect(
    "/admin",
    methods=["GET"],
    middleware=auth_middleware("YOUR-TOKEN-HERE-KEEP-IT-SECRET-AND-DO-NOT-REPEAT-PASSOWRDS")
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

boask-1.1.5.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

boask-1.1.5-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file boask-1.1.5.tar.gz.

File metadata

  • Download URL: boask-1.1.5.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for boask-1.1.5.tar.gz
Algorithm Hash digest
SHA256 521c150099a602f8b4519c350462fbb7b297a55d9c7813e324f1d7b4a72d2775
MD5 8f784098938aeae4aca8ff025dcd1698
BLAKE2b-256 c191aa0d33ea02cc97aa07e846719b4e360c8ac0adc1e4d8ba34a61fdf057beb

See more details on using hashes here.

File details

Details for the file boask-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: boask-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for boask-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2b429a9d61117ff4267cab079c9e992ee228d4898081a04899099c2abb2a2a14
MD5 d7bcca2df708c8a3fe87440d480074f9
BLAKE2b-256 107078bc56e718a543db816abbb3e95f2381c6a7bf824d76b5d81be92f98fa37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page