Skip to main content

Statismo

Statismo is minimal collector of custom metrics for django applications. It aggregates statistics into a configurable backend before periodically pushing them to an external service such as Cloudwatch.

Currently, supports the following backends:

  • Django's database
  • Redis

And the following services:

  • AWS Cloudwatch

Installation

To install statismo, simply run:

pip install statismo

To use statismo with redis:

pip install statismo[redis]

Configuration

Add statismo to your INSTALLED_APPS setting:

INSTALLED_APPS = [
    ...,
    'statismo',
]

Add the following settings to your settings.py to use the django database collector, which is suitable for small to medium-sized applications:

STATISMO_METRIC_COLLECTOR = 'statismo.collectors.db.DatabaseCollector'

For larger applications, you may want to use the Redis collector:

STATISMO_METRIC_COLLECTOR = 'statismo.collectors.redis.RedisCollector'
STATISMO_METRIC_URL = 'redis://localhost:6379/0'

Finally, to use a custom namespace for your metrics other than the default of statismo, add the following setting:

STATISMO_METRIC_NAMESPACE = 'myapp'

Finally, the periodic task that uploads metrics needs to be enabled. If you're using Celery's django integration, this can be done by adding the following to your settings.py:

CELERY_BEAT_SCHEDULE = {
    "accumulate-metrics-every-5-minutes": {
        "task": "statismo.tasks.accumulate_metrics",
        "schedule": 60 * 5,
    }
}

Download files

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

Source Distribution

statismo-0.1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

statismo-0.1.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file statismo-0.1.1.tar.gz.

File metadata

  • Download URL: statismo-0.1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.7

File hashes

Hashes for statismo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1cda180937ed33b8c34f7faf374ff62bb71672e57d6e959f439f6d518a620602
MD5 bbb12e7c764729e24155b1ddef5f405a
BLAKE2b-256 5d5e5b845a0fb03bbbc180354858ac9972796fe39ab3412e519f38e6bf705c19

See more details on using hashes here.

File details

Details for the file statismo-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: statismo-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.7

File hashes

Hashes for statismo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44fa6d12dadfa154208ddba448151778fb56ef6a4d43b74976254340658d1596
MD5 0db344ebcded58bd3498d698a79b0b97
BLAKE2b-256 6e42cccb84350f043d37a88c95bed47bf80c707e09a717df231e6120b036841f

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 Sentry Error logging StatusPage Status page