Skip to main content

PageBuilder

PageBuilder is a Python library that offers a simple and intuitive way to create UI components for web apps without the need to write HTML code.

Key Features

  • Provides semantic Python components that compile into HTML, making it easy to use with any web framework.
  • Comes with a range of semantic Python components, including headers, text, forms, buttons, and links.
  • Is designed to work well with Python autocomplete, enabling quick and easy exploration of the available components and their arguments.
  • Offers an alternative to hand-coding Flask templates, streamlining UI development for web apps.
  • The default style uses TailwindCSS, a popular CSS framework known for its utility-first approach.
  • Allows you to insert any HTML into the page by using the Page.add_html() method, providing you with the flexibility to add custom components or use third-party libraries as needed.
  • Offers an easy-to-use theming system, allowing you to choose from a variety of pre-built themes, including the default theme based on TailwindCSS.
  • Allows for additional themes to be added using different CSS frameworks by accepting pull requests from contributors.

Why PageBuilder?

PageBuilder is a great fit for developers who want to:

  • Create UI components for web apps using Python code without the need to write HTML.
  • Use a Python library that works seamlessly with any web framework.
  • Build UIs using a range of semantic Python components with explicit arguments.
  • Use a utility-first CSS framework, such as TailwindCSS, to style their UI components without the need for custom CSS code.
  • Insert any HTML into the page when a pre-built component doesn't fit their needs.
  • Customize the style of their UI components by choosing from a variety of pre-built themes or by contributing new themes that use different CSS frameworks.
  • Getting Started
  • To get started with PageBuilder, simply install the library using pip:
pip install pagebuilder

Once installed, you can begin creating UI components by creating a new Page object and adding components to it using the add_* methods. You can then return the page as HTML by calling page.to_html().

For example, to create a new page with a header and a paragraph of text, you could use the following code:

import pagebuilder as pb

page = pb.Page()
page.add_header("Welcome to PageBuilder!")
page.add_text("PageBuilder is a Python library for creating UI components for web apps without the need to write HTML code.")
print(page.to_html())

This will output the following HTML:

<div id="page-container" class="container px-5 my-5 mx-auto">
    <p class="mb-4 font-extrabold leading-none tracking-tight text-gray-900 dark:text-white  text-xl sm:text-5xl ">Welcome to PageBuilder!</p>
<p class="mb-6 text-lg font-normal text-gray-500 lg:text-xl dark:text-gray-400">PageBuilder is a Python library for creating UI components for web apps without the need to write HTML code.</p> 
</div>

Contributions

PageBuilder is an open-source library, and contributions are welcome! If you have an idea for a new feature or theme, or if you find a bug and want to submit a fix, feel free to open a pull request.

Thanks for considering PageBuilder!

Metadata

Release files for pagebuilder 0.0.2

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

Source distribution (sdist)

Source distribution for pagebuilder 0.0.2
File Size Uploaded Provenance
pagebuilder-0.0.2.tar.gz 21.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pagebuilder 0.0.2
File Interpreter ABI Platform
pagebuilder-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 41.4 kB

Release files / pagebuilder-0.0.2.tar.gz

Download URL pagebuilder-0.0.2.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
75be787d2e41f9b1365f57df4c427b8a05eeaf05b05c96b3e7f59f05d69f5362
BLAKE2b-256 checksum
How to use checksums
2fcdb92afa46ed3fbf42ed84c41a83c6bde4b4ba51dd9cc704641fbccee6a25e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / pagebuilder-0.0.2-py3-none-any.whl

Download URL pagebuilder-0.0.2-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f99cf4cbd294f0cb69545a87ae411bab1cfaf04015fa65040e697b08b5aad69d
BLAKE2b-256 checksum
How to use checksums
3873b095e7fd925239e6b78665bd63067230ace97c481a4f50c4b56c83b236f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for pagebuilder 0.0.2

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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

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