<p align="center">
<br>
<img width="320px" src="art/logo.png" alt="Austin Web">
<br>
</p>
<h3 align="center">A Modern Web Interface for Austin</h3>
<p align="center">
<img src="https://upload.wikimedia.org/wikipedia/commons/3/3a/Tux_Mono.svg"
height="24px" />
<img src="https://upload.wikimedia.org/wikipedia/commons/f/fa/Apple_logo_black.svg"
height="24px" />
<img src="https://upload.wikimedia.org/wikipedia/commons/2/2b/Windows_logo_2012-Black.svg"
height="24px" />
</p>
<p align="center">
<a href="https://github.com/P403n1x87/austin-web/actions?workflow=Tests">
<img src="https://github.com/P403n1x87/austin-web/workflows/Tests/badge.svg"
alt="GitHub Actions: Tests">
</a>
<a href="https://travis-ci.com/P403n1x87/austin-web">
<img src="https://travis-ci.com/P403n1x87/austin-web.svg?token=fzW2yzQyjwys4tWf9anS"
alt="Travis CI">
</a>
<a href="https://codecov.io/gh/P403n1x87/austin-web">
<img src="https://codecov.io/gh/P403n1x87/austin-web/branch/master/graph/badge.svg"
alt="Codecov">
</a>
<a href="https://pypi.org/project/austin-web/">
<img src="https://img.shields.io/pypi/v/austin-web.svg"
alt="PyPI">
</a>
<a href="https://github.com/P403n1x87/austin-web/blob/master/LICENSE.md">
<img src="https://img.shields.io/badge/license-GPLv3-ff69b4.svg"
alt="LICENSE">
</a>
</p>
<p align="center">
<a href="#synopsis"><b>Synopsis</b></a> •
<a href="#installation"><b>Installation</b></a> •
<a href="#usage"><b>Usage</b></a> •
<a href="#compatibility"><b>Compatibility</b></a> •
<a href="#contribute"><b>Contribute</b></a>
</p>
<p align="center">
<a href="https://www.buymeacoffee.com/Q9C1Hnm28"
target="_blank">
<img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png"
alt="Buy Me A Coffee" />
</a>
</p>
# Synopsis
Austin Web is a modern web interface for [Austin], the frame stack sampler for
CPython, based on [D3.js] and [tailwindcss]. It is yet another example of how to
use Austin to make a visual profiling tool for Python. The flame graph is
generated using [d3-flame-graph].
<p align="center">
<img src="art/austin-web-serve.gif"
style="box-shadow: #111 0px 0px 16px;" />
</p>
Austin Web offers two main functionalities. The default one is to serve a web
page that allows you to have a live view of the metrics collected by Austin. The
visualisation is a _live_ flame graph in your browser that refreshes every 3
seconds with newly collected data. Hence, Austin Web can also be used for
_remote_ profiling.
You can also run Austin Web in _compile_ mode to generate a static flame graph
HTML page, much like [flamegraph.pl], but with the full Austin Web UI around it.
# Installation
Austin Web can be installed from PyPI simply with
~~~ bash
pipx install austin-web
~~~
> **NOTE** Austin Web relies on the
> [Austin] binary being available from the `PATH` environment variable. So make
> sure that Austin is properly installed on your system. See [Austin
> installation](https://github.com/P403n1x87/austin#installation) instruction
> for more details on how to get Austin installed on your platform.
# Usage
You can run Austin Web simply with
~~~ bash
austin-web python myscript.py
~~~
to start serving on localhost over an ephemeral port. If `myscript.py` is an
executable script, you can simply do
~~~ bash
austin-web myscript.py
~~~
If you want to specify the host and the port, you can pass the `--host` and
`--port` options to the command line. For example, to serve for the World on
port 5050, use
~~~ bash
austin-web --host 0.0.0.0 --port 5050 python myscript.py
~~~
If you want to compile the collected metrics into a static HTML page, you can
run Austin Web in compile mode by passing the `--compile` option, followed by
the destination file name, e.g.
~~~ bash
austin-web --compile output.html python myscript.py
~~~
Like Austin, you can use Austin Web to profile any running Python application.
For example, to profile a WSGI server and all its child processes, get hold of
its PID and do
~~~ bash
sudo austin-web -Cp <pid>
~~~
# Compatibility
Austin Web has been tested with Python 3.9-3.12 and is known to work on
**Linux**, **MacOS** and **Windows**.
Austin Web is known to have some minor issues on Windows. When started in serve
mode, pressing `Ctrl+C` might not actually stop Austin Web.
Since Austin Web uses Austin to collect samples, the same note applies here:
> Attaching to a running process in Python requires the `cap_systrace`
> capability. To avoid running Austin Web with `sudo`, consider setting it to
> the Austin binary with, e.g.
>
> ~~~ bash
> sudo setcap cap_sys_ptrace+ep `which austin`
> ~~~
> Due to the **System Integrity Protection** introduced in **MacOS** with El
> Capitan, Austin cannot profile Python processes that use an executable located
> in the `/bin` folder, even with `sudo`. Hence, either run the interpreter from
> a virtual environment or use a Python interpreter that is installed in, e.g.,
> `/Applications` or via `brew` with the default prefix (`/usr/local`). Even in
> these cases, though, the use of `sudo` is required.
# Contribute
If you want to help with the development, then have a look at the open issues
and have a look at the [contributing guidelines](CONTRIBUTING.md) before you
open a pull request.
You can also contribute to the development of the Austin Web by becoming a
sponsor and/or by [buying me a coffee](https://www.buymeacoffee.com/Q9C1Hnm28)
on BMC or by chipping in a few pennies on
[PayPal.Me](https://www.paypal.me/gtornetta/1).
<p align="center">
<a href="https://www.buymeacoffee.com/Q9C1Hnm28"
target="_blank">
<img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png"
alt="Buy Me A Coffee" />
</a>
</p>
[Austin]: https://github.com/P403n1x87/austin
[D3.js]: https://d3js.org/
[d3-flame-graph]: https://github.com/spiermar/d3-flame-graph
[flamegraph.pl]: https://github.com/brendangregg/FlameGraph
[tailwindcss]: https://tailwindcss.com/
Raw data
{
"_id": null,
"home_page": null,
"name": "austin-web",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "development,performance,profiling,testing",
"author": null,
"author_email": "\"Gabriele N. Tornetta\" <phoenix1987@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/b6/db/6d25fa8436f5b677e14ba84ef955567f93f496c9dc72fc5cb6e568ee915c/austin_web-0.3.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <br>\n <img width=\"320px\" src=\"art/logo.png\" alt=\"Austin Web\">\n <br>\n</p>\n\n<h3 align=\"center\">A Modern Web Interface for Austin</h3>\n\n<p align=\"center\">\n <img src=\"https://upload.wikimedia.org/wikipedia/commons/3/3a/Tux_Mono.svg\"\n height=\"24px\" />\n \n <img src=\"https://upload.wikimedia.org/wikipedia/commons/f/fa/Apple_logo_black.svg\"\n height=\"24px\" />\n \n <img src=\"https://upload.wikimedia.org/wikipedia/commons/2/2b/Windows_logo_2012-Black.svg\"\n height=\"24px\" />\n</p>\n\n<p align=\"center\">\n <a href=\"https://github.com/P403n1x87/austin-web/actions?workflow=Tests\">\n <img src=\"https://github.com/P403n1x87/austin-web/workflows/Tests/badge.svg\"\n alt=\"GitHub Actions: Tests\">\n </a>\n <a href=\"https://travis-ci.com/P403n1x87/austin-web\">\n <img src=\"https://travis-ci.com/P403n1x87/austin-web.svg?token=fzW2yzQyjwys4tWf9anS\"\n alt=\"Travis CI\">\n </a>\n <a href=\"https://codecov.io/gh/P403n1x87/austin-web\">\n <img src=\"https://codecov.io/gh/P403n1x87/austin-web/branch/master/graph/badge.svg\"\n alt=\"Codecov\">\n </a>\n <a href=\"https://pypi.org/project/austin-web/\">\n <img src=\"https://img.shields.io/pypi/v/austin-web.svg\"\n alt=\"PyPI\">\n </a>\n <a href=\"https://github.com/P403n1x87/austin-web/blob/master/LICENSE.md\">\n <img src=\"https://img.shields.io/badge/license-GPLv3-ff69b4.svg\"\n alt=\"LICENSE\">\n </a>\n</p>\n\n<p align=\"center\">\n <a href=\"#synopsis\"><b>Synopsis</b></a> •\n <a href=\"#installation\"><b>Installation</b></a> •\n <a href=\"#usage\"><b>Usage</b></a> •\n <a href=\"#compatibility\"><b>Compatibility</b></a> •\n <a href=\"#contribute\"><b>Contribute</b></a>\n</p>\n\n<p align=\"center\">\n <a href=\"https://www.buymeacoffee.com/Q9C1Hnm28\"\n target=\"_blank\">\n <img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\"\n alt=\"Buy Me A Coffee\" />\n </a>\n</p>\n\n# Synopsis\n\nAustin Web is a modern web interface for [Austin], the frame stack sampler for\nCPython, based on [D3.js] and [tailwindcss]. It is yet another example of how to\nuse Austin to make a visual profiling tool for Python. The flame graph is\ngenerated using [d3-flame-graph].\n\n<p align=\"center\">\n <img src=\"art/austin-web-serve.gif\"\n style=\"box-shadow: #111 0px 0px 16px;\" />\n</p>\n\nAustin Web offers two main functionalities. The default one is to serve a web\npage that allows you to have a live view of the metrics collected by Austin. The\nvisualisation is a _live_ flame graph in your browser that refreshes every 3\nseconds with newly collected data. Hence, Austin Web can also be used for\n_remote_ profiling.\n\nYou can also run Austin Web in _compile_ mode to generate a static flame graph\nHTML page, much like [flamegraph.pl], but with the full Austin Web UI around it.\n\n\n# Installation\n\nAustin Web can be installed from PyPI simply with\n\n~~~ bash\npipx install austin-web\n~~~\n\n> **NOTE** Austin Web relies on the\n> [Austin] binary being available from the `PATH` environment variable. So make\n> sure that Austin is properly installed on your system. See [Austin\n> installation](https://github.com/P403n1x87/austin#installation) instruction\n> for more details on how to get Austin installed on your platform.\n\n\n# Usage\n\nYou can run Austin Web simply with\n\n~~~ bash\naustin-web python myscript.py\n~~~\n\nto start serving on localhost over an ephemeral port. If `myscript.py` is an\nexecutable script, you can simply do\n\n~~~ bash\naustin-web myscript.py\n~~~\n\nIf you want to specify the host and the port, you can pass the `--host` and\n`--port` options to the command line. For example, to serve for the World on\nport 5050, use\n\n~~~ bash\naustin-web --host 0.0.0.0 --port 5050 python myscript.py\n~~~\n\nIf you want to compile the collected metrics into a static HTML page, you can\nrun Austin Web in compile mode by passing the `--compile` option, followed by\nthe destination file name, e.g.\n\n~~~ bash\naustin-web --compile output.html python myscript.py\n~~~\n\nLike Austin, you can use Austin Web to profile any running Python application.\nFor example, to profile a WSGI server and all its child processes, get hold of\nits PID and do\n\n~~~ bash\nsudo austin-web -Cp <pid>\n~~~\n\n\n# Compatibility\n\nAustin Web has been tested with Python 3.9-3.12 and is known to work on\n**Linux**, **MacOS** and **Windows**.\n\nAustin Web is known to have some minor issues on Windows. When started in serve\nmode, pressing `Ctrl+C` might not actually stop Austin Web.\n\nSince Austin Web uses Austin to collect samples, the same note applies here:\n\n> Attaching to a running process in Python requires the `cap_systrace`\n> capability. To avoid running Austin Web with `sudo`, consider setting it to\n> the Austin binary with, e.g.\n>\n> ~~~ bash\n> sudo setcap cap_sys_ptrace+ep `which austin`\n> ~~~\n\n> Due to the **System Integrity Protection** introduced in **MacOS** with El\n> Capitan, Austin cannot profile Python processes that use an executable located\n> in the `/bin` folder, even with `sudo`. Hence, either run the interpreter from\n> a virtual environment or use a Python interpreter that is installed in, e.g.,\n> `/Applications` or via `brew` with the default prefix (`/usr/local`). Even in\n> these cases, though, the use of `sudo` is required.\n\n\n# Contribute\n\nIf you want to help with the development, then have a look at the open issues\nand have a look at the [contributing guidelines](CONTRIBUTING.md) before you\nopen a pull request.\n\nYou can also contribute to the development of the Austin Web by becoming a\nsponsor and/or by [buying me a coffee](https://www.buymeacoffee.com/Q9C1Hnm28)\non BMC or by chipping in a few pennies on\n[PayPal.Me](https://www.paypal.me/gtornetta/1).\n\n<p align=\"center\">\n <a href=\"https://www.buymeacoffee.com/Q9C1Hnm28\"\n target=\"_blank\">\n <img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\"\n alt=\"Buy Me A Coffee\" />\n </a>\n</p>\n\n\n[Austin]: https://github.com/P403n1x87/austin\n[D3.js]: https://d3js.org/\n[d3-flame-graph]: https://github.com/spiermar/d3-flame-graph\n[flamegraph.pl]: https://github.com/brendangregg/FlameGraph\n[tailwindcss]: https://tailwindcss.com/\n",
"bugtrack_url": null,
"license": null,
"summary": "Flame graph web application for Austin",
"version": "0.3.0",
"project_urls": {
"documentation": "https://austin-web.readthedocs.io",
"homepage": "https://github.com/P403n1x87/austin-web",
"issues": "https://github.com/P403n1x87/austin-web/issues",
"repository": "https://github.com/P403n1x87/austin-web"
},
"split_keywords": [
"development",
"performance",
"profiling",
"testing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "00574ef0f35abc94322a504aee8f027f8c7526f75833b6ae5fcaf7a8e0569732",
"md5": "4e45c5d57d5a680157954f4a1534c54a",
"sha256": "b766fd0df65760814c500f2942a764dd4f1c8478d221fc33fc631b9b7aff0f96"
},
"downloads": -1,
"filename": "austin_web-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4e45c5d57d5a680157954f4a1534c54a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 33588,
"upload_time": "2024-02-19T12:10:22",
"upload_time_iso_8601": "2024-02-19T12:10:22.652211Z",
"url": "https://files.pythonhosted.org/packages/00/57/4ef0f35abc94322a504aee8f027f8c7526f75833b6ae5fcaf7a8e0569732/austin_web-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b6db6d25fa8436f5b677e14ba84ef955567f93f496c9dc72fc5cb6e568ee915c",
"md5": "27a41a289dd42b10b03c6838f509588f",
"sha256": "091f06e468052351c61b0fffdc5c12b6894a95d579049c740aff2c53fc3817d8"
},
"downloads": -1,
"filename": "austin_web-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "27a41a289dd42b10b03c6838f509588f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 1047383,
"upload_time": "2024-02-19T12:10:24",
"upload_time_iso_8601": "2024-02-19T12:10:24.335850Z",
"url": "https://files.pythonhosted.org/packages/b6/db/6d25fa8436f5b677e14ba84ef955567f93f496c9dc72fc5cb6e568ee915c/austin_web-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-19 12:10:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "P403n1x87",
"github_project": "austin-web",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "austin-web"
}