Falcon, JSON, APIs, Oh My!

This is the final blog post of the ChiPy 2017 Spring Mentorship, but the experience is far from over! I began the program as a timid, self-concious, and novice programmer. Only one of these three conditions remains true. While I might not be an independently amazing, full-stack developer just yet, the weeks which have transpired since the beginning of the mentorship. Not only do I feel confident I know how to reason my way through most Python-related problems, given some time I can definitely even figure out the implementation!

I have learned how to use Git, set up virtual environments, edit my terminal colors in the bash config file, and gained practice making two command-line tools. The struggle to overcome imposter syndrome continues, yet my proficiency is growing– which makes me feel proud of my effort and grateful to the program for the opportunity to …. program.

So what’s new since last time?

I still have two primary projects contained within the scope of the mentorship. The inventory reconciliation script and the federal employee meeting cost calculator. Since we talked last time, the meeting cost calculator has grown a bit. Since the dataset containing federal employee locations, grades, and salaries is incomplete when looking up individuals by name, a workaround is to query the API using the individuals’ grade and step, equivalent to a rank in the armed forces. This method always returns some non-zero integer which directly addresses a major design flaw in the previous version.

The next step now is using Falcon instead of Requests (process outlined in the first ChiPy blog post). Falcon is a WSGI framework which allows for the construction of speedy APIs to handle simple HTTP verbs: GET, POST, PUT/PATCH, DELETE.


A falcon

So why do this if the program was essentially working before using the Requests framework? Sure, the program “worked,” i.e. a proof-of-concept was created. The goal now is to improve usability of the application and even build a JavaScript front-end that can be presented to the group on July 6!

The program working as a command line script. Dreaming of a day when it can be accessed from the web!

Here’s a sneak peek— but take note that it doesn’t work yet! There are even some lovely notes from my epic mentor Chris Foresman for your enjoyment. Chris was generous to gift me 500 hours of Heroku Cloud Application Platform so we can get it launched!

Happy coding!

Leave a Reply