Skip to main content

Generate HTML with Python functions.

Project description

DashML - Functional HTML Generation

Create functions to build HTML in Python- inspired by the "component movement" in Javascript.

>>> from dashtml import _, render
>>>
>>> render(_.p("Hello, world!"))
'<p>Hello, world!</p>'

Why DashML?

Javascript frameworks like React or Vue took over the frontend landscape because of the ease of creating reusable components. React especially thrives with the fact that components are code, and can be manipulated as such.

Meanwhile, server-side languages are stuck with difficult to compose template languages to generate HTML. It's hard to extract components out of Jinja2 or Django templates to re-use.

DashML expands on existing Python libraries to create an ergonomic way to generate HTML in Python.

  • Built on lxml (built on C) for extreme speed- check out the benchmarks (or run them yourself!).
  • markupsafe to prevent injection attacks (like React does!)
  • A minimal API you can pick up in ~15 minutes.

Get Started

Special Thanks

License

MIT

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

dashml-0.0.1.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

dashml-0.0.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page