Skip to main content

Programa de monitoramento de código python, desenvolvido para ser utilizado pelas funcionário da Agência de dados

Project description

Monit

Instalação:

pip install git+https://github.com/Agencia-de-Dados-bsb/monit.git

Exemplo arquivo .env:

# Project info
PROJECT=sample_project
COMPANY=acme
LOCATION=ec2
DEV=coder

# Database info
DB_USER=user
DB_PASSWORD=p@ssw0rd
DB_HOST=localhost
DB_DATABASE=teste

Exemplo de Uso:

import time

from monit.core import Monitor
from monit.error import SetupError

def main():
    # Initialize the Monitor
    monit = Monitor()

    try:
        # Your code that might raise exceptions
        # For demonstration purposes, let's raise an exception
        time.sleep(5)
        raise ValueError("This is a sample error.")

    except Exception as e:
        # Notify the Monitor about the error
        monit.notify(SetupError, e)
        # monit.notify_and_exit(SetupError, e)

    monit.end()


if __name__ == "__main__":
    main()

Tipos de erros:

SetupError
DatabaseError
HTTPError
FileError
FolderError
TooManyRequests

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

monit-agd-1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monit_agd-1.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file monit-agd-1.1.tar.gz.

File metadata

  • Download URL: monit-agd-1.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for monit-agd-1.1.tar.gz
Algorithm Hash digest
SHA256 02efc08187a456bd4f75afaab228f2e11e0a1e2f6a3d176ec91e749015b1e5fb
MD5 5e6b7e41ebb4a026e95dfdf9b0946825
BLAKE2b-256 78b55b6efd6accd6ae1cd6b0bb95aa6fcbf943d5dba466a59da6148d98a545ce

See more details on using hashes here.

File details

Details for the file monit_agd-1.1-py3-none-any.whl.

File metadata

  • Download URL: monit_agd-1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for monit_agd-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55125603c8f31bcfeb7bc8ef0756a532e90cb7092ff25ed15f8c8322ec5e53be
MD5 e87f63d808ed9c7796d3ec8712ae57ff
BLAKE2b-256 bff28d536c4effe5c7f9f01c730917d33cc34c3d1b8ac79b8d84b77d8b73bc82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page