Practicing Back-end development using Python, Flask (server framework), PostgreSQL database (+SQLAlchemy), and APIs to create a book review website.
Python, Flask, PostgreSQL ๋ฐ์ดํฐ๋ฒ ์ด์ค(+SQLAlchemy), API๋ฅผ ์ฌ์ฉํ์ฌ ๊ฐ๋จํ ๋ถ๋ฆฌ๋ทฐ ์ฌ์ดํธ๋ฅผ ๊ฐ๋ฐํด ๋ณด๋ ๋ฐฑ์๋ ์น ๊ฐ๋ฐ ์ฐ์ต.
- For CS50 Web Programming with Python and JavaScript - project 1.
- Created a book review website using Python and
Flask
as the server framerwork. - Used
PostgreSQL database
(deployed inHeroku
) andsessions
to store login credentials. - Also ssed the database for storing and searching book information including the isbn, title, author, ratings, and reviews.
- A
third-party API
by Goodreads (a book review website) to use ratings on books. - Created
a custom API
for the Website so that a GET request ("api/") returns a JSON for book details.
/login | /search |
---|---|
user can login | search for book by isbn, title, author |
/search (by isbn) | /search (by title) |
---|---|
search result by isbn | search result by title |
/book/isbn | /search (no match) |
---|---|
review of searched book | no match for search result |
/api/isbn |
---|
API for web application |
- ํ๋ฒ๋์ CS50 MOOC(edX)์ Web Programming with Python and JavaScript ์์ ์ ํ๋ก์ ํธ 1.
- Python๊ณผ
Flask
๋ฅผ ์๋ฒ ํ๋ ์์ํฌ๋ก ์ฌ์ฉํ์ฌ ๋ถ ๋ฆฌ๋ทฐ ์น์ฌ์ดํธ๋ฅผ ๊ฐ๋ฐ. PostgreSQL
๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ์ฌ์ฉํ์ฌ ์ฑ ์ ์ ๋ณด(isbn, ์ ๋ชฉ, ์๊ฐ, ํ์ )์ ์ ์ฅ ๋ฐ ๊ฒ์ํ๋ ๊ธฐ๋ฅ์ ๋ง๋ฆ.- ๋ง์ฐฌ๊ฐ์ง๋ก PostgreSQL์ ์ฌ์ฉํ์ฌ ์น์ฌ์ดํธ์์ ๋ง๋ค์ด์ง ๋ถ ๋ฆฌ๋ทฐ๋ฅผ ์ ์ฅ ๋ฐ ๊ฒ์ํ๋ ๊ธฐ๋ฅ์ ๋ง๋ฆ.
Session
๊ณผ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ์ฌ์ฉํ์ฌ ๋ก๊ทธ์ธ ๊ธฐ๋ฅ์ ๋ง๋ฆ.- Goodreads (ํ์ฌ ๋ถ ๋ฆฌ๋ทฐ ์น์ฌ์ดํธ)์
API
๋ฅผ ์ฌ์ฉํ์ฌ ํ์ ์ ๋ณด๋ฅผ ๋ถ๋ฌ์ค๋ ๊ธฐ๋ฅ์ ๋ง๋ฆ. ์น์ฌ์ดํธ์ API
๋ฅผ ๋ง๋ค์ด GET request ("api/")๋ฅผ ํตํด JSON ํ์ผ์ ๋ฐํํ๋ ๊ธฐ๋ฅ์ ๋ง๋ฆ.
Still a bit confused on whether I prefer back-end or front-end. Still, I learned that one side alone is not sufficient since you must know both sides in order for the logic to work.
Specifically, I learned how to create a logic using the routes in how the user is suppose to use and have access to pages (how the website as a whole should flow).
- learned how to use
Flask as a server framework
in order to direct the application's routes - learned how to use
relational databases
viaPostgreSQL
and how to implement it using SQLAlchemy - learned how to use
sessions
to store login credentials. - learned how to use
third-party APIs
and also createcustom APIs
to return JSONs.