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!

Octopus Energy Python service utilities

Project Description
# xocto - utilities for Python services

This repo houses various shared utilities for Python services at Octopus Energy.

CI status:


PyPI detail page:

## Functionality

### Event publishing

Use `events.publish` to publish application events. These will be logged as JSON
to a logger named "events".

Sample usage:

from xocto import events

'name': 'Barry Chuckle',
'quote_id': 'xyz123',
'account_id': 'A-12312345'
account=account, # optional
request=request, # optional

### Event timing

Time events using:

from xocto import events

with events.Timer() as t:
# do some things

"duration_in_ms": t.duration_in_ms

## Contributing

Create and activate a virtualenv then:

$ make

Test package with:

$ make test


$ make lint

## Release new version

Release to PyPI by:

1. Bumping the version in ``

2. Updating ``

3. Committing

$ git commit -am "Bump version to v..."

4. Running:

$ make publish

Release History

Release History

This version
History Node


History Node


History Node


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
xocto-1.2-py2.py3-none-any.whl (6.8 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jan 8, 2018

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