Skip to main content

HTML but with curly brackets

Project description

BTML

PyPI - Version PyPI - Python Version

HTML but with curly brackets


Ever felt like plain HTML is lacking some curly brackets? Worry no more, BTML fixes that for you!

Plain HTML (bad):

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My First Web Page</title>
</head>
<body style="background-color: #dddddd">
  <!--  This is a comment  -->
  <h1>Welcome to My Web Page</h1>
  <p>This is a simple BTML example with a button below.</p>
  <button onclick="alert('Hello, world!')">Click Me</button>
</body>
</html>

BTML (much better):

!html!
html[lang="en"] {
  head {
    meta[charset="UTF-8"].
    title "My First Web Page"
  }
  body[style="background-color: #dddddd"] {
    <# This is a comment #>
    h1 "Welcome to My Web Page"
    p "This is a simple BTML example with a button below."
    button[onclick="alert('Hello, world!')"] "Click Me"
  }
}

Installation

BTML can be installed from PyPI using pip:

pip install btml

or using uv's tools feature:

uv tool install btml

Usage

After installing, run:

btml

or if that doesn't work:

pythom -m btml

If installed using uv:

uv tool run btml

License

btml is distributed under the terms of the MIT license.

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

btml-0.1.1.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

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

btml-0.1.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file btml-0.1.1.tar.gz.

File metadata

  • Download URL: btml-0.1.1.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for btml-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a5e051a39893e75146a9ae01c83bad7f47f77a3cabbbb49a246b544969b9a284
MD5 649fdefc0ee7bba3fc0c3661a5803d4c
BLAKE2b-256 4007e70463eaab8ddcf2646489758c52b23c048de1a882a26321224ab2eeda31

See more details on using hashes here.

File details

Details for the file btml-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: btml-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for btml-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95f7ff2e4ba3b212264f369427d83b10903ddd9694aef6c9f89d3517053a989f
MD5 2eae73d2b19466ca1d024b6647210e01
BLAKE2b-256 e3ede9398230a4ba81b841c3f5ab4b947becf98799a56310cf459f4722073949

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