Skip to main content

Wrapper para trabalhar com a API do Cloud Logging

Procedimento para upload no PYPI

Pré requisitos

Instalar pacotes python python3 -m pip install --upgrade setuptools build wheel twine

Build e enviar ao PYPI

python3 -m build

python3 -m twine upload dist/*

Instalar o pacote no projeto

pip install falcon-logging

Utilização da biblioteca

Essa biblioteca espera que você passe o schema dos dados da tabela.

É aconselhado criar um arquivo de schema.py ou model.py onde seja definido a estrutura de dados da tabela.

Instanciar o Middleware

Com o schema definido, você deve instanciar um classe

from falcon_logging.logging import LogMiddleware

import falcon

class HealthCheckResource(object):

    def on_get(self, _, resp):
        """Handles GET requests"""
        resp.status = falcon.HTTP_200
        resp.body = 'OK'


def create():

    middlewares=[LogMiddleware()]

    _app = falcon.API(middleware=middlewares)
    _app.add_route('/', HealthCheckResource())

    return _app


app = create()

Principais operações

Usando a classe logging, você pode executar algumas operações para auxiliar no desenvolvimento.

Logging
from falcon_logging.logging import logging
logging.info({"key": "value"})

Release files for falcon-logging 0.3.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for falcon-logging 0.3.9
File Size Uploaded
falcon-logging-0.3.9.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for falcon-logging 0.3.9
File Interpreter ABI Platform
falcon_logging-0.3.9-py3-none-any.whl Python 3 none any Details

Total release size: 9.1 kB

Release files / falcon-logging-0.3.9.tar.gz

Download URL falcon-logging-0.3.9.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1b196e4e5c1928867348147a193c31280dafdd41b47abd17a53e4af21abcfe46
BLAKE2b-256 checksum
How to use checksums
dd60ac050645f2c07739e64a68465bb53b3dd78e0768caafbf84efef45249cc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / falcon_logging-0.3.9-py3-none-any.whl

Download URL falcon_logging-0.3.9-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98f41bc3ce845ad021ef7854703d257f72999626ecf897ed5315f1093de4d66a
BLAKE2b-256 checksum
How to use checksums
c31b33289522be77d096d3542b1e151e271f2cd6eb7571198b15ab7f72bfed65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.3.9 This release

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page