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 details)

Uploaded Source

File details

Details for the file pyramid_analytics-0.1.2.tar.gz.

File metadata

File hashes

Hashes for pyramid_analytics-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5e50fdd4a3a1eec643954055b553d5e90e8534de738956fe99f2ef883e78b517
MD5 86435df03c10c897308e43dd6dbfd0b4
BLAKE2b-256 4f4a3f4eedee2abbb1fc9975a525ff04205566b3e5e0cc6d3f2f70675540fef0

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