Template rendering and variable injection made easy.
https://docs.kuralabs.io/ninjecto/
pip3 install ninjecto
- Adds --values-in=[toml,yaml,json] to parse the standard input and allow to pass values as a pipe.
- New version compatible with Jinja2 3.1.0.
- New version pinning Jinja2 to an older version to avoid breakage caused by API changes. Use this version if you need to use Jinja2 < 3.1.0.
- New namespace "vault" that allows to fetch secrets from a HashiCorp's Vault instance.
- Fixes namespaces. "env" and "git" namespaces are now available.
- Fix core on Python 3.8.
Allows to define the behavior when encountering undefined values in the template.
Allows conditional creation of files, so depending of a value a file can be created or not.
Rendering is now faster when rendering empty files.
Ninjecto's CLI now supports passing
--parents
to create any parent directory of the output directory.New filters:
comment
,quote
andread
.New filters from awesome Inflection package.
Inflection is now a third party dependency, which includes the new filters:
camelize
,dasherize
,humanize
,ordinal
,ordinalize
,parameterize
,pluralize
,singularize
,tableize
,titleize
,transliterate
andunderscore
.Also, the Cerberus dependency was dropped as it is unused (for now).
- Values and namespaces are now available globally, in particular inside macros in libraries.
- Default output mode will now be set before checking the input and output paths, offering a better error message.
- Rendered files will now have the same permissions as the source files.
- Fixes TypeError caused by invalid value of the levels parameter.
- Development preview.
Copyright (C) 2017-2021 KuraLabs S.R.L 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 http://www.apache.org/licenses/LICENSE-2.0 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.