Skip to main content
tumulus
=======

Python HTML Generator for Recyclable Web Elements.

Tumulus is an alternative to Templating languages found in many templating engines such as Jinja2, Django, Mako, ...
Such templating engines make it difficult to separate logical elements of the page, hence discouraging reusability.

The motivation behind Tumulus is to encourage developers to build reusable web components that can then be
put together to build web pages or applications.

Example
---

```python
# Importing the basic brick of Tumulus, the tags creator:
from tumulus.tags import tags as t
# This module helps to add JS/CSS libraries in page head/footer:
import tumulus.lib as lib

def bootstrap_button(text):
'''Returns a Bootstrap formatted button, and adds the CSS of
Bootstrap to the dependencies of the page.'''
return t.div(
# Standard HTML button with 'text' inside:
t.button(text, class_='btn btn-info'),
# Injecting Bootstrap's CSS file in the HTML head.
# This can be done almost anywhere, as it will be included
# somewhere else, and there is de-duplication.
lib.css('bootstrap')
);

def page(title, text):
return t.html(
t.head(
t.title(title),
t.meta(charset='utf-8'),
),
t.body(
t.h1(title),
t.p(
text
),
bootstrap_button('Click Here'),
),
)

print(
page('Hello World', 'Hello from Tumulus').build()
)
```

Run tests
---

Tumulus uses testing intensely, and tries to keep a coverage close from 100%. Testing
is done using `pytest` and `pytest-cov`.

Run all tests:
```bash
py.test tumulus
```

Generate a coverage report:
```bash
py.test --cov tumulus && coverage html
```

Release files for Tumulus 0.2.1

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

Source distribution (sdist)

Source distribution for Tumulus 0.2.1
File Size Uploaded
Tumulus-0.2.1.tar.gz 7.1 kB Details

Release files / Tumulus-0.2.1.tar.gz

Download URL Tumulus-0.2.1.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c31a13afe41e9363df30f6c24dcf9311ca9f9c1ab47de112bd1366b141a82894
BLAKE2b-256 checksum
How to use checksums
5f7859cd9b54921f9f201d9b46d363d84b1126dfccb54c5c3fc890407284d586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2.0

1 release file

0.1.8

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

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