Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A Python implementation of the SwiftyBeaver Platform.

Project Description
<p align="center"><img src="" width="280" alt="SwiftyBeaver"><br/><b>Colorful</b>, extensible, <b>lightweight</b> logging for Swift 2 & 3 as well as Python 2 & 3.<br/>Great for <b>servers</b> with support for cloud platforms.
<a href="">Swift Version</a> |
<a href="">Docs</a> |
<a href="">Website</a> |
<a href="">Slack</a> |
<a href="">Twitter</a> |
<a href="">License</a>

<p align="center">
[![Language Swift 2](]( [![Slack Status](](

Conveniently log to the SwiftyBeaver Platform using the built-in Python logging library.

## Installation

Simply install SwiftyBeaver using `pip`:

$ pip install swiftybeaver

Or use `` after downloading it manually:

$ python install

## Usage

SwiftyBeaver can be used just as any other Python logging handler:

import logging
from swiftybeaver import SwiftyBeaverHandler

sb_handler = SwiftyBeaverHandler('hThdK', 'sdfa...s3mx', 'dsgb...ghdX')
log = logging.Logger(__name__)

log.verbose("not so important") // prio 1, VERBOSE in silver
log.debug("something to debug") // prio 2, DEBUG in green"a nice information") // prio 3, INFO in blue
log.warning("oh no, that won’t be good") // prio 4, WARNING in yellow
log.error("ouch, an error did occur!") // prio 5, ERROR in red

This logging handler sends logging events to the SwiftyBeaver Platform, which allows for viewing logs in it's OS X app and consuming via API. To learn more about SwiftyBeaver, visit the [main repository]( and the [website](

SwiftyBeaverHandler(app_id, app_secret, encryption_key, device=device)

In order to successfully authenticate with the API, `app_id` and `app_secret` have to be provided during initialization. Additionally, `encryption_key` - the key used to encrypt the log entries - is required. `device` is an optional `dict` that should conform to the specification at If it is omitted, a mock device will be used.

Please note that logs are transferred AES256CBC-encrypted and, unless configured otherwise, not after every log event. Each log record is associated with a certain number of points, depending on the log level. Log records will then be sent if the collected points are at least `minimum_threshold`. This system is in playe in order to prevent to many API calls during a short time.

## Testing

Run SwiftyBeaver unit tests using ``:

$ python test

## General Documentation

**Getting Started:**

- [Features](
- [Installation](
- [Basic Setup](

**Logging Destinations:**

- [Colored Logging to Xcode Console](
- [Colored Logging to File](
- [Encrypted Logging & Analytics to SwiftyBeaver Platform](

**Stay Informed:**

- [Official Website](
- [Medium Blog](
- [On Twitter](

More destination & system documentation is coming soon!
Get support via Github Issues, email and [public Slack channel](

## License

SwiftyBeaver for Python is released under the [MIT License](
Release History

Release History

This version
History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
SwiftyBeaver-0.1-py2.py3-none-any.whl (11.9 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel May 12, 2016
SwiftyBeaver-0.1.tar.gz (7.2 kB) Copy SHA256 Checksum SHA256 Source May 12, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting