Skip to main content

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 details)

Uploaded Source

Built Distribution

plaster_yaml-0.1.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file plaster_yaml-0.1.3.tar.gz.

File metadata

  • Download URL: plaster_yaml-0.1.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Linux/5.15.12-arch1-1

File hashes

Hashes for plaster_yaml-0.1.3.tar.gz
Algorithm Hash digest
SHA256 67ddccb0679ca3f80d19e2a1e3a0e44afb2d48bfc1a717a4d3b06057212ad70d
MD5 e152579cdf00641ca626a08909fed7ff
BLAKE2b-256 bef9844998a3c63d6bbbb1b20519f2ed565a3002ece83b29c9739c9d59d33be0

See more details on using hashes here.

File details

Details for the file plaster_yaml-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: plaster_yaml-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.1 Linux/5.15.12-arch1-1

File hashes

Hashes for plaster_yaml-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5ab3b6cb4adfa631921648c1fb51013b50f8d63d5c6bc8744a83a083d6d86a1d
MD5 f7e99743ad8ebd861f9e3ca724609ed6
BLAKE2b-256 e723fad972fc84e429a0cf204ae73df8674be9b04651f20dc53deb4df96acf17

See more details on using hashes here.

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