Python templating library with templates included.
Project description
Python Templates is an Apache2 licensed html templating library, written in pure-Python, including popular HTML templates like Bootstrap.
TODO
Python Templates is a work-in-progress.
Improve semantic components?
What should be a function vs class? Currently, it’s mostly just inheritance with methods. That feels basic to me. At the other extreme is an element-tree api with visitor pattern. I think the significance of this project is finding the balance between those too.
This project seems to go against “flat is better than nested”. But I like the idea of using regular Python for template features like: if-statements, for-loops, and inheritance.
Add more front-end frameworks.
Reference: https://github.com/troxler/awesome-css-frameworks
Normalize.css
Pure.css
Milligram.css
Bootstrap, add more examples.
Semantic UI
Foundation
Bulma
UIkit
Materialize
Demo project ideas:
Link shortener
E-commerce page
Blog
Include images, fonts, icons?
Testimonials
Does your company or website use Python Templates? Send us a message and let us know.
Features
Pure-Python
Popular HTML templates included!
Quickstart
Installing Python Templates is simple with pip:
$ pip install templates
You can access documentation in the interpreter with Python’s built-in help function. The help works on modules, classes and methods in Python Templates.
>>> import templates
>>> help(templates)
>>> from templates import bootstrap
>>> help(bootstrap)
>>> help(bootstrap.Starter)
>>> help(bootstrap.Jumbotron)
There’s also a demo which you can run using bottle:
$ pip install bottle $ python -m templates.demo
Useful Links
Python Templates License
Copyright 2018 Grant Jenks
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file templates-0.0.4.tar.gz
.
File metadata
- Download URL: templates-0.0.4.tar.gz
- Upload date:
- Size: 70.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 130ad71ba2b8c83327a0681a66398e97c1445a089aa5a8fe890cfe346ecbf6d2 |
|
MD5 | 1c6fb491b036232bc914353e2852c82f |
|
BLAKE2b-256 | 5d826cfc542ecc47d8f2cf4c6273f9650c454ce074d69feba98ef5499f0acadd |
File details
Details for the file templates-0.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: templates-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 69.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5d4e6e14222be9f364544c542b788170d8923d0ec5eaf6f18f33f3b145fa9c4 |
|
MD5 | 99d4c605833a0c60c5c403bbfa73840a |
|
BLAKE2b-256 | cdc668576dcd62d2a25472aa2ac58f408cda8d9ec47044199274962ea2c08d49 |