Skip to main content

Segment.io wrapper for the Pyramid Web Framework

Project description

pyramid_analytics
=================

Segment.io initializer for the Pyramid Web Framework. 100% Test Covered.

- The following configuration options are required in your config.ini::

pyramid.includes =
pyramid_analytics

analytics.secret = mysekret
analytics.flush_at = 20
analytics.flush_after = 10
analytics.async = True
analytics.send = True
analytics.max_queue_size = 100000

- ``flush_after`` specifies after how much time (in seconds) of no flushing
that the server will flush. Used in conjunction with the flush_at size
policy.

- To manage the ``log_level`` and ``log`` options specified by Segment.io's
analytics-python, you should set the following configuration in your .ini
file::

[logger_analytics]
level = WARN
handlers = console # The config needs to include this handler
qualname = analytics
propagate = 0 # This "disables" logging
formatter = generic # The config needs to include this formatter

Additionally, you'll want to register this logger:

- Under the hood, analytics-python turns logging "off" by setting the logging
level to ``CRITICAL``. Setting ``propagate = 0`` is perhaps a more elegant
solution.

- All other options are detailed at url: https://segment.io/libraries/python


0.1.2 (2013-07-02)
------------

- Relying on Pyramid's asbool helper for more robust boolean detection.


0.1 (2013-07-01)
------------

- Allow for the following segment.io configuration options:
``secret``,
``flush_at``,
``flush_after``,
``async``,
``send``,
``max_queue_size``

- Logging configuration is also supported

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

pyramid_analytics-0.1.2.tar.gz (4.5 kB view hashes)

Uploaded Source

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