Skip to main content

The Python Agent for Metlo

Project description

logo

Metlo API Security

Secure Your API.

Installation

Currently Metlo's Python Agent supports 2 servers:

  • Django
  • Flask

It can be installed from pypi by running :

pip install metlo

Configuration

Django

Once installed, Metlo's middleware can be added by modifying middlewares list (in the projects settings.py) like so:

MIDDLEWARE = [
    ...,
    "metlo.django.MetloDjango",
] 

and configuring a METLO_CONFIG attribute in the projects settings.py like this :

METLO_CONFIG = {
    "API_KEY": "<YOUR_METLO_API_KEY>",
    "METLO_HOST": "<YOUR_METLO_COLLECTOR_URL>"
}

METLO_CONFIG can take an optional key-value pair representing the max number of workers for communicating with Metlo.

Flask

Once installed, Metlo middleware can be added simply like:

from flask import Flask

...
from metlo.flask import MetloFlask

app = Flask(__name__)
MetloFlask(app, "<YOUR_METLO_COLLECTOR_URL>", "<YOUR_METLO_API_KEY>")

The Flask Middleware takes the flask app, Metlo collector url, and the Metlo API Key as parameters. As an optional parameter, a named value can be passed for max number of workers for communicating with Metlo.

MetloFlask(app, "<YOUR_METLO_COLLECTOR_URL>", "<YOUR_METLO_API_KEY>", workers="<WORKER-COUNT>")

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

metlo-0.0.16.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

metlo-0.0.16-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file metlo-0.0.16.tar.gz.

File metadata

  • Download URL: metlo-0.0.16.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for metlo-0.0.16.tar.gz
Algorithm Hash digest
SHA256 cc664796f21e1405167630d94690807e5eac0d36e531a42133fc2b734bb110f1
MD5 5a623584871994a0aae5d712bb28cf0c
BLAKE2b-256 339ecf2acbd0a3606311f72d08fef79a90d69b7d350d15a05a0d9411b530ee5c

See more details on using hashes here.

File details

Details for the file metlo-0.0.16-py3-none-any.whl.

File metadata

  • Download URL: metlo-0.0.16-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for metlo-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 61cbcc03b57c310f4fdf5ac852ba7afbd71c85ed2929583ae0d5efd6caf564dd
MD5 95908ad93a2d1f32746c347ea87ee64e
BLAKE2b-256 f1c870125e5c9448dc01001ae7260b391c57cf61a7f4cac03c028919d6248bd1

See more details on using hashes here.

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