Skip to content

Commit

Permalink
Added Flask quick start
Browse files Browse the repository at this point in the history
  • Loading branch information
itsderek23 authored Apr 19, 2018
1 parent 448ae18 commit 788adcc
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ This is the Python Agent for [Scout Application Monitoring](https://www.scoutapp

![screenshot](https://s3-us-west-1.amazonaws.com/scout-blog/python_monitoring_release/python_monitoring_screenshot.png)

## Django Quick Start
## Quick Start

__A Scout account is required. [Signup for Scout](https://apm.scoutapp.com/users/sign_up).__

```sh
pip install scout-apm
```

### Django

```python
# settings.py
INSTALLED_APPS = (
Expand All @@ -24,8 +26,31 @@ INSTALLED_APPS = (
# Scout settings
SCOUT_MONITOR = True
SCOUT_KEY = "[AVAILABLE IN THE SCOUT UI]"
SCOUT_NAME = "[A FRIENDLY NAME FOR YOUR APP]"
SCOUT_NAME = "A FRIENDLY NAME FOR YOUR APP"
```

### Flask

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

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

# Setup a flask 'app' as normal

## Attaches 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"
```

For full installation instructions, including information on configuring Scout via environment variables, see our [Python docs](http://help.apm.scoutapp.com/#python-agent).

## Documentation
Expand Down

0 comments on commit 788adcc

Please sign in to comment.