<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 ChemSpiPy
Step1:  Then connect to ChemSpider by creating a ChemSpider instance using your security token
Step2:  All your interaction with the ChemSpider database should now happen through this ChemSpider object, cs.
Retrieve a Compound
Retrieving information about a specific Compound in the ChemSpider database is simple.
Let’s get the Compound with ChemSpider ID 2157
Step3:  Now we have a Compound object called comp. We can get various identifiers and calculated properties from this object
Step4:  Search for a name
What if you don’t know the ChemSpider ID of the Compound you want? Instead use the search method
<ASSISTANT_TASK:>
Python Code:
from chemspipy import ChemSpider
Explanation: ChemSpiPy: Getting Started
Before we start:
Make sure you have installed ChemSpiPy.
Obtain a security token from the ChemSpider web site.
First Steps
Start by importing ChemSpider:
End of explanation
# Tip: Store your security token as an environment variable to reduce the chance of accidentally sharing it
import os
mytoken = os.environ['CHEMSPIDER_SECURITY_TOKEN']
cs = ChemSpider(security_token=mytoken)
Explanation: Then connect to ChemSpider by creating a ChemSpider instance using your security token:
End of explanation
comp = cs.get_compound(2157)
comp
Explanation: All your interaction with the ChemSpider database should now happen through this ChemSpider object, cs.
Retrieve a Compound
Retrieving information about a specific Compound in the ChemSpider database is simple.
Let’s get the Compound with ChemSpider ID 2157:
End of explanation
print(comp.molecular_formula)
print(comp.molecular_weight)
print(comp.smiles)
print(comp.common_name)
Explanation: Now we have a Compound object called comp. We can get various identifiers and calculated properties from this object:
End of explanation
for result in cs.search('glucose'):
    print(result)
Explanation: Search for a name
What if you don’t know the ChemSpider ID of the Compound you want? Instead use the search method:
End of explanation
<END_TASK>