.. image:: images/logo.png :align: center .. raw:: html

Python wrapper for Austin, the frame stack sampler for CPython

GitHub Actions: Tests Travis CI Codecov Documentation
PyPI Downloads
LICENSE

This Python package is a wrapper around `Austin `_, the CPython frame stack sampler. You can use the classes provided by this package to quickly integrate or extend Austin's statistical profiling capabilities with Python to suit all your needs. In most cases you should be able to use one of the wrapper classes that are provided with this package out of the box. All you have to do is focus on your business logic while the classes take care of the boilerplate code to start Austin in the background and collect samples from it. You can choose from either a thread-based or an asyncio-based interface, depending on your preference. The section on :ref:`wrapper_classes` provides more details as well as some basic examples on how to use each of them. To assist you with the development of command-line tools that leverage the profiling capabilities of Austin, the package also provides the ``austin.cli`` sub-module. There you can find the :class:`austin.cli.AustinArgumentParser``, which is a sub-class of ``argparse.ArgumentParser``. If you want to customise it to meet your needs, simply sub-class it and tweak it as discused in :ref:`cli`. Finally, when you install this package, you also get the ``austin-compress``, ``austin2speedscope`` and ``austin2pprof`` command line tools. The first allows you to compress the raw samples collected by Austin by performing aggregation of the metrics; the others allow you to convert Austin samples to the `Speedscope `_ and the Google `pprof `_ formats respectively. Note that `Speedscope `_ can also handle the output generated by Austin directly (see `Importing from custom sources `_ for details). .. toctree:: :maxdepth: 2 :caption: Contents: wrapper_classes stats cli Indices and tables ================== * :ref:`genindex` * :ref:`search`