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
Release history Release notifications | RSS feed
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.1.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file plaster_yaml-0.1.1.tar.gz
.
File metadata
- Download URL: plaster_yaml-0.1.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.3 Linux/5.11.10-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b2837188ba804e1d97eb83ad2af4b88390b7bcc0ff3db64c9e77c8d0aa18574 |
|
MD5 | 84896fdfc9ea7657dcacded726cd17b2 |
|
BLAKE2b-256 | 8ab75b574ba3893be14dcdae3a64d76aef8877bbbec2a48faf91ad68c1c215c8 |
File details
Details for the file plaster_yaml-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: plaster_yaml-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.3 Linux/5.11.10-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c625f93bd20ff884f3d563ce0233ca98f9dee5d18df47a0ad08e43a1adf45bc0 |
|
MD5 | 5c8cc520be82c1fbb119275e5c776043 |
|
BLAKE2b-256 | 3f5ceeb71fdd65fe66fd7fbe261b61544a12706046d601e29565531c71146d74 |