CAS Common Chemistry

Is there a Julia package for accessing the CAS Common Chemistry database?

You might not need a package depending on how much processing you require?
For example, I found this tutorial …in Python — Scholarly API Cookbook
It is reasonably direct to adapt it to Julia:

using HTTP
using JSON

detail_base_url = ""
casrn1 = "10094-36-7" # ethyl cyclohexanepropionate

data = HTTP.request("GET", detail_base_url*"cas_rn="*casrn1)
body = String(data.body)

casrn1_data = JSON.parse(body)

# We can then use the data: for example, get an SVG of the format
write(casrn1*".svg", casrn1_data["image"])
# or continue with the tutorial example:

If you’re interested in writing this into a package, happy to help.


Thanks for the link and suggestions @jd-foster .

Could be fun to write a package like that together.

1 Like