First Python script, as a web app, using APIs & Excel. What do I need?
July 8, 2013 4:29 PM   Subscribe

This is a bit of a convoluted problem, but I'll try to keep it brief. I work for a SaaS company that is totally awesome. I love what I do, but I want to develop on my skills at coding to help further my career and give me more interesting work opportunities at said company. In order to do so, I've been learning a bit of Python here and there, hoping to build on my HTML/CSS knowledge for web app development. I have a project in mind that involves writing a Python script that will combine data from Salesforce, a web form, and an Excel spreadsheet into one shiny CSV file/spreadsheet. Bonus points if it can use the Salesforce AND GoToTraining APIs simultaneously, since it'll be combining information from both sources. This will be a slow project, since I'm a bit of a newbie to Python. What libraries should I use, and what resources can help me get there? After I finish some Python courses, where should I go?

Naturally, my Python skills are pretty basic at the moment, but that's the point. I want to take on a project that is relevant to my job, will help my team, and will give me a shiny product that I can show off. While it may be easier to make a localized script for this, I'd ideally like to turn it into an internal web app, so that it can be used cross-platform.

Essentially, the idea is this: my team does training sessions once a week, and at the end of the session we have to take attendance information from those sessions, cross reference them with Salesforce records (to associate attendees with customer record numbers), and then churn out a CSV that we can send off to our department supervisor. It takes way too much time and is unnecessarily complicated. Hence my motivation.

Ultimately, I would need a web app that asks for the person's name, and the subject that they just taught, and then builds a CSV by either combining two spreadsheets or (in a perfect world) by accessing the API for Salesforce and GoToTraining to put the thing together almost-automatically.

What do I need to learn? Any good resources? Is the SF API tough? Would it make more sense to have folks upload the saved spreadsheet reports from SF and GoToTraining, instead of messing about with the API? Am I even asking the right questions? Any help at all would be absolutely wonderful.
posted by summerteeth to Computers & Internet (3 answers total) 4 users marked this as a favorite
 
Best answer: There isn't a Salesforce specific one, but there are a few examples of using Python to work with APIs in the Codeacademy APIs track - perhaps they would introduce you to the necessary concepts and build up your confidence for that side of things.

Personally, I'd also be running through some Django tutorials to structure my web app. There's a tutorial on their site. Gettingstartedwithdjango.com looks fairly thorough too, though perhaps a tad more advanced.
posted by Magnakai at 4:50 PM on July 8, 2013 [2 favorites]


Best answer: For a little project like this I would use the web framework Flask. Your entire application would consist of one view (a function that accepts an http request and returns a response) and maybe a couple of helper functions to process the incoming data. The view would return a blank form when the user makes a GET request. Or would process (validate and write to csv) the data when the user makes a POST request.

There are csv reading/writing libraries in Python's standard library. They are a bit of a pain to work with but you'll muddle through them eventually. Also, I would recommend asking specific programming questions on stack overflow. You'll get a good standard of response if your question is specific and contains the necessary information to answer it.
posted by aychedee at 1:34 AM on July 9, 2013 [1 favorite]


Response by poster: Fantastic info, folks. Thanks so much!
posted by summerteeth at 10:30 AM on July 9, 2013


« Older Radiation emission of compact fluorescent bulbs?   |   What can we do with this room? Newer »
This thread is closed to new comments.