Skip to main content

A module for parsing and discovery of frigg settings file

Project description

# frigg-settings [![Build status](https://ci.frigg.io/badges/frigg/frigg-settings/)](https://ci.frigg.io/frigg/frigg-settings/last/) [![Coverage status](https://ci.frigg.io/badges/coverage/frigg/frigg-settings/)](https://ci.frigg.io/frigg/frigg-settings/last/)
A python module for parsing and discovery of frigg settings file

## Installation
```
pip install frigg-settings
```

## Usage
The same content as t.py, thus run `python t.py` to se the output.

```python
from frigg_settings.helpers import FileSystemWrapper
from frigg_settings import build_tasks, load_settings_file, build_settings

path = os.getcwd()
runner = FileSystemWrapper()

print('Tasks: {}'.format(build_tasks(path, runner)))
print('Settings-file: {}'.format(load_settings_file('{}/.frigg.yml'.format(path), runner)))
print('Build-settings: {}'.format(build_settings(path, runner)))
```

The script prints the following:

```text
Tasks: ['tox', 'flake8']
Settings-file: {'tasks': ['tox -e py34', 'tox -e flake8', 'tox -e isort', 'coverage report -m && coverage xml'], 'coverage': {'parser': 'python', 'path': 'coverage.xml'}}
Build-settings: {'webhooks': [], 'services': [], 'tasks': ['tox -e py34', 'tox -e flake8', 'tox -e isort', 'coverage report -m && coverage xml'], 'coverage': {'parser': 'python', 'path': 'coverage.xml'}}
```

--------------

MIT © frigg.io

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

frigg-settings-3.1.1.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

frigg_settings-3.1.1-py2.py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page