blackfire-python

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.

Note

No profile is triggered automatically with this command.

Supported Frameworks

blackfire-python currently supports:

  • Django
  • Flask

Usage with HTTP Servers

In order 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 manage.py runserver

Example with Django using gunicorn:

blackfire-python gunicorn myapp.wsgi

Usage with CLI Commands

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

blackfire-python run python my_command.py