startstop


Namestartstop JSON
Version 1.0.7 PyPI version JSON
download
home_pageNone
SummaryStart and stop a python profiler
upload_time2023-05-22 08:39:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords profiler simple
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # startstop

A simple way to start and stop a Python profiler ([pyinstument](https://github.com/joerick/pyinstrument)) and view the results in the browser.

[![PyPI - Version](https://img.shields.io/pypi/v/startstop.svg)](https://pypi.org/project/startstop)

-----

## Installation

```console
pip install startstop
```

## Usage

```python
from startstop import t, tc, p, pc
```

### Simple timer

```python
t()
# This is where your code goes.
t()
```

TIMER: 0.024 sec

```python
t(label="your label", precision=2)
# This is where your code goes.
t()
```

TIMER your label: 0.02 sec

### Simple timer as contex manager

```python
with tc():
    # This is where your code goes.
```

TIMER: 0.024 sec

```python
with tc(label="your label", precision=2):
    # This is where your code goes.
```

TIMER your label: 0.02 sec

### Profiler

```python
p()
# This is where your code goes.
p()
```

--> Browser output

```python
p(interval=0.01, async_mode="disabled")
# This is where your code goes.
p()
```

--> Browser output

### Profiler as context manager

```python
with pc():
    # This is where your code goes.
```

--> Browser output

```python
with pc(interval=0.002, async_mode="strict"):
    # This is where your code goes.
```

--> Browser output

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "startstop",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "profiler,simple",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/bb/c9/b794ecbef298ec5a3118b5a440c395b76276b2d3ed11c72efa0571698c29/startstop-1.0.7.tar.gz",
    "platform": null,
    "description": "# startstop\n\nA simple way to start and stop a Python profiler ([pyinstument](https://github.com/joerick/pyinstrument)) and view the results in the browser.\n\n[![PyPI - Version](https://img.shields.io/pypi/v/startstop.svg)](https://pypi.org/project/startstop)\n\n-----\n\n## Installation\n\n```console\npip install startstop\n```\n\n## Usage\n\n```python\nfrom startstop import t, tc, p, pc\n```\n\n### Simple timer\n\n```python\nt()\n# This is where your code goes.\nt()\n```\n\nTIMER: 0.024 sec\n\n```python\nt(label=\"your label\", precision=2)\n# This is where your code goes.\nt()\n```\n\nTIMER your label: 0.02 sec\n\n### Simple timer as contex manager\n\n```python\nwith tc():\n    # This is where your code goes.\n```\n\nTIMER: 0.024 sec\n\n```python\nwith tc(label=\"your label\", precision=2):\n    # This is where your code goes.\n```\n\nTIMER your label: 0.02 sec\n\n### Profiler\n\n```python\np()\n# This is where your code goes.\np()\n```\n\n--> Browser output\n\n```python\np(interval=0.01, async_mode=\"disabled\")\n# This is where your code goes.\np()\n```\n\n--> Browser output\n\n### Profiler as context manager\n\n```python\nwith pc():\n    # This is where your code goes.\n```\n\n--> Browser output\n\n```python\nwith pc(interval=0.002, async_mode=\"strict\"):\n    # This is where your code goes.\n```\n\n--> Browser output\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Start and stop a python profiler",
    "version": "1.0.7",
    "project_urls": {
        "homepage": "https://github.com/1081/startstop"
    },
    "split_keywords": [
        "profiler",
        "simple"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f73245785b69f5ae52c3f860db5bb98021b6b8bfc90f9017cfde84f164d9141b",
                "md5": "a17d26a184248c90d591f263936fe005",
                "sha256": "bed2beed4d5c3cf99c3ad6038c5c79c87b096eda243c4de7267ab1598e160e3c"
            },
            "downloads": -1,
            "filename": "startstop-1.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a17d26a184248c90d591f263936fe005",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 2994,
            "upload_time": "2023-05-22T08:39:47",
            "upload_time_iso_8601": "2023-05-22T08:39:47.770976Z",
            "url": "https://files.pythonhosted.org/packages/f7/32/45785b69f5ae52c3f860db5bb98021b6b8bfc90f9017cfde84f164d9141b/startstop-1.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bbc9b794ecbef298ec5a3118b5a440c395b76276b2d3ed11c72efa0571698c29",
                "md5": "9aec002c4c6a1234de266acbc1e4a686",
                "sha256": "48843864d127f749716d085a5b1cd6620d32b8815c5c7c72483a3fd710e8435c"
            },
            "downloads": -1,
            "filename": "startstop-1.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "9aec002c4c6a1234de266acbc1e4a686",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3804,
            "upload_time": "2023-05-22T08:39:50",
            "upload_time_iso_8601": "2023-05-22T08:39:50.187868Z",
            "url": "https://files.pythonhosted.org/packages/bb/c9/b794ecbef298ec5a3118b5a440c395b76276b2d3ed11c72efa0571698c29/startstop-1.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-22 08:39:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "1081",
    "github_project": "startstop",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "startstop"
}
        
Elapsed time: 0.08530s