You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
5.2 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

### ![](https://ga-dash.s3.amazonaws.com/production/assets/logo-9f88ae6c9c3871690e33280fcf557f33.png) Python Programming: Flask Project
<!---
This assignment was developed by Brandi Butler for the Python 5-day course.
Questions? Comments?
1. Log an issue to this repo to alert me of a problem.
2. Suggest an edit yourself by forking this repo, making edits, and submitting a pull request with your changes back to our master branch.
3. Hit me up on Slack at @brandib.
--->
# Final Project
First off, let's take a second to congratulate you for making it this far! We know we've packed a lot of knowledge into a relatively short time! Kudos for rocking it!
![](https://media.giphy.com/media/OcZp0maz6ALok/giphy.gif)
---
## Prompt
We'd like you to have something tangible to show for having taken this class with us, so let's use your newly acquired `Flask` skills to make a mini-web app.
#### Got Ideas?
You are free to make a website about any topic you'd like as long as it meets all the requirements listed below. If you're having trouble coming up with a topic, here are a few to consider:
* Finding a fun API and basing it on that.
* Making an "About Me" site that's all about you.
* Making a portfolio website for one of your hobbies.
* Making a blog about a topic you find interesting.
* Making something you think would improve your life in some way.
Feel free to share resources and inspiration with your classmates!
---
## Deliverables
You must have a Flask site running locally on your own machine. You will work individually on this project, but feel free to share inspiration, resources, or cool APIs that you find with your classmates.
### Requirements
Your assignment **must** include:
1. At least three working routes with associated views.
- Must include at least one `GET` and one `POST` route.
2. Data pulled from at least one API.
- Get creative! Tons of free APIs exist. Ask your instructor or classmates for ideas.
3. Semantically clean HTML and CSS applied to a template — at least a small amount of styling.
- Try to spend a little time styling your pages to make them look nice!
4. Core Python topics. At a minimum, this includes:
- Dictionaries *or* sets *or* tuples.
- `**args` *or* `kwargs` *or* `*kwargs`.
- Basic debugging, such as a `try/except` block (only if necessary).
- A class.
- User input *or* reading from a file.
5. Comments, so another developer can easily see what your app does.
**Bonus:** Have extra time? Ask how to deploy a Flask site to a cloud service like [Heroku](https://heroku.com/)! Or, try to follow the directions in [this article](https://medium.com/the-andela-way/deploying-a-python-flask-app-to-heroku-41250bda27d0).
### Resources
#### Suggested Ways to Get Started
* **Begin with the end in mind.** Know where you want to go by planning ahead, so you don't waste time building things you don't need.
* **Read the docs** for whatever technologies or APIs you use. Most of the time there is a tutorial that you can follow! This isn't always the case, though learning to read documentation is crucial to your success as a developer.
* **Write pseudocode before you write actual code.** Thinking through the logic of something helps.
#### Useful Resources
- [A List of Free APIs](http://www.programmableweb.com/apis/directory)
- [An Extremely Helpful Debugging Flowchart](https://www.dropbox.com/s/cqsxfws52gulkyx/drawing.pdf)
- [The Python Docs](https://docs.python.org)
- [How to Use Keyword Args](http://treyhunner.com/2018/04/keyword-arguments-in-python/)
- [How to Use `*args` and `**kwargs`](https://www.digitalocean.com/community/tutorials/how-to-use-args-and-kwargs-in-python-3)
- [Using Chain and Other Itertools](http://programeveryday.com/post/using-python-itertools-to-save-memory/)
- [Python Sets Tutorial](https://www.learnpython.org/en/Sets))
- [Tuples Tutorial](http://openbookproject.net/thinkcs/python/english3e/tuples.html)
- [Writing a Great User Story](https://help.rallydev.com/writing-great-user-story)
- [Presenting Information Architecture](http://webstyleguide.com/wsg3/3-information-architecture/4-presenting-information.html) (includes insight into wireframing)
- [Heroku](https://heroku.com/) (platform for hosting your back end)
---
## Evaluation
Your project will be evaluated based on the rubric below.
### Rubric
| Score | Expectations |
| ----- | ---------------------------------------------------- |
| 0 | Incomplete. |
| 1 | Does not meet expectations. |
| 2 | Meets expectations — good job! |
| 3 | Exceeds expectations — fantastic! |
Here's an example of how the criteria works. Let's say your assignment was to cook a pizza:
Criteria | **0** (Incomplete.) | **1** (Does not meet expectations.) | **2** (Meets expectations.) | **3** (Exceeds expectations.) |
:--- | :--- | :--- | :--- | :---
Crust | No crust present. Submission is just cheese and sauce on a plate. | Pizza has a crust, but it is raw. | Crust is cooked thoroughly.| Crust is golden brown and the perfect thickness.
Cheese | No cheese present. | A small sprinkle of unmelted cheese in the middle of the pie. | Cheese covers the pizza from edge to edge but is not fully melted. | Cheese is delicious, plentiful, and melted to perfection.