Skip to main content

Handle project/application config from pyproject.toml

Project description

Build Status Documentation Status Test Coverage Maintainability Python Version Code Style

Summary

Avoid boilerplate python code.

Importing petri automagically equips your script/pacakage with:

  • settings using pydantic.
  • dotenv file handling using python-dotenv.
  • logging config using logzero&autologging.
  • project metadata from a pyproject.toml file.
  • environment (prod/dev/test) handling via ENV environment variable.

Screenshots

static/screenshots/api.png

Code Example

  • see tests/data folder

Requirements

  • Usage requirements

    • python>=3.6
  • Development requirements

    • tox
    • poetry (recommended)

Installation

  • pip install petri

Testing

  • run tox -e venv to create an appropiate virtualenv
  • tox to run the full test suite

Contribute

  • Development

    • Make sure to pass tox tests (including those with –runslow).
    • For tests design, you can use use ´@pytest.mark.incremental´ and ´@pytest.mark.slow´. See “catalogo_db/tests/conftest.py”
    • If the requirements change, make sure to re-build all images
  • Versioning

Support

If you are having issues, please file an issue in github.

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for petri, version 0.22.0
Filename, size & hash File type Python version Upload date
petri-0.22.0-py3-none-any.whl (10.2 kB) View hashes Wheel py3
petri-0.22.0.tar.gz (8.9 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page