Skip to main content

Configure python warnings for the Pyramid web framework

Project description

Getting Started

The aim of this project is to provide a generic way to configure python warnings.filterwarnings. Python warnings can be configured via Environment variable, Python interpreter argument, or directly in the code. This plugin provides to Pyramid application a clean way to configure the warning level via its configuration file.

Configuration

Set the pyramid_filterwarnings plugin from in the Pyramid ini file then configure the level.

pyramid.includes =
    pyramid_filterwarnings
    ... your other plugins ...

# configure the warning level, default is ignore
filterwarnings.action = ignore

It is also possible to set category, module and message, and do many rules.

# Other optionals configurations keys
# filterwarnings.category = DeprecationWarning
# filterwarnings.module = pyramid\..*

# Add other rules
filterwarnings.1.action = once
filterwarnings.1.category = DeprecationWarning
filterwarnings.1.module = sqlalchemy\..*

filterwarnings.2.action = ignore
filterwarnings.2.module = pyramid_jinja2\.*
filterwarnings.2.message = reload_templates setting is deprecated

# and more if necessary...

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

pyramid_filterwarnings-0.4.tar.gz (3.6 kB view hashes)

Uploaded Source

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