Giter Club home page Giter Club logo

py-12f-common's Introduction

py-12f-common

Quality Check Status Coverage

About

This repository holds those infrastructure-level modules, that every application requires that follows the core 12-factor principles.

This version of the library is compatible with Python versions >=3.8.

You can use pip to install the library from the Python Package Index:

   $ pip install py-12f-common

For further information read the documentation.

Health check

Health check is a web service running on the configured host:port and can be called with HTTP GET request on /health endpoint. It is responsible for providing information about the application state.

It complies with the Kubernetes health check guidelines. The response is compiled according to Health Check Response Format for HTTP APIs.

In the configuration, HEALTH_CHECK (bool) must be included that enables/disables to run health check web service.
HEALTH_CHECK_HOST (string) and HEALTH_CHECK_PORT (int) are optional these are the host and port numbers for the web service (defaults are '127.0.0.1' and 8008).

The initial state is NOINFO. Call the set_state_warm_up function just before starting the application, it will set the state to WARMUP. Once the application has started working, call the set_state_working function to set the state to WORK. Call set_state_shut_down just before the application shuts down to set the state to SHUTDOWN. The set_state_no_info function can be used to set the state to NOINFO if required.

See the examples: minimum is without health check and asyncq is with health check.

py-12f-common's People

Contributors

github-actions[bot] avatar rehanynikolett avatar tombenke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.