kepler-lib


Namekepler-lib JSON
Version 0.1 PyPI version JSON
download
home_pageNone
SummaryFast, easy, pretty and readable program instrumentation.
upload_time2024-08-27 20:47:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseCopyright 2024 Stef Lindall, License BSD-3-Clause
keywords async asyncio instrument instrumentation profile rich
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Kepler

Wish you could see stuff like this about your program?

<img width="1227" alt="image" src="https://github.com/user-attachments/assets/aa60de68-2648-4794-a29c-873365bc077b">


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

```bash
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:

```python
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()
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "kepler-lib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "async, asyncio, instrument, instrumentation, profile, rich",
    "author": null,
    "author_email": "Stef Lindall <bethebunny@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/2d/bd/1244990d7574f93dbd1cbce7d13b244a897fca167243372355036b27658e/kepler_lib-0.1.tar.gz",
    "platform": null,
    "description": "# Kepler\n\nWish you could see stuff like this about your program?\n\n<img width=\"1227\" alt=\"image\" src=\"https://github.com/user-attachments/assets/aa60de68-2648-4794-a29c-873365bc077b\">\n\n\nKepler meticulously tracks your program, and creates simply and easily readable reports to help you understand what they're doing.\n\nKepler _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.\n\n## Installing Kepler\n\n```bash\npip install kepler\n```\n\n## Kepler in action\n\nThe 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.\n\nHere's the script that produced the screenshot above:\n\n```python\nimport kepler, random, time\n\n@kepler.time(\"do some stuff\")\ndef do_some_stuff():\n    split = kepler.stopwatch(\"watch\")\n    for i in kepler.time(\"loop\", range(20)):\n        with kepler.time(\"sleep\"):\n            time.sleep(random.random() / 100)\n        if i % 2 == 1:\n            with kepler.time(\"overhead\"):\n                split(\"odd\")\n        else:\n            with kepler.time(\"overhead\"):\n                split(\"even\")\n\n@kepler.time\ndef main():\n    with kepler.time(\"sloooow\"):\n        time.sleep(0.3)\n    do_some_stuff()\n\nmain\nkepler.report()\n```\n",
    "bugtrack_url": null,
    "license": "Copyright 2024 Stef Lindall, License BSD-3-Clause",
    "summary": "Fast, easy, pretty and readable program instrumentation.",
    "version": "0.1",
    "project_urls": {
        "Changelog": "https://github.com/bethebunny/kepler/releases",
        "Documentation": "https://bethebunny.github.io/kepler",
        "Homepage": "https://bethebunny.github.io/kepler",
        "Issues": "https://github.com/bethebunny/kepler/issues",
        "Repository": "https://github.com/bethebunny/kepler"
    },
    "split_keywords": [
        "async",
        " asyncio",
        " instrument",
        " instrumentation",
        " profile",
        " rich"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "84f451aa4d5ee137173ee560ab12b82ef7dbed3ac57c8509aa5876bf83692bf1",
                "md5": "b155b558d82800f57cccde7aebd1615c",
                "sha256": "dcc401669cd6f1c07a5c1f2a458f28386b1bed2a8886de8c8a9be433d0a2c4aa"
            },
            "downloads": -1,
            "filename": "kepler_lib-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b155b558d82800f57cccde7aebd1615c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6420,
            "upload_time": "2024-08-27T20:47:27",
            "upload_time_iso_8601": "2024-08-27T20:47:27.865060Z",
            "url": "https://files.pythonhosted.org/packages/84/f4/51aa4d5ee137173ee560ab12b82ef7dbed3ac57c8509aa5876bf83692bf1/kepler_lib-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2dbd1244990d7574f93dbd1cbce7d13b244a897fca167243372355036b27658e",
                "md5": "ec1dc9b3c398a524f3af71a168517aef",
                "sha256": "84d71bac84c5c63eb364d6a03d9a62b2f40f265af129898774c8c7f84a53c6a3"
            },
            "downloads": -1,
            "filename": "kepler_lib-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ec1dc9b3c398a524f3af71a168517aef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6248,
            "upload_time": "2024-08-27T20:47:29",
            "upload_time_iso_8601": "2024-08-27T20:47:29.089259Z",
            "url": "https://files.pythonhosted.org/packages/2d/bd/1244990d7574f93dbd1cbce7d13b244a897fca167243372355036b27658e/kepler_lib-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-27 20:47:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bethebunny",
    "github_project": "kepler",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "kepler-lib"
}
        
Elapsed time: 4.85555s