-
Project description
$ moduelgraph 02dump_json.py
{
"age": 20,
"name": "foo"
}
digraph g {
g0 [label="json"]
g1 [label="json.encoder"]
g2 [label="json.decoder"]
g3 [label="argparse"]
g4 [label="copy"]
g5 [label="gettext"]
g6 [label="textwrap"]
g7 [label="json.scanner"]
g8 [label="02dump_json"]
g9 [label="locale"]
g10 [label="struct"]
g0 -> g1
g0 -> g2
g3 -> g4
g3 -> g5
g3 -> g6
g2 -> g7
g8 -> g0
g8 -> g3
g5 -> g9
g5 -> g10
}
$ moduelgraph 02dump_json.py --outfile=02dump_json.dot
{
"age": 20,
"name": "foo"
}
write 02dump_json.dot...
$ moduelgraph 02dump_json.py --driver=ToplevelOnlyDriver --outfile=02dump_json2.dot
{
"age": 20,
"name": "foo"
}
write 02dump_json2.dot...
02dump_json.py
import json
import sys
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--name", default="foo")
args = parser.parse_args()
person = {"name": args.name, "age": 20}
json.dump(person, sys.stdout, indent=2)
if __name__ == "__main__":
main()
else:
print("hmm")
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
moduleknife-0.1.1.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for moduleknife-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e41c99e7948fc272535344fd2ece9b62d0fed0be4d50156707542bdb31c6405 |
|
MD5 | c806ab4e0ba93745dd93f5c5994e446e |
|
BLAKE2b-256 | cae42a506e3d6e8507e0aa6829e5495c7e4da71efe0401df94d2c745257a4cfc |