The blackfire-python command is being installed along with the Blackfire pip package. It can be used to enable the Probe automatically when a profile is requested, without modifying your code.

No profile is triggered automatically with this command.

blackfire-python currently supports:

  • Django
  • Flask
  • Odoo

To ensure that your application listens to profile requests, you need to run your webserver through blackfire-python command.

Example with Django development server:

blackfire-python python runserver

Example with Django using gunicorn:

blackfire-python gunicorn myapp.wsgi

To be able to run CLI commands and profile them, you need to use blackfire-python run command:

blackfire-python run python