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


Download files

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

Source Distribution

petri-0.22.1.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

petri-0.22.1-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

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