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.2.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file plaster_yaml-0.1.2.tar.gz
.
File metadata
- Download URL: plaster_yaml-0.1.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.4 Linux/5.11.16-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9f2713848dbe288dd0b10216ae8f1807f7e0c32357e97c98e1bd8813ca36152 |
|
MD5 | b2e7dbc70b6fc5be4083c9bf578c9b48 |
|
BLAKE2b-256 | 736598c68c105e2c6e3b81bede836eaa1c6d9e1cdc6c449f6c8ae2c4d4a8b040 |
File details
Details for the file plaster_yaml-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: plaster_yaml-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.4 Linux/5.11.16-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35ef9775243fc893ab4c36212c0b5b04b96dede19de113c8801693d8be28bf7e |
|
MD5 | 72058fc328852b0bf97f5626429e935e |
|
BLAKE2b-256 | 526742b83397bb8fb660b01bd6529cdbed0a1f7f5470e6e75196696dc0ab73c7 |