100 Days of Python: Days 36-40

Day 36

  • Reviewed project of the day – a Bloomberg terminal for tracking stock prices and news relevant to the stocks.
  • Reviewed requirements and created app.
  • The app first uses a stock prices API to pull historical price data for a specified stock.
  • The stock then checks if today’s closing prices is a change greater than 5%.
  • If the stock price change did surpass 5%, a News API is used to pull 3 recent stories regarding the company.
  • Finally, a news brief of these stories and the actual percentage change are texted to a specified phone number using the Twilio API.

Day 37

  • Expanded definitions of API Requests
    • GET – requests.get() – Asking external system for data
    • POST – requests.post() – Give the external system a piece of data
    • PUT – requests.put() – Update a piece of data in the external system
    • DELETE – requests.delete() – Delete the piece data in the external service
  • Reviewed project of the day : Habit-Tracker using the Pixela API
  • Used POST request to establish a Pixela account.
  • Learned about HTTP headers.
  • This allows authentication to the API endpoint without passing it as a standard parameter, which poses security concerns.
  • Used POST request to establish the habit-tracking graph (I used miles walked as my subject)
  • Used POST request to post a pixel to the graph.
  • Used PUT request to update data in existing pixels.
  • Used DELETE request to remove pixels with data.

Day 38

  • Reviewed challenge of the day, creating a workout log that integrates with the Google Sheets API
  • Began work on project.
  • Nutrionix API integration setup to POST workout descriptions and have them translated into categorized data.
  • Sheety API used to post workout data collected with Nutrionix to Google Sheet spreadsheet.
  • Briefly reviewed basic auth vs. bearer token.
  • Created bearer token for Sheety, which previously had no auth method by default.
  • Moved sensitive variables (keys, tokens, endpoints) to environmental variables for privacy reasons.  Tested code successfully in PyCharm and Repl.it

Day 39

  • Capstone Part 1 of the cheap flight finder
  • Google Sheet will have a list of destinations and alert prices
  • Data will be fed into a flight search API to perform daily check to see if sought-after price exists.
  • If the target price (or lower) is detected, an SMS API will be used to notify the user.
  • Created app using only requirements, no walkthroughs required.

Day 40

  • Capstone Part 2 for the cheap flight finder.
  • Today’s modifications will take the cheap flight finder and allow users to sign up for cheap flight notifications via email.
  • Reviewed app requirements.
  • I included most requirements in the code already when I did yesterday’s version (e.g. exception handling when a destination search contains zero flights )
  • Remaining task of adding sign-up option to the flight search was, frankly, not interesting enough for me to continue.  Will consider revisiting this task later.

0 Comments

Leave a Reply

Your email address will not be published.