Udacity: Difference between revisions
| Line 28: | Line 28: | ||
// select virtual env interpreter in VCS by Ctrl+Shift+P | // select virtual env interpreter in VCS by Ctrl+Shift+P | ||
// open new terminal in VCS which executes the activate script | // open new terminal in VCS which executes the activate script | ||
pip -r requirements.txt | pip install -r requirements.txt | ||
// decommented #psycopg2-binary==2.8.2, because compilation with VC++ fails | // decommented #psycopg2-binary==2.8.2, because compilation with VC++ fails | ||
psql.exe -h uweheuer.spdns.de -U postgres postgres | psql.exe -h uweheuer.spdns.de -U postgres postgres | ||
Revision as of 15:15, 5 November 2021
Courses
Content
- SQL
- ORM
- python
- Postgres
- Json
- Flask
- Ninja
- HTTP
- REST
- CORS
- API design
Full Stack Web Developer
C:\Uwes\python\UdacityFullWebDeveloper
API Apps
$env:FLASK_APP = "flaskr" // folder to look for the init file $env:FLASK_ENV = "development" // automatically restart of server in case of changes
pip install flask_cors
// extract origin (see below) // from 1_Requests_Starter/readme.md cd backend python -m venv venv // select virtual env interpreter in VCS by Ctrl+Shift+P // open new terminal in VCS which executes the activate script pip install -r requirements.txt // decommented #psycopg2-binary==2.8.2, because compilation with VC++ fails psql.exe -h uweheuer.spdns.de -U postgres postgres \i setup.sql \psql.exe -h uweheuer.spdns.de -U student -d bookshelf -f books.psql pip install psycopg2-binary // replace C:\Uwes\python\UdacityFullWebDeveloper\cd0037-API-Development-and-Documentation-exercises-master\1_Requests_Starter\backend\venv\Lib\site-packages\sqlalchemy\util\compat.py // row 331 time_func = time.clock -> time_func = time.time python -m flask run
Origin
- https://github.com/udacity/cd0037-API-Development-and-Documentation-exercises
- C:\Uwes\python\UdacityFullWebDeveloper\cd0037-API-Development-and-Documentation-exercises-master.zip
Trivia App
cd backend python -m venv venv .\venv\Scripts\activate
Solutions
ToDo App
Fyyur App
- run as prepartion (rest was already installed for lesson)
pip3 install virtualenv npm install bootstrap@3 // creating .env file for VSC debugging
- execute Development Setup from GitHub
- with psql
create database fyyur; create user fyyur with encrypted password 'fyyur'; grant all privileges on database fyyur to fyyur;
- in
C:\Uwes\python\UdacityFullWebDeveloper\FSND\projects\01_fyyur\starter_code
python -m virtualenv env
- to run the app
C:\Uwes\python\UdacityFullWebDeveloper\FSND\projects\01_fyyur\starter_code>.\env\Scripts\activate pip install Flask-migrate // one-time pip3 install psycopg2 // one-time flask db init // one-time
flask db migrate // if needed
C:\Uwes\python\UdacityFullWebDeveloper\FSND\projects\01_fyyur\starter_code>.\env\Scripts\activate #$env:FLASK_ENV = "development" // moved to .env file python .\app.py http://127.0.0.1:5000/
Origin
Solutions
- https://github.com/WenkaiTan/FSND/tree/master/projects/01_fyyur/starter_code
- fyyur-master.zip
- fyyur-artist-booking-master.zip