Saravanan666/pypi-org huggingface dataset:
Package: templaterSPLN
SPLN-TP2 Template Multi-fileDaniel Faria PG50306Hugo Brandão PG50418João Cerquido PG50469Projeto desenvolvido no âmbito da UC de SPLN.
Permite a criação de uma estrutura de ficheiros e pastas, a partir de um ficheiro de template, podendo ser especificado o conteúdo de cada ficheiro criado.
Também é possível realizar o processo inverso, ou seja, a partir de uma estrutura de ficheiros e pastas, criar um ficheiro de template.Utilização:utilização: Templater [-h] -i INPUT -t TYPE [-o OUTPUT] [-v [VARIABLES [VARIABLES ...]]]Programa simples que lê um ficheiro de template e cria a estrutura de pastas e ficheiros com base no template. Também
pode ser feito o inverso, pode ler uma estrutura de pastas e criar um ficheiro de template com base nela.optional arguments:
    -h, --help            mostra esta mensagem de ajuda e sai
    -i INPUT, --input INPUT
        Input file ou folder
    -t TYPE, --type TYPE  
        Tipo de operação. Pode ser template (gera template segundo uma diretoria) ou create (gera diretoria de um template file)
    -o OUTPUT, --output OUTPUT
        Output file ou folder
    -v [VARIABLES [VARIABLES ...]], --variables [VARIABLES [VARIABLES ...]]
        Variaveis a serem substituidas no templateFormato do template:O template deverá ser constituído por 3 partes:metadatatreefilesMetadataOs metadados deverão ser enumerados com o padrão nome: valor, e deverão ser escritos um em cada linha.Exemplo:=== meta
name:             
author: JJoaoTreeA árvore do projeto deverá ser escrita com as seguintes regras:Cada pasta deverá ser identificada com o seu nome seguido de uma barraCada ficheiro que pertença a uma pasta deverá ser escrita após a pasta, com um tab de identaçãoOs tabs deverão ser de 4 espaçosExemplo:=== tree
pyproject.toml
{{name}}/
    __init__.py
    {{name}}.md
exemplo/
README.md
tests/
    test-1.py
    unit/
        test-2.pyFilesOs ficheiros deverão ser escritos com o seguinte formato:O nome do ficheiro deverá ser precedido de ===O nome do ficheiro deverá conter o caminho relativo à pasta principal do projetoE o seu conteúdo deverá ser escrito nas linhas seguintes, até encontrar outro ficheiro ou o fim do ficheiro de templateExemplo:=== pyproject.toml
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "{{name}}"
authors = [ {name = "{{author}}", email = "FIXME"}]
license = {file = "LICENSE"}
dynamic = ["version", "description"]
dependencies = [ ]
readme = "{{name}}.md"

[project.scripts]
## script1 = "{{name}}:main"

=== {{name}}/{{name}}.md

# NAME

{{name}} - FIXME the fantastic module for...

=== {{name}}/__init__.py
""" FIXME: docstring """
__version__ = "0.1.0"

=== tests/test-1.py
import pytest
import {{name}} 

def test_1():
    assert "FIXME" == "FIXME"
Package: templates
Python Templatesis an Apache2 licensedhtml templatinglibrary, written
in pure-Python, including popular HTML templates likeBootstrap.TODOPython Templatesis 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-frameworksNormalize.cssPure.cssMilligram.cssBootstrap, add more examples.Semantic UIFoundationBulmaUIkitMaterializeDemo project ideas:Link shortenerE-commerce pageBlogInclude images, fonts, icons?See also:Dominate:https://github.com/Knio/dominateTestimonialsDoes your company or website usePython Templates? Send us amessageand let us know.FeaturesPure-PythonPopular HTML templates included!QuickstartInstallingPython Templatesis simple withpip:$ pip install templatesYou can access documentation in the interpreter with Python’s built-inhelpfunction. Thehelpworks on modules, classes and methods inPython Templates.>>>importtemplates>>>help(templates)>>>fromtemplatesimportbootstrap>>>help(bootstrap)>>>help(bootstrap.Starter)>>>help(bootstrap.Jumbotron)There’s also a demo which you can run usingbottle:$ pip install bottle
$ python -m templates.demoUseful LinksPython Templates DocumentationPython Templates at PyPIPython Templates at GithubPython Templates Issue TrackerPython Templates LicenseCopyright 2018 Grant JenksLicensed 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 athttp://www.apache.org/licenses/LICENSE-2.0Unless 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.
Package: template-service-installer
Service installerLibrary for automated installing services to /etc/systemd/system folderIt will be useful if:You have a lot of servers where you want to deploy your projectYour project consists of a large number of services, and you are not going to use dockerEach of your servers has different working directories for servicesUsageYou can run this library as a standalone app usingpython-mservice_install(template_dir)(working_dir)You can import this library to your project and use it therefromservice_installerimportinstall_servicesinstall_services('/foo/bar','foo/bar2/')
Package: templates.py
templates.pySimple function templating for Python.ExamplefromtemplatesimporttemplatefromtypingimportType@templatedefcast(t:Type):definner(val:str):returnt(val)returninnercasted=cast[tuple]("abc")print(casted)# ("a", "b", "c")InstallationLinux/macOSpython3 -m pip install -U templates.pyWindowspy -3 -m pip install -U templates.pyUsageStart with decorating a function withtemplates.templateand putting the generics in your signature, like so:fromtemplatesimporttemplate@templatedefmy_template(a:str,b:str,c:str):# needs to get called using my_template[a, b, c]()...Now, for the actual functionality, you need to define another function inside it.Make sure to return the inner function!Example:fromtemplatesimporttemplate@templatedefmy_template(a:str,b:str,c:str):definner(test:str):...returninner# you always need to return the inner functionLimitationsType Checking IssueDue totyping_extensions.ParamSpecbeing horrible, the following code will not raise an type issue (at least when using pylance)@templatedefadd(a:int,b:int):definner(c:int)->int:returna+b+creturninnera=test[1,2,3](4)# only raises a runtime errorprint(a)Luckily, you can still see the needed generics when hovering over the template call.Default GenericsDefault generics are not supported:@templatedefmy_template(a:str,b:str,c:str="c"):definner(test:str):...returninnermy_template["a","b"]("hi")# raises templates.TemplateErrorReturn Type AnnotationThere is no good way to annotate function return type:@templatedefmy_template(a:str,b:str,c:str)->str:# typing error!definner(test:str):...returninnermy_template["a","b","c"]("hi")However, youcanset the return type of the inner function:@templatedefmy_template(a:str,b:str,c:str):definner(test:str)->str:# do this instead!!...returninnermy_template["a","b","c"]("hi")
Package: templates-s3
Installation$[sudo]pipinstalltemplates-s3$[sudo]npmi-gtemplates-s3Prosstore templates on S3 - no need rebuild docker imageHow it workstemplates/hard-coded folderscripts:create full-access/read-only user and credentialsupload/downloadtemplates/hard-coded environment variables names:AWS_S3_TEMPLATES_BUCKETAWS_S3_TEMPLATES_USERAWS_S3_TEMPLATES_ACCESS_KEY_IDAWS_S3_TEMPLATES_SECRET_ACCESS_KEYExamplesMakefile, create envTEMPLATES_BUCKET:=BUCKET_NAME
all:test-s.env.s3.templates||templates-s3-create-full-access-env$(TEMPLATES_BUCKET)>.env.s3.templatestest-s.env.prod.templates||templates-s3-create-read-only-env$(TEMPLATES_BUCKET)>.env.prod.templatesuploadtemplates/to S3set-oallexport
..env.s3.templates||exittemplates-s3-uploadDockerfileENTRYPOINT["/bin/sh","/entrypoint.sh"]entrypoint.shtemplates-s3-download
...ansible-playbook.yml...
  tasks:
  - name: task_name
    docker_container:
      ...
      env_file: ".env.prod"readme42.com
Package: template-test-repo
template-test-repoAn example libraryUsageTODO: Use this section to explain how someone would use your package in their project.
For example: how to add the package to a project as a requirement, how to configure the
package, how to initialize the package, and how to call it.HackingInstalling template-test-repo in a development environmentYou will needGitpyenvFollow the instructions in the pyenv README to install it.
The Homebrew method works best on macOS.
On Ubuntu follow the Basic GitHub Checkout method.Clone the git repogit clone https://github.com/hypothesis/template-test-repo.gitThis will download the code into atemplate-test-repodirectory
in your current working directory. You need to be in thetemplate-test-repodirectory for the rest of the installation
process:cd template-test-repoRun the testsmake testThat's it!You’ve finished setting up your template-test-repo
development environment. Runmake helpto see all the commands that're
available for linting, code formatting, packaging, etc.Updating the Cookiecutter scaffoldingThis project was created from thehttps://github.com/hypothesis/h-cookiecutter-pypackage/template.
If h-cookiecutter-pypackage itself has changed since this project was created, and
you want to update this project with the latest changes, you can "replay" the
cookiecutter over this project. Run:make templateThis will change the files in your working tree, applying the latest
updates from the h-cookiecutter-pypackage template. Inspect and test the
changes, do any fixups that are needed, and then commit them to git and send a
pull request.If you wantmake templateto skip certain files, never changing them, add
these files to"options.disable_replay"in.cookiecutter.jsonand commit that to git.If you wantmake templateto update a file that's listed indisable_replaysimply delete that file and then runmake template, it'll recreate the file
for you.
Package: templatex
TempLatexA jinja2 dialect for latex templating in python.Quick StartpipinstalltemplatexfromtemplateximportEnvironmentfromjinja2importFileSystemLoaderenv=Environment(loader=FileSystemLoader('./template_folder'))template=env.get_template("chapter.latex")print(template.render(the="variables",go="here"))Why not the default jinja2?jinja2's default escape works great for HTML but is not user-friendly for latex because latex heavily uses curly
brackets {} .For example, if you want to produce the following latex code:x = \frac{b}{c}Where b and c will be replaced by an actual number, for example:{"b": 42, "c": 3}.The jinja2 version will be:fromjinja2importTemplatetemplate="""x =\\frac{{{ b }}}{{"{"}}{{ c }}{{"}"}}"""# {{"}"}} will render to }data={'a':13,'b':42,'c':3}j2_template=Template(template)print(j2_template.render(data))You will notice that because both latex and jinja2 heavily rely on{}, the template string will be populated
with{}, make it hard to read and modify.Intemplatex, we can write the following code:fromtemplateximportTemplatetemplate="""x =\\frac{@= b =@}{@= c =@}"""data={'a':13,'b':42,'c':3}j2_template=Template(template)print(j2_template.render(data))What this package changesChanged Default Jinja2 configuration.Template changes jinja2's default configuration to the following:Enviroment(loader,trim_blocks=True,block_start_string='@@',block_end_string='@@',variable_start_string='@=',variable_end_string='=@',autoescape=False,comment_start_string='\#{',comment_end_string='}',line_statement_prefix='%%',line_comment_prefix='%#',)As a result, you only need to adopt the following syntax:variable render:@= var_name =@block logic:@@ for my_item in my_collection @@comment:\#{ your comment }Add a latex escape filterJinja2, by default, will perform auto HTML escaping on rendered variables, but I couldn't figure out how to change its
default escape filter implementation.
As a result, we disabled this feature and provided a latex escape filter so template authors can manually escape string
variables as needed.For example:When rendering@= my_var =@, and ifmy_var="$5.0", the resulting latex code cannot be compiled due to the
unescaped$character.
You can use@= my_var | escape_latex =@, where theescape_latexfilter will escape$character to valid
latex:\$.Other featuresSince this is still the same jinja2 engine at its core, users should refer to
thejinja2 sitefor documentation on other features.InspirationI adopted the solution fromthis answer on stackoverflow, and added some
modifications.
Package: templatise
template.pyHomepageBy Alex Brandtalunduil@gmail.comDescriptionYou can use template.py to create a new GitHub repository. The repository contains
poetry, VS Code devcontainers, and various GitHub actions ready to use.template.py relates toCookiecutterbecause both are templates for
bootstrapping projects.  template.py allows you to have a full development
environment with only VS Code and it's "Remote Development" plugin.Cookiecutterexpects you to re-use your development environment for multiple
projects.Terms of useYou are free to use template.py as a basis for your own projects without any
conditions. See theLICENSEfile for details.PrerequisitesVS Code with "Remote Development" installedHow to use this templateVisitthe repositoryClick "Use this template"Follow the GitHub Docs toCreate a repoOpen VS CodeOpen the command prompt withctrl+shift+pType "clone repository in container" and hit returnInput the GitHub URL of your new repositoryIn the resulting terminal (ctrl+`), run:poetry run initialiseResolve the generated README issueContinue working on your awesome projectDocumentationLICENSE: The license governing use of template.pyGetting helpGitHub Issues: Support requests, bug reports, and feature requestsHow to helpSubmitissuesfor problems or questionsSubmitpull requestsfor proposed changes
Package: templatory
it. You can build the context by manually setting keywords, loading data filesor giving content as markup files.Home-page: https://github.com/brutus/templatorAuthor: Brutus [DMC]Author-email: brutus.dmc@googlemail.comLicense: GNU GPLv3Description: # TemplatorTakes a *context* and renders one or more [Jinja] *templates* with it. You canbuild the context by manually setting keywords, loading data files or givingcontent as markup files.- Supports [Markdown] and [ReStructuredText] as input formats for content files.- And [JSON] and [YAML] as formats for data files.## UsageFor a full list of options see `templator --help`.```shelltemplator [options] [--extra <KEY> <VALUE>]… [--data <FILE>…] [--content <FILE>…] [--css <FILE>…] [--js <FILE>…] [<TEMPLATEFILE>]…```## InstallationUse [pip][] — the package is called `templatory` on [pypi][]:```shellpip install --user templatory```## Examples```shell$ templator -e name 'World' -T 'Hello {{name}}!'Hello World!``````shell$ templator -e content 'Hello World!' -e title 'Testy' --minimize<!doctype html><html> <head><meta charset=utf-8><meta name=viewport content="width=device-width, initial-scale=1.0"><title>Testy</title></head> <body>Hello World!</body> </html>``````shell$ echo '*Hello*' > content.md$ echo "js_links: ['//cdn.tld/jquery.min.js']" > data.yaml$ templator -d data.yaml -c content.md<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script src="//cdn.tld/jquery.min.js"></script></head><body><p><em>Hello</em></p></body></html>```## Development__Templator__ is at home on GitHub: <https://github.com/brutus/templator>For any kind of feedback, bugs… feel free to use this [tracker][].[jinja]: http://jinja.pocoo.org/[markdown]: http://spec.commonmark.org/[restructuredtext]: http://docutils.sourceforge.net/docs/user/rst/quickref.html[json]: http://json.org/[yaml]: http://yaml.org/[pip]: https://pip.pypa.io/en/stable/[pypi]: https://pypi.python.org/pypi[tracker]: https://github.com/brutus/templator/issuesKeywords: templates,jinja,jinja2,markdown,restructuredtext,json,yamlPlatform: UNKNOWNClassifier: Development Status :: 3 - AlphaClassifier: Intended Audience :: DevelopersClassifier: Topic :: Software DevelopmentClassifier: Environment :: ConsoleClassifier: Environment :: Web EnvironmentClassifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Classifier: Programming Language :: Python :: 2Classifier: Programming Language :: Python :: 3
Package: templaty
TemplatyTemplatyis a code generator written in Python that focuses on generating
correct and readable programming code. It features fine-grained control over
whitespacing and indentation and a rich meta-language that allows full control
over the end result.🌈 There now isa syntax plugin for Vim!The template syntax was inspired byJinja2and should be very easy to pick
up.def annoying_prompt():
    {% for i in range(0, 5) %}
      prompt("Hey, how you're doing?")
    {% endfor %}Generates the following code:defannoying_prompt():prompt("Hey, how you're doing?")prompt("Hey, how you're doing?")prompt("Hey, how you're doing?")prompt("Hey, how you're doing?")prompt("Hey, how you're doing?")What about generating anidentity matrixin C that imposes no runtime cost?static const int IDENTITY_MATRIX[][] = [
  {% join i in range(0, 10) with ',' %}
    [{% join j in range(0, 10) with ',' %}{% if j == i %}1{% else %}0{% endjoin %}]
  {% endjoin %}
];It should look something like this:staticconstintIDENTITY_MATRIX[][]=[[1,0,0,0,0,0,0,0,0,0],[0,1,0,0,0,0,0,0,0,0],[0,0,1,0,0,0,0,0,0,0],[0,0,0,1,0,0,0,0,0,0],[0,0,0,0,1,0,0,0,0,0],[0,0,0,0,0,1,0,0,0,0],[0,0,0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,1,0,0],[0,0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,0,0,1]];This is just the tip of the iceberg of what Templaty can do!UsageTemplaty is available on PyPi. You can issue the following command to install it:pip3 install -U --user templatyThis should make the main commandtemplatyavailable in your terminal.FAQWill this library support Python 2?No. Python 2 has reached its end-of-life and the organisation recommends
everyone to upgrade to Python 3. Porting to Python 2 requires extra work
for no good reason.Is it safe to use this library in my web server?No, absolutely not! Templaty is a tool meant to be run by developers, not
end-users. As such, it has little (if any) security checks. You should never
run untrusted input using Templaty, only code you wrote yourself or from a
developer you trust.What extension should I use for my template files?It is recommended to use the.tplyextension so that syntax plugins likevim-templatyautomatically set up the right syntax highlighting for you.If your template contains code in another programming language, simply prefix
the default file extension to.tply, e.g.mytemplate.cc.tply.LicenseTemplaty is licensed under the Apache 2.0 license, in the hope it will help developers
write better programs.
Package: temple
Temple provides templated project creation and management.The main functionality of temple includes:Creating new projects fromcookiecuttertemplates.Listing all available templates under a github user / org along with all projects created from
those templates.Keeping projects up to date with the template as it changes.DocumentationView the temple docs here.
A quick start and installation overview is provied below.Installationtemple can be installed with:pip3 install templeMost temple functionality requires aGITHUB_API_TOKENenvironment variable to be set.
The Github API token is a personal token that you create
by following theGithub Access Token Instructions.
This token only requiresreposcope. Also remember to enable SSO for your token.NoteTemple requires a Github API token for listing available templates, starting new projects, and updating a project
with a template. However, project templates themselves might have other setup requirements. Consult the documentation
of templates you want to use for your projects for information about other installation and setup required.Quick StartProjects are setup by temple with:temple setup <git@github.com:user/cookiecutter-template.git>Temple usescookiecutterto gather user input and
create the initial project scaffolding.cookiecutter hookscan be used to
do additional project setup, such as publishing it to a remote Github repository or configuring continuous
integration.Once a project is set up and published to Github, temple-created projects can be listed with thetemple lscommand.temple ls <github_user_or_org>will list all available templates under a Github user or org.temple ls <github_user_or_org><git@github.com:user/cookiecutter-template.git>will list all projects
created using a particular template. Note thattemple ls-lwill print off descriptions of the returned
repositories.If a template is ever updated, changes can be pulled into a project with:temple updateThis will diff the changes in the new template and apply them to your repository. You will have to add and
push these changes yourself. Note to lookout for “*.rej” files after updating. These are lines that could
not automatically be applied to your repository, and you should look into them to see if they should be
applied.Note thattemple update--checkcan be used to check if the project is up to date with the latest template.Contributing GuideFor information on setting up temple for development and contributing changes, viewCONTRIBUTING.rst.Primary Authors@wesleykendall (Wes Kendall)@gwax (George Leslie-Waksman)Other contributors can be found in the AUTHORS file
Package: templer.buildout
ContentsIntroductionCreating PackagesIncluded TemplatesOther FunctionsContributorsChangelog1.0b1 - May 17, 20121.0a2 - October 7, 2011IntroductionThis package extends the functionality of the templer code generation system. It
builds upon the functionality oftempler.core, and depends on that package.
This package provides basic support for creating buildouts and buildout recipes
usingzc.buildout. Included are packages for basic buildout skeletons and
buildout recipes.Creating PackagesAs with the parent package, templer.core, creating packages using
templer.buildout templates is accomplished by using thetemplerscript. The
script is invoked thus:templer basic_buildoutThis will create a basic buildout skeleton, containing the zc.buildout
bootstrap.py file and a buildout.cfg file which may be edited to taste.Included Templatesbasic_buildoutThis creates a basic skeleton for a buildout.recipeThis creates a skeleton for a buildout recipe for use with zc.buildoutOther FunctionsThetemplerscript provides a number of other functions, these are described
in full on the index page fortempler.coreatPyPIContributorsCris Ewing, original authorHector VelardeBased on code from zopeskel, contributors to which include:Daniel NouriTarek ZiadéMustapha BenaliSylvain ViollonAlan HoeyJosh JohnsonEmanuel SartorMatthew WilkesJoel BurtonCris EwingChris CallowayChris RossiChangelog1.0b1 - May 17, 2012Update tests to unittest2, remove deprected test aliases
[hvelarde]Fix up packaging
[hvelarde]1.0a2 - October 7, 2011Updated license to MIT
[cewing]Created new basic_buildout template to serve as a basis for other buildout
templates (and to be useful on its own as a simple core buildout)
[Cris Ewing]Added zc.buildout recipe template from templer.core
[Cris Ewing]Package created using templer.core
[Cris Ewing]