Skip to main content

Collects execution data from python script

Project description

# callspectpy

Collects execution data from python script

## CLI

```bash
$ callspectpy -i my-script.py
```


## API

To collect data for specific code, just wrap the code like this:

```python
import callspectpy, os
callspectpy.trace2file_start(
os.path.join(os.path.dirname(os.path.realpath(__file__)), 'callspect.txt')
)

#
# YOUR CODE HERE
#

callspectpy.trace2file_stop()
```

Or better, use context manager:

```python
from callspect.py import trace2file
with trace2file('output.txt'):
# YOUR CODE HERE

```



### TODO:
* exec(code_obj) generates odd "<module>", replace it with name user passes
* when runnnig "from my_package.lib import my_fn", module is equal "lib" :(



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
callspectpy-0.1.3-py3-none-any.whl (6.2 kB) Copy SHA256 hash SHA256 Wheel py3 Dec 5, 2017
callspectpy-0.1.3.tar.gz (3.7 kB) Copy SHA256 hash SHA256 Source None Dec 5, 2017

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 DigiCert DigiCert EV certificate StatusPage StatusPage Status page