Skip to main content

CodeScope agent for Python

Project description


Python agent for CodeScope


pip install codescope


First, get an API key from CodeScope.

Then, prefix your startup command with codescope-run:

codescope-run -k $APIKEY python run
codescope-run -k $APIKEY gunicorn myapp.wsgi
codescope-run -k $APIKEY python -m unittest discover


Flag Required? Default Description Environment variable
-k, --apikey Y API key tog use when sending data to CodeScope $CODESCOPE_APIKEY
-n, --name N default Service name to use when sending data to CodeScope $CODESCOPE_SERVICE
-c, --commit N $(git rev-parse HEAD) Commit hash to use when sending data to CodeScope $CODESCOPE_COMMIT_SHA
-r, --repository N Looked up automatically Repository ID to use when sending data to CodeScope $CODESCOPE_REPOSITORY
--root N $(git rev-parse --show-toplevel) Repository root path $CODESCOPE_SOURCE_ROOT

Advanced usage

If the above doesn't work for your specific setup, you can also install CodeScope agent by running the following as early as possible in your code (as it needs to patch supported libraries):

import codescope

agent = codescope.Agent(api_key="xxxxxxxx", commit="abc123", repository="|1234")

Supported libraries

Name Span/event creation Extract Inject
celery *
gunicorn * *
requests * *
unittest *
kombu * * *
logging *

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
codescope-0.1.26-py3-none-any.whl (33.2 kB) Copy SHA256 hash SHA256 Wheel py3
codescope-0.1.26.tar.gz (21.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page