Skip to main content

Octopus Energy Python service utilities

Project description

# xocto - utilities for Python services

This repo houses various shared utilities for Python services.

CI status:


## 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 to PyPI by:

1. Bumping the version in ``

2. Updating ``

3. Committing

3. Running:

$ make publish

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
xocto-1.0.2-py2.py3-none-any.whl (5.6 kB) Copy SHA256 hash SHA256 Wheel py2.py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page