Tracing agent for python.
Project description
Identity trace Python Agent
This library is used for executing functions and tests inside python applications with or without the Identity Server.
Installation
This library can be installed inside your python app using
pip install identity-trace-python-agent
Configuration
In the root of your python project, it is required to create a file identity_config.json
. This file is used to configure how identity-trace-python-agent
and Identity Server runs tests and functions inside your python app.
identity_config.json
{
"modules": { // Tracer will decorate all the functions inside the modules listed in the modules
"your_python_module": true // This will decorate all the functions and classes inside the module
"another_module": [... String list of function and class names to decorate]
},
"python_path": "/Users/mamoon/.local/share/virtualenvs/your-env-name/bin/python", // path to your virtual env python executable. You can set it to "python3" or "python" if you want to use the global python without virtual env.
"server_port": 8002, // Port on which Identity server will start. You can then visit http://localhost:8002 To access the identity server web app.
"max_executed_functions": 100 // Number of executed function records to keep. 0 means unlimited. Limiting it will be good for storage space.
"tests_directory": "tests" // directory where Identity Server will create tests. Defaults to "tests".
}
Run Tests In CI/CD Pipeline
Unit tests can be executed in your CI/CD pipeline using the following command.
python -m identity_trace --runTests
Filter Tests
You can provider different filter arguments to execute unit tests based on those filters.
Filter By Test Suite Name
Filter by test suite name. This command will run all the tests where test suite name contains some_test
.
python -m identity_trace --runTests --name="some_test"
Filter By Module Name
Filter by module name. This command will run all the tests where module name contains some_module_name
.
python -m identity_trace --runTests --moduleName="some_module_name"
Filter By File Name
Filter by file name. This command will run all the tests where file name contains some_file
.
python -m identity_trace --runTests --fileName="some_file"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file identity_trace_python_agent-1.0.14.tar.gz
.
File metadata
- Download URL: identity_trace_python_agent-1.0.14.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2edf7da50813aeeedfe4a1701dd240cbc1eb798198b45166eecea11bb61d6f07 |
|
MD5 | 24aeb3f94df292eadbfdf1050d1c826f |
|
BLAKE2b-256 | 2911878534560464c605cb1f11f94f3f5c642d718a52e3c6f1be08a983a389d2 |
File details
Details for the file identity_trace_python_agent-1.0.14-py3-none-any.whl
.
File metadata
- Download URL: identity_trace_python_agent-1.0.14-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a025db077b86677c1800dc2fdf42b5594219d562da6d222b521d35dda6586cf1 |
|
MD5 | b5f2722e94e761f3e19a3eb069380f73 |
|
BLAKE2b-256 | 7da612aec24c34b6c67a9e5ee6b05c74a36741ccc03d979a5ba5631a21a39210 |