- Follow installation guide for installing pipx.
- Run
pipx install poetry
. - Run the command below for your operating system.
brew install libtiff libjpeg webp little-cms2
sudo apt install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
libharfbuzz-dev libfribidi-dev libxcb1-dev
- Clone this repository and change to the directory in the terminal.
- Run
poetry install
- Run
poetry shell
- Run
pip install setuptools
- Run migrations and install starter data with the
./seed_data.sh
script. - Open the project in VS Code if you haven't yet.
- Ensure that the correct Python Interpreter is chosen in VS Code.
- Start your debugger.
- Open Postman
- Click File > Import from the navbar
- Either click and drag the
Bangazon Python API.postman_collection.json
file or choose it by clicking the files link in the window. - Your should be prompted to import Bangazon Python API.
- Click the Import button to complete the process.
To test it out...
- Click on the Collections icon on the left
- Expand the Profile sub-collection
- Double-click on Login and send the request.
You should get a response back that looks like this.
{
"valid": true,
"token": "9ba45f09651c5b0c404f37a2d2572c026c146690",
"id": 5
}
Look in the users.json
file for the usernames. Every password is Admin8*.
You can run the ./seed-data.sh
script any time to make changes to database models, or just want to roll back your data to its original state. It deletes the database, any existing migrations, and then re-creates the database based on your current models, and inserts starter data.