Skip to main content

Bracket

Bracket is an Elegant static site generator. It encapsulates Jinja2. Its biggest highlight is to render the static pages in the form of view function, and support real-time debugging. It can also support CSS framework, international routing and more functions through ecological extension.

The project is being updated continuously, and the official version has not been completed yet

Installing

Install and update using pip:

$ pip install bracket

A Simple Example

from bracket import WebSite
from jinja2 import Template

app = WebSite(__name__)

@app.pages("/")
def helloworld(context):
    return context({
    "title":"Welcome to Bracket",
    "content":Template('''
        <h1>{{ messages }}</h1>
        <img src="{{ bracket.res('/logo.png')}}">
    '''),
    "resources":{
        "messages":"Welcome to Bracket"
    }
})

app.dispatch("/")
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="Bracket & Jinja2 ">
    
    <title>Welcome to Bracket</title>
</head>
<body>
    <div id="bracketapp">
    
        <h1>Welcome to Bracket</h1>
        <img src="/static/logo.png">
        
    </div>
</body>
</html>

Contributing

How to contribute to this project, report problems, and build a development environment, please refer to the contribution guide

License

The project is open source under MIT license in GitHub Community. No one is allowed to infringe the copyright. Please follow LICENSE

Metadata

Release files for bracket 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bracket 0.1.3
File Size Uploaded Provenance Actions
bracket-0.1.3.tar.gz 7.0 kB Without provenance Details for bracket-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bracket 0.1.3
File Interpreter ABI Platform Actions
bracket-0.1.3-py3.8.egg Legacy Egg format - - Details for bracket-0.1.3-py3.8.egg

Total release size: 24.9 kB

Release files / bracket-0.1.3.tar.gz

Download URL bracket-0.1.3.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
933b8b6d85505b0c01d5371ca1f1f1813811a3b97748c8e213181e03ffd54104
BLAKE2b-256 checksum
How to use checksums
99b5b8ea4f3479478e45ae08740ebda13ee31f8624ef7f8a0532e12da9b35caa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

Release files / bracket-0.1.3-py3.8.egg

Download URL bracket-0.1.3-py3.8.egg
Size 17.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
3d537351720b60675be174b74c0c6158d6c6b74e868c5ee92fd99a50d6fbe67b
BLAKE2b-256 checksum
How to use checksums
1734b6e31e13581da6bfd87f0b8a9492704a6b418044e1d882a7a74d026cab35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

Security for bracket 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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