Provide an API for Full Spectrum Eggs, a backyard farm ecommerce site.
- Install Python 3.10.10
- Recommended: manage Python versions with
pyenv
- pyenv github - Alternatively, you can direct download 3.10.10
- Recommended: manage Python versions with
- Install
poetry
package manager - Install PostGreSQL 14:
- by direct download
- or with Homebrew:
brew install postgresql@14
- Clone repository to local directory.
- Create psql database
fullspectrum-dev
:createdb fullspectrum-dev
- Optionally, run
psql fullspectrum-dev
to verify that the database was created successfully. - If the above step fails, you may need to finish installing and starting postgres with:
sudo mkdir -p /usr/local/pgsql/data sudo chown <your-username-here> /usr/local/pgsql /usr/local/pgsql/data initdb -D /usr/local/pgsql/data pg_ctl -D /usr/local/pgsql/data -l logfile start
- Optionally, run
- Run
poetry install
inside the project directory to install dependencies. - Run
poetry shell
to create and activate a shell within the virtual environment. - Run
model.py
.- This may require db admin credentials. Usually, these match your user login credentials.
- The file will create the tables and relationships.
- Run
main.py
.- This starts the local server.