Skip to main content

Scout Application Performance Monitoring Agent

Project description

Scout Python APM Agent

travis pypi docs black

Monitor the performance of Python Django apps, Flask apps, and Celery workers with Scout's Python APM Agent. Detailed performance metrics and transaction traces are collected once the scout-apm package is installed and configured.

screenshot

Requirements

Python 2.7 or 3.4+.

Scout APM has integrations for the following frameworks:

  • Bottle 0.12+
  • Celery 3.1+
  • Django 1.8+
  • Falcon 2.0+
  • Flask 0.10+
  • Pyramid 1.8+

For other frameworks, you can use the agent's instrumentation API. See the Python help docs for more information.

Quick Start

A Scout account is required. Signup for Scout.

pip install scout-apm

Bottle

from scout_apm.bottle import ScoutPlugin

app = bottle.default_app()
app.config.update({
    "scout.name": "YOUR_APP_NAME",
    "scout.key": "YOUR_KEY",
    "scout.monitor": "true",
})

scout = ScoutPlugin()
bottle.install(scout)

Django

# settings.py
INSTALLED_APPS = [
    "scout_apm.django",  # should be listed first
    # ... other apps ...
]

# Scout settings
SCOUT_MONITOR = True
SCOUT_KEY = "[AVAILABLE IN THE SCOUT UI]"
SCOUT_NAME = "A FRIENDLY NAME FOR YOUR APP"

Falcon

import falcon
from scout_apm.falcon import ScoutMiddleware

scout_middleware = ScoutMiddleware(config={
    "key": "[AVAILABLE IN THE SCOUT UI]",
    "monitor": True,
    "name": "A FRIENDLY NAME FOR YOUR APP",
})
api = falcon.API(middleware=[ScoutMiddleware()])
# Required for accessing extra per-request information
scout_middleware.set_api(api)

Flask

These instructions assume the app uses SQLAlchemy. If that isn't the case, remove the referencing lines.

from scout_apm.flask import ScoutApm
from scout_apm.flask.sqlalchemy import instrument_sqlalchemy

# Setup a flask 'app' as normal

# Attach ScoutApm to the Flask App
ScoutApm(app)

# Instrument the SQLAlchemy handle
instrument_sqlalchemy(db)

# Scout settings
app.config["SCOUT_MONITOR"] = True
app.config["SCOUT_KEY"] = "[AVAILABLE IN THE SCOUT UI]"
app.config["SCOUT_NAME"] = "A FRIENDLY NAME FOR YOUR APP"

Pyramid

Add the SCOUT_* settings to the Pyramid config, and then config.include('scout_apm.pyramid')

import scout_apm.pyramid

if __name__ == "__main__":
    with Configurator() as config:
        config.add_settings(
            SCOUT_KEY="...",
            SCOUT_MONITOR=True,
            SCOUT_NAME="My Pyramid App"
        )
        config.include("scout_apm.pyramid")

        # Rest of your config...

Documentation

For full installation instructions, including information on configuring Scout via environment variables and troubleshooting documentation, see our Python docs.

Support

Please contact us at support@scoutapm.com or create an issue in this repo.

Project details


Release history Release notifications | RSS feed

This version

2.2.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scout_apm-2.2.1.tar.gz (38.1 kB view details)

Uploaded Source

Built Distributions

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

scout_apm-2.2.1-py2-none-any.whl (48.0 kB view details)

Uploaded Python 2

scout_apm-2.2.1-cp37-cp37m-manylinux1_x86_64.whl (57.9 kB view details)

Uploaded CPython 3.7m

scout_apm-2.2.1-cp37-cp37m-manylinux1_i686.whl (57.7 kB view details)

Uploaded CPython 3.7m

scout_apm-2.2.1-cp36-cp36m-manylinux1_x86_64.whl (57.9 kB view details)

Uploaded CPython 3.6m

scout_apm-2.2.1-cp36-cp36m-manylinux1_i686.whl (57.7 kB view details)

Uploaded CPython 3.6m

scout_apm-2.2.1-cp35-cp35m-manylinux1_x86_64.whl (57.9 kB view details)

Uploaded CPython 3.5m

scout_apm-2.2.1-cp35-cp35m-manylinux1_i686.whl (57.7 kB view details)

Uploaded CPython 3.5m

scout_apm-2.2.1-cp34-cp34m-manylinux1_x86_64.whl (57.5 kB view details)

Uploaded CPython 3.4m

scout_apm-2.2.1-cp34-cp34m-manylinux1_i686.whl (57.3 kB view details)

Uploaded CPython 3.4m

File details

Details for the file scout_apm-2.2.1.tar.gz.

File metadata

  • Download URL: scout_apm-2.2.1.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1.tar.gz
Algorithm Hash digest
SHA256 f56fcdb5bae723d1712c93b333f4fea4ff1000b55db0a7feb545253b35a2c613
MD5 461fda328d24f6e266c5361fd11c49a1
BLAKE2b-256 ed17cf7c86bfb71acc0293398004899e1bd3ce3949b29d97c9cc137ec2505c36

See more details on using hashes here.

File details

Details for the file scout_apm-2.2.1-py2-none-any.whl.

File metadata

  • Download URL: scout_apm-2.2.1-py2-none-any.whl
  • Upload date:
  • Size: 48.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1-py2-none-any.whl
Algorithm Hash digest
SHA256 4535872cf5fe25494c342629e75b9c3b78d8e36449c9f6cf2f210810d4ea6e51
MD5 71c7c4b07f81f77a52baced5cbf17119
BLAKE2b-256 83e469126a18af67171ef1451de381041d3b4cec6f0fe19e680c307387971aa2

See more details on using hashes here.

File details

Details for the file scout_apm-2.2.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scout_apm-2.2.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 57.9 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 db80f2921d4652f5332d7b801d37efafbe51ffd2ffd2327efcd43933b30e8837
MD5 62d8bfd08f7ea4822b0a0d5e5dde785b
BLAKE2b-256 f42d376af54423f9054f5c5d32242e00cd27e6897c0e89408fa4dede978c2a97

See more details on using hashes here.

File details

Details for the file scout_apm-2.2.1-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: scout_apm-2.2.1-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 57.7 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 4ac27d831f33ecf5dd4ad9c63d811f93a25a7ef66bdac61b85ce66ac78bccac4
MD5 e811015f541f78e2f77e00922679414c
BLAKE2b-256 ec60d8938fa88609825f3a7da7e6f31b7fd04dbdfc384203ba8d753c7629100d

See more details on using hashes here.

File details

Details for the file scout_apm-2.2.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scout_apm-2.2.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 57.9 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d4357d7bbf1818b93281e37befefe52cb24a425a97ed180f1c263b228e10cb39
MD5 91ecb46893d68ffa2e13ba578dc00e40
BLAKE2b-256 d667dda48ce4a13555aa7d6ae06255239c0607db5fc37edc04c8a1b3888e0613

See more details on using hashes here.

File details

Details for the file scout_apm-2.2.1-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: scout_apm-2.2.1-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 57.7 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 2e94c837ee1978e17d0aed9615da9f68f10986606a44b3aebb25823dbfa95124
MD5 6d9bfa94356171becce0740c076680e8
BLAKE2b-256 6f39c176810c059ef035f194c7c1ac80537b90ff0dc187c492959ccd93147153

See more details on using hashes here.

File details

Details for the file scout_apm-2.2.1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scout_apm-2.2.1-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 57.9 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5df01da32369108aa07ccbd783fc994e64798ca29f063d84854eca3da19ff59e
MD5 cf150b9c2ace5e7f389f647a80050ff7
BLAKE2b-256 6b062225d8f345810f9332eb24d21688a705f7a3a70f881b659f923f4b860af5

See more details on using hashes here.

File details

Details for the file scout_apm-2.2.1-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: scout_apm-2.2.1-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 57.7 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 884c6b2f22e4e7bb5825965112c915dca26b72e125256c8b96b1b596de96214e
MD5 0fff6728f788b5af43f9272883821f2b
BLAKE2b-256 0c7d54b37059f44bd5906957e72a427565fd8e76ffe4d6e64007b123815145e7

See more details on using hashes here.

File details

Details for the file scout_apm-2.2.1-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scout_apm-2.2.1-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 57.5 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0d216c6fd377cb93579abeddf37c878b3507e480f405caed15e66f4d85d6d7be
MD5 7ef4aff84d7e0e56605e14eb71415da0
BLAKE2b-256 7a7335208cafe5cef3e9ab7985751a13f7b1d22cedd06ad21b5fa79e8a0dcd46

See more details on using hashes here.

File details

Details for the file scout_apm-2.2.1-cp34-cp34m-manylinux1_i686.whl.

File metadata

  • Download URL: scout_apm-2.2.1-cp34-cp34m-manylinux1_i686.whl
  • Upload date:
  • Size: 57.3 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

File hashes

Hashes for scout_apm-2.2.1-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 8004781e3ad840a19a4a3070dd0da00b10e70b55523658dd0d9c4f7c963de1c4
MD5 f1de76c356fe91c58bcd994e4afa5047
BLAKE2b-256 c7ae7963218a1c742df467eb270f0d3aaeb1d63685f318a0a6357cbb8ea9264a

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