A plaster plugin to configure pyramid app with Yaml
Project description
Plaster Yaml
Introduction
By default, Pyramid use a paste format file to loads its configuration,
here is a plugin to use a yaml file instead to configure your pyramid application.
e.g.
pserve development.yaml
Installation
With poetry
poetry add plaster-yaml
With pip
pip install plaster-yaml
Usage
With poetry
You need to register this plugin in your pyproject.toml
:
[tool.poetry.plugins."paste.app_factory"]
main = "<PATH_TO_MODULE_CONTAINING_MAIN>:main"
[tool.poetry.plugins."plaster.loader_factory"]
"file+yaml" = "plaster_yaml:Loader"
You must run poetry install
to finalize the registration.
With setuptools
setup(
...,
entry_points={
'paste.app_factory': ['main = <my_app>:main'],
'plaster.loader_factory': ['yaml = plaster_yaml:Loader'],
...
},
)
You must run pip install -e .
to finallize the registration.
Troubleshouting
If you get the following exception:
plaster.exceptions.LoaderNotFound: Could not find a matching loader for the scheme "file+yaml", protocol "wsgi".
It meast that you did not register the pluging. Read the usage section for to register it properly.
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
plaster_yaml-0.1.3.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for plaster_yaml-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ab3b6cb4adfa631921648c1fb51013b50f8d63d5c6bc8744a83a083d6d86a1d |
|
MD5 | f7e99743ad8ebd861f9e3ca724609ed6 |
|
BLAKE2b-256 | e723fad972fc84e429a0cf204ae73df8674be9b04651f20dc53deb4df96acf17 |