CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-flask

A simple framework for building complex web applications.

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

blueprints.mddocs/

Blueprints

Blueprints allow you to organize your Flask application into modular components. They provide a way to group related views, templates, and static files.

Capabilities

Blueprint Class

class Blueprint:
    def __init__(
        self,
        name: str,
        import_name: str,
        static_folder: str | None = None,
        static_url_path: str | None = None,
        template_folder: str | None = None,
        url_prefix: str | None = None,
        subdomain: str | None = None,
        url_defaults: dict | None = None,
        root_path: str | None = None,
        cli_group: str | None = None,
    ): ...
    
    def route(self, rule: str, **options) -> Callable: ...
    def before_request(self, f: Callable) -> Callable: ...
    def after_request(self, f: Callable) -> Callable: ...

Usage Examples

Basic Blueprint

from flask import Blueprint, render_template

# Create blueprint
auth_bp = Blueprint('auth', __name__, url_prefix='/auth')

@auth_bp.route('/login')
def login():
    return render_template('auth/login.html')

@auth_bp.route('/logout')
def logout():
    return 'Logged out'

# Register with app
app.register_blueprint(auth_bp)

Install with Tessl CLI

npx tessl i tessl/pypi-flask

docs

blueprints.md

cli.md

configuration.md

context-globals.md

core-application.md

helpers.md

index.md

json-support.md

request-response.md

routing.md

sessions.md

signals.md

templates.md

testing.md

tile.json