Skip to main content
Flint
=====

Dynamic Markdown


What?
-----

Flint is a python engine for generating dynamic webpages from [Markdown](http://daringfireball.net/projects/markdown/) templates.

Installation
------------

`pip install flint-md`

How?
----

I think the best way to demonstrate the syntax is with an example, so here goes:

### Python snippet: ###
```python
from flint import Flint

my_flint = Flint("example.md")
flint_dict = {"name": "Foobar",
"result": 1+1,
"key_for_iterable": [1, 2, 3, 4, 5]}
my_flint.render()
my_flint.getHTML()
# This will return the rendered HTML, with all the values substituted
# Alternatively, you can export the HTML to a file by using
# my_flint.exportHTML("path/to/export")
```

### template.md ###
```
This is {name}'s header
=======================

Insert {key} anywhere in the template, and Flint will replace it with the value for that key. If the key does not appear in Flint's dictionary, it will be ignored.

1 + 1 = {result}


Additionally, if you have a key with an iterable value, you can create a list:

|key_for_iterable|[[This is item {*}]]

The value will be inserted at the {*}
```


This will produce the following HTML:
```
<h1>This is Foobar's header</h1>
<p>Insert {key} anywhere in the template, and Flint will replace it with the value for that key. If the key does not appear in Flint's dictionary, it will be ignored.</p>
<p>1 + 1 = 2</p>
<p>Additionally, if you have a key with an iterable value, you can create a list:</p>
<ul>
<li>This is item 1</li>
<li>This is item 2</li>
<li>This is item 3</li>
<li>This is item 4</li>
<li>This is item 5</li>
</ul>
<p>The value will be inserted at the {*}</p>
```

For more examples, see the examples folder.

More information on [my blog](http://www.cdawson.net/flint)

Metadata

Release files for flint-md 1.1.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 flint-md 1.1.1
File Size Uploaded Provenance Actions
flint-md-1.1.1.tar.gz 3.3 kB Without provenance Details for flint-md-1.1.1.tar.gz

Release files / flint-md-1.1.1.tar.gz

Download URL flint-md-1.1.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
03d91179e3e9fe1aa9721d6e97745e90f7acc28c4c2dbcd4152b3eb8ddd5ebd7
BLAKE2b-256 checksum
How to use checksums
a8e6c7a9338d6794cba77fbf3ffa8809adfe137204f51eb53ae60b5cc77f55d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for flint-md 1.1.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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