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.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

callspectpy-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: callspectpy-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for callspectpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0b08bf32e4440f6c862750b0cfff5df2705e151268741b6dd1bd39b4d6b090f4
MD5 280bab78b52b29b5729ff0c93fb5351c
BLAKE2b-256 2496638e1737c5f2e096b56c35c69cb9b262e3419cb76c87788a486199402d02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for callspectpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bff241e3f2a45749ce8e1976f08cb5bc8630703f0b3737943baae8f97ce539aa
MD5 7febe14c99f4d3abb8519df26873b03c
BLAKE2b-256 d31e04d632e003c6613a62b5fc664cb6a202a5595c6f0c5407afbe44541a306b

See more details on using hashes here.

Supported by

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