Skip to main content

Kepler

Wish you could see stuff like this about your program?

image

Kepler meticulously tracks your program, and creates simply and easily readable reports to help you understand what they're doing.

Kepler is not a replacement for a good profiling tool, nor is it necessarily a great production implementation tool. Kepler is designed to be that go-to tool in your toolbelt for quick and dirty measurements of your programs.

Installing Kepler

pip install kepler

Kepler in action

The first thing you should do with Kepler is annotate a function or two you want to time with @kepler.time, and then add a kepler.report() call to your amin function.

Here's the script that produced the screenshot above:

import kepler, random, time

@kepler.time("do some stuff")
def do_some_stuff():
    split = kepler.stopwatch("watch")
    for i in kepler.time("loop", range(20)):
        with kepler.time("sleep"):
            time.sleep(random.random() / 100)
        if i % 2 == 1:
            with kepler.time("overhead"):
                split("odd")
        else:
            with kepler.time("overhead"):
                split("even")

@kepler.time
def main():
    with kepler.time("sloooow"):
        time.sleep(0.3)
    do_some_stuff()

main
kepler.report()

Metadata

Release files for kepler-lib 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kepler-lib 0.1
File Size Uploaded
kepler_lib-0.1.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kepler-lib 0.1
File Interpreter ABI Platform
kepler_lib-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / kepler_lib-0.1.tar.gz

Download URL kepler_lib-0.1.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
84d71bac84c5c63eb364d6a03d9a62b2f40f265af129898774c8c7f84a53c6a3
BLAKE2b-256 checksum
How to use checksums
2dbd1244990d7574f93dbd1cbce7d13b244a897fca167243372355036b27658e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.8

Release files / kepler_lib-0.1-py3-none-any.whl

Download URL kepler_lib-0.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcc401669cd6f1c07a5c1f2a458f28386b1bed2a8886de8c8a9be433d0a2c4aa
BLAKE2b-256 checksum
How to use checksums
84f451aa4d5ee137173ee560ab12b82ef7dbed3ac57c8509aa5876bf83692bf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page