Debian Codegraph @

docs/guide/download.md

raw
1 (download)=
2
3 # Download
4
5 The {func}`~pubchempy.download` function is for saving a file to disk. The following formats are available: XML, ASNT/B, JSON, SDF, CSV, PNG, TXT. Beware that not all formats are available for all types of information. SDF and PNG are only available for full Compound and Substance records, and CSV is best suited to tables of properties and identifiers.
6
7 Examples:
8
9 ```python
10 pcp.download("PNG", "asp.png", "Aspirin", "name")
11 pcp.download("CSV", "s.csv", [1,2,3], operation="property/ConnectivitySMILES,SMILES")
12 ```
13
14 For PNG images, the `image_size` argument can be used to specify `large`, `small`
15 or `<width>x<height>`.