bio package provides utilities for profiling python code.
pip install bio
import bio @bio.profile() def my_functon(): # Do stuff here
@bio.profile() decorator with no arguments will simply print
the output to
stdout. Alternatively, you can provide the file location
for the profiler output.
@bio.profile("/path/to/file.prof") def my_functon(): # Do stuff here
In the example shown above, the output will be written to both
and the given file location. If you would prefer not to write to
you can use the
@bio.profile("/path/to/file.prof", quiet=True) def my_functon(): # Do stuff here
import bio with bio.profiler("/path/to/file.prof"): # Do stuff here
Bio uses tox for testing. To run the tests, simply do:
The configuration for tox can be found in the tox.ini file. Bio uses pytest as the preferred testing framework. Prior to running the tests, tox will execute an auto-formatting tool called black. After the tests have completed, tox will create the coverage badge (shown at the top of this page) using the coverage_badge tool.