Skip to main content

nouns: Data-deterministic, structure-driven (very experimental) templating

nouns does templating a bit differently - the templating itself is quite primitive, with most of the gruntwork taking place in the preprocessing layer.

This layer converts all the templating data into a very general form that ensures the data is renderable by the templates no matter the structure of the data.

Hello world

Do traditional template-and-data templating as follows:

>>> from nouns import template
>>> template(dict(name='World'), 'Hello $name!')
Hello World!

But the more interesting/intended use is to not explicitly pass in a template. Instead, just pass in the data - let the templating engine itself figure out which templates to use.

The in-built templates are designed to give you something close to what you probably want.

Pass in a table of data, you'll get a table back. Pass in a dictionary/mapping, you'll get the key/value pairs templated in a table. Pass in a list, you'll get each list item templated out.

Experimental status

This templating system is an experiment in how to craft the most data-driven templating system, where the output is dependent on the things ("nouns") you pass in.

We will initially use if for rendering data in notebooks, but it's definitely not production-ready for web applications or otherwise rendering untrusted data, without a lot of extra customization and filters set up.

Hopefully it will continue to evolve toward production-ready status.

Metadata

Release files for nouns 0.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 nouns 0.1.1
File Size Uploaded Provenance Actions
nouns-0.1.1.tar.gz 8.7 kB Without provenance Details for nouns-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 19.6 kB

Release files / nouns-0.1.1.tar.gz

Download URL nouns-0.1.1.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
055f5ca0ced5984f07f91fc265dc62fae3fda9dc4c640a7f6110dfdb99542a51
BLAKE2b-256 checksum
How to use checksums
207ad3449d1ebbc6bb8e307f9f89772bacf5167d36374a6708d8136b951dd77e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.8.1 Darwin/18.7.0

Release files / nouns-0.1.1-py3-none-any.whl

Download URL nouns-0.1.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b6426b5f7a590fc6971d1664f623916cf448102e250ccfc25dbd85fe90b7295
BLAKE2b-256 checksum
How to use checksums
d8af5991744837306e8553dba375d49b8059d11f14ff31eb7f80c97d80f6c908
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.8.1 Darwin/18.7.0

Security for nouns 0.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.

Release history Release notifications | RSS feed

This release

0.1.1 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