<commit_before># bossformation


[![Build Status](https://travis-ci.org/cloudboss/bossformation.svg?branch=master)](https://travis-ci.org/cloudboss/bossformation)

`bossformation` is a preprocessor that allows [CloudFormation](https://aws.amazon.com/cloudformation/) templates to be written in YAML instead of JSON. In addition to this, templates may contain [Jinja2](http://jinja.pocoo.org/docs/dev/) tags, allowing for dynamic template generation.

# Installation
## Install from [PyPI](https://pypi.python.org/pypi)
```
pip install bossformation
```
## Install from source
```
git clone https://github.com/cloudboss/bossformation.git
cd bossformation
pip install -r requirements.txt
pip install .
```

# Usage
After installation, the `bf` command is provided with subcommand `render`.

## Rendering templates
At its simplest, you may write a CloudFormation template that maps YAML to JSON, such as the following file `test.yml`:

```
# The date must be quoted or the YAML parser will try to convert it to a datetime object
AWSTemplateFormatVersion: '2010-09-09'

Description: CloudFormation Example
<commit_msg>Commit to test travis build<commit_after># bossformation

[![Build Status](https://travis-ci.org/cloudboss/bossformation.svg?branch=master)](https://travis-ci.org/cloudboss/bossformation)

`bossformation` is a preprocessor that allows [CloudFormation](https://aws.amazon.com/cloudformation/) templates to be written in YAML instead of JSON. In addition to this, templates may contain [Jinja2](http://jinja.pocoo.org/docs/dev/) tags, allowing for dynamic template generation.

# Installation
## Install from [PyPI](https://pypi.python.org/pypi)
```
pip install bossformation
```
## Install from source
```
git clone https://github.com/cloudboss/bossformation.git
cd bossformation
pip install -r requirements.txt
pip install .
```

# Usage
After installation, the `bf` command is provided with subcommand `render`.

## Rendering templates
At its simplest, you may write a CloudFormation template that maps YAML to JSON, such as the following file `test.yml`:

```
# The date must be quoted or the YAML parser will try to convert it to a datetime object
AWSTemplateFormatVersion: '2010-09-09'

Description: CloudFormation Example

{'fraction_non_alphanumeric': 0.10798750557786703, 'fraction_numerical': 0.008032128514056224, 'mean_word_length': 5.262569832402234, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7260203', 'n_tokens_mistral': 689, 'n_tokens_neox': 642, 'n_words': 226}