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.

Source Distribution

callspectpy-0.1.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

callspectpy-0.1.3-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file callspectpy-0.1.3.tar.gz.

File metadata

File hashes

Hashes for callspectpy-0.1.3.tar.gz
Algorithm Hash digest
SHA256 eb792c9d965890a79fd38d9de6ed810f7f487d7eb90ad29ad7e2ff67f9dd6148
MD5 3846698bc508b9399170a19f9491a15d
BLAKE2b-256 7ac719a74970a78b66c7362822a385c678ee44079fb9be068f03d468adfb47b8

See more details on using hashes here.

File details

Details for the file callspectpy-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for callspectpy-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 50c22a826834b06a67f1aeccc514e14ae9de0084611f750141d92d408f21956b
MD5 f12072b84e86a4e1a5d0f00ed42c10c4
BLAKE2b-256 e402c20781a0c11ed23c47d00a713367ef8c4dfd17fd6bb441dce97344231f99

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page