Metadata-Version: 2.1
Name: scopeagent
Version: 0.2.0
Summary: Scope agent for Python
Home-page: https://scope.undefinedlabs.com
Author: Undefined Labs, Inc
Author-email: info@undefinedlabs.com
License: Apache
Description: # python-agent
        
        Python agent for [Scope](https://scope.undefinedlabs.com)
        
        
        ## Install
        
            pip install scopeagent
        
        
        ## Usage
        
        First, get an API key from your Scope installation.
        
        Then, prefix your startup command with `scope-run`:
        
            scope-run -k $APIKEY python run my_app.py
            scope-run -k $APIKEY gunicorn myapp.wsgi
            scope-run -k $APIKEY python -m unittest discover
        
        ### Parameters
        
        | Flag | Required? | Default | Description | Environment variable |
        |---|:---:|---|---|:---:|
        | `-k`, `--apikey` | Y |  | API key tog use when sending data to Scope | `$SCOPE_APIKEY` |
        | `-n`, `--name` | N | `default` | Service name to use when sending data to Scope | `$SCOPE_SERVICE` |
        | `-c`, `--commit` | N | `$(git rev-parse HEAD)` | Commit hash to use when sending data to Scope | `$SCOPE_COMMIT_SHA` |
        | `-r`, `--repository` | N | Looked up automatically | Repository ID to use when sending data to Scope | `$SCOPE_REPOSITORY` |
        | `--root` | N | `$(git rev-parse --show-toplevel)` | Repository root path | `$SCOPE_SOURCE_ROOT` |
        
        
        ### Advanced usage
        
        If the above doesn't work for your specific setup, 
        you can also install the Scope Agent by running the following as early as possible 
        in your code (as it needs to patch supported libraries):
        
        ```python
        import scopeagent
        
        agent = scopeagent.Agent(api_key="xxxxxxxx", commit="abc123", repository="github.com|1234")
        agent.install()
        ```
        
        ### Supported libraries
        
        Name | Span/event creation | Extract | Inject
        -----|:-------------:|:-------:|:------:
        [`celery`](http://www.celeryproject.org) | * |  |
        [`gunicorn`](https://pypi.org/project/gunicorn/) | * | * |
        [`requests`](https://pypi.org/project/requests/) | * | | *
        [`unittest`](https://docs.python.org/3/library/unittest.html) | * | |
        [`kombu`](https://github.com/celery/kombu) | * | * | *
        [`logging`](https://docs.python.org/3/library/logging.html) | * | |
        
        
        ## Development
        
        ### Automated Testing
        The following environment variables are used for database tests:
        
        * `POSTGRES_DBURL`
        
        ## Acknowledgements
        
        Some code is copied from or inspired by Uber's [opentracing-python-instrumentation
        ](https://github.com/uber-common/opentracing-python-instrumentation) (MIT license). The original copyright notice is maintained in copied files.
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries
Description-Content-Type: text/markdown
Provides-Extra: tests
