Python templating library with templates included.
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
- Bootstrap, add more examples.
- Semantic UI
- Demo project ideas:
- Link shortener
- E-commerce page
- Include images, fonts, icons?
- See also:
- Dominate: https://github.com/Knio/dominate
- Popular HTML templates included!
$ 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
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.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size templates-0.0.5-py2.py3-none-any.whl (73.5 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size templates-0.0.5.tar.gz (72.8 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for templates-0.0.5-py2.py3-none-any.whl