Skip to content

hackoregon/civicu-pythonii-summer-2017

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python II (Advanced Python) Hack University Course

Teachers

GitHub Repos:

You'll want to clone both of these 2 repos to your computer.

  1. http://github.com/hack -- The Django App called labeler that we're building
  2. http://github.com/totalgood/civicu_app -- My version of the Django App you'll build

It may be possible to build your own version of the "Labeler" app (second link above) if you're able to read and type along in class. But it's nice to have the reference implementation in case something seems confusing or you miss a class. We'll try to tag versions of the software by their lesson number and name for each class when we add code. That way you can check out the version for a particular lesson before and be all caught up at the beginning of class For example

  • $ git checkout 14-imageinfo at the beginning of the class for lesson-14 to get all caught up
  • $ git diff 14-imageinfo-done at the end of the class to see if you missed anything during class
  • $ git diff 14-imageinfo-enhanced at the end of the class to see if there are some enhancements you'd like to add

Welcome to the Civic U Python II class!

We’re super excited that you’re able to take time out of your busy schedule to learn Python with us. This is a guide to what we will be learning throughout the session. We will do our best to adhere to this schedule but ask that you be flexible if we need to change the pacing of some lessons based on the speed in which the group can complete them.

Course description:

This course will focus on using Python to collect, clean, transform and share data from various 3rd party APIs. We will also be looking at some features and best practices with Python that fall more towards the intermediate level of the spectrum which you may not have seen in many introductory tutorials. Sharing the data we collect will primarily be accomplished using the Django REST Framework (DRF). The DRF is a super useful tool for building APIs quickly and comes with tons of extra functionality to make our lives easier. Above all we will be writing code and tests every day that we’re in class and will strive to have a good mix of hands on activities and meaningful lectures that give real world context to what we’re learning.

Preparation for class:

When preparing for this class, you should make sure that you have a text editor installed that you’re comfortable with (Sublime Text and Visual Studio Code are both good options). We will also be using Python 3 so please do your best to have it installed beforehand. If any of the documentation below gets too tricky feel free to reach out via Slack or wait until the first day of class and we can work on the installation together.

Installation docs for Python 3:

If you’re looking for some materials to study before class TreeHouse and Lynda both have good introductory videos. Also, with a Multnomah county library card you’re able to get a free access to a Lynda account :)

Optional course list

Your Editor and Linter (I like Sublime + Flake8)

Set up your editor to highlight lint in your code when you save!

  1. install sublime
  2. install package control
  3. shift-ctrl-p then install then linter then or
  4. pip install flake8
  5. shift-ctrl-p then install then linter-flake8 then <enter> or <tab>
  6. find the settings for sublime-linter and adjust them to your taste

Set up your environment to automatically lint your code with every push!

$ cd ~/src/civicu-pythonii-summer-2017/
$ cp shared-resources/pre-commit .git/hooks/
$ # ln -s shared-resources/pre-commit .git/hooks/pre-commit
$ cp shared-resources/flake8.cfg .git/hooks/
$ # ln -s shared-resources/flake8.cfg .git/hooks/flake8.cfg
$ cp shared-resources/delint_working_dir .git/hooks/
$ # ln -s shared-resources/delint_working_dir .git/hooks/delint_workin_dir
$ git commit -am 'force flake8 linting'
$ git push