Coding 203: Python -
User Input, File I/O,
Logging and REST APIs
Amanda Whaley – DevNet Community Manager
amwhaley@cisco.com
@mandywhaley
Agenda
• Learning Lab Introduction
• Parse JSON
• Get Input from the user
• Read from a file
• Write to a file
• Use the logging module
• Put it all together!
Congratulations! You have learned these Python skills:
3
• How to get input from a user
• Read from a file
• Write to a file
• Use the logging module
• Put it all together!
DevNet Learning Labs
https://learninglabs.cisco.com
Coding 202 – 207 Learning Labs
5
Register and Login on Cisco DevNet (http://developer.cisco.com )
to access the learning labs.
https://learninglabs.cisco.com/
https://developer.cisco.com
https://github.com/CiscoDevNet
https://learninglabs.cisco.com
 learninglabs.cisco.com
 Coding 201 – Coding 207
 Next steps with Python
 developer.cisco.com
 Youtube Videos
 Cisco DevNet Github
 Get your DevNet Loot reward points!
Where to go from here?
References
8
 http://learnpythonthehardway.org/book/
 http://docs.python-requests.org/en/latest/index.html
 https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
 http://www.codecademy.com/tracks/python
 https://www.python.org/doc/
 http://www.pythonlearn.com/html-008/cfbook014.html
 http://www.soapui.org/Best-Practices/understanding-rest-headers-and-parameters.html
 http://www.w3schools.com/jQuery/
 http://api.jquery.com/
About Me
Amanda Whaley
• DevNet Community Manager
• amwhaley@cisco.com
• @mandywhaley
• Lives in Austin, TX.
• developer.cisco.com
• learninglabs.cisco.com
“Those who never fail
are those who never
try.”
-- Ilka Chase
Thank you

DEVNET-2003 Coding 203: Python - User Input, File I/O, Logging and REST API Calls