Skip to main content

Python UI for Web Apps

Project description

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!

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

pyvibe-0.0.1.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

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

pyvibe-0.0.1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file pyvibe-0.0.1.tar.gz.

File metadata

  • Download URL: pyvibe-0.0.1.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pyvibe-0.0.1.tar.gz
Algorithm Hash digest
SHA256 de672eaa37faace47196779996957ab7c09fc0260c379eda6ec2a944c07a114c
MD5 427c47471c293bd054ffd193b8d871de
BLAKE2b-256 e8d488a4b500d2064cb6c0be87cf9c491853c73be78467c86e159d11fe8ebeb2

See more details on using hashes here.

File details

Details for the file pyvibe-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyvibe-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pyvibe-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6659954d61b6b5aa227859d6230d095645ee499c0618323f389d7f0d1eb8c751
MD5 b5febeba679af154880e92802298ace5
BLAKE2b-256 e53f91b9d807474c26fb63ed45a10fed7ec4de1456c0623f6c7a40e1c5ba2e55

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