Skip to main content

Autumn(Tag Extras) - Build HTML easily right in your backend

what is this?

This extension is made to cover Autumn's abstraction with another layer of abstraction, taking the bare AbstractTag to create and support most of HTML tags, while maintaining the same level of thread-safety and flexibility.

How to install?

This extension is made available via the autumn-tag-extras python package, in PyPI. To install this extension, run:

pip install autumn-tag-extras

Getting started

You can get started by importing the branch and initializing it, then access and inherit from varies of pre-defined tags.

from typing import Any

from Autumn import new
from AutumnTagExtras import Branch

Base = new()

with Base:
    tag = Branch()

class CustomDiv(tag.div):
    def __init__(self):
        self.dynamic = True
        super().__init__()
    
    def before_build(self, **kwargs: Any) -> str | None:
        self.tags.append(tag.p(kwargs.get("text", "Hello!")))

page = Base.page.new("page").tag(CustomDiv())

Download files

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

Source Distribution

autumn_tag_extras-1.0.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

autumn_tag_extras-1.0.0-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file autumn_tag_extras-1.0.0.tar.gz.

File metadata

  • Download URL: autumn_tag_extras-1.0.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for autumn_tag_extras-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4966aac1187d7e43e99de59075d807e2eaacfb87eb38e3b68c016ff42c3976fe
MD5 2e9a06fc547d9c1ca5dc4a935cec3d14
BLAKE2b-256 45220b1acd158ce7ee62f9173b01e28267023bb47ce90c3c80e6e31b094cac7d

See more details on using hashes here.

File details

Details for the file autumn_tag_extras-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for autumn_tag_extras-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b54d74183ef497c2fee945431158a3f83d13555d01688a7e5833841efc1e43a
MD5 75b625fe1ef7491605f120245537358a
BLAKE2b-256 e99b5b60760511106fc19c953401fa00fcb25a13f3280b653b3fd781e26420a9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 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