Call Graph Producer for PyPI Packages with the use of PyCG
Project description
Library for generating PyPI Call Graphs through PyCG
This library can be used to produce the call graph of a package distributed through pip along with saving its source code and the call graph in json format in a specified directory.
Usage
Example usage after installing the specific package through pip
:
from pycg_producer.producer import CallGraphGenerator
coord = { "product": "pycg-stitch",
"version": "0.0.8",
"version_timestamp": "2000",
"requires_dist": []}
generator = CallGraphGenerator("directoryName", coord)
print(generator.generate())
The CallGraphGenerator class recieves as input the name of the directory where the source code and the call graph json will be stored, along with a python dictionary containing the product name and version of the specific pypi coordinate.
Note: It is mandatory to provide also a version_timestamp
and requires_dist
fields, which can be left empty if they are not going to be used.
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
File details
Details for the file pycg-producer-0.0.3.tar.gz
.
File metadata
- Download URL: pycg-producer-0.0.3.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a132b0db57b0cdcfa10c456092e58fae39062cb2f9615a1c6d63d8970e301b5e |
|
MD5 | c5d4df42109889735158336d5fc79a9b |
|
BLAKE2b-256 | 54423784036711385402daa67441e2f522ef557b5b529b81f6c57ee6d7fbd728 |