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.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.0.tar.gz (5.0 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.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: monit-agd-1.0.tar.gz
  • Upload date:
  • Size: 5.0 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.0.tar.gz
Algorithm Hash digest
SHA256 36902ac0f245871c4726370a29f9f71b6fbb320c57db25ee2446cdd96e44b73a
MD5 6f5bb805510cfa54a8542a5d7de6bcd7
BLAKE2b-256 4cd39daec62f003f036dabd36283a24c0a0b52491c7a118e3361602234aa4bdd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: monit_agd-1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec0701786dcb6576af684cf125a2fa0dc1388f87cfad9bb10850625c78e0bec8
MD5 87445364e63099f79cf8609bc9aec58a
BLAKE2b-256 f9c7c07bc60ef6a6ab5a45febce22b2c1a6763c2c02eaba16b42c62a51cc0409

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