- Clone repo
-
cd
into the directory - Start a virtual environment:
python venv venv
- Activate virtual environment:
source venv/bin/activate
(Mac) - Choose the venv. interpreter for the command pallet in VS Code it is often the 'recommended' choice
- Install app dependencies with pip:
pip install flask
pip install functions
pip install openai
pip install packaging
pip install requests
pip install prompt
- Install ngrok:
brew install ngrok/ngrok/ngrok
- Add Auth token:
ngrok config add-authtoken 2ZYQoVIDN45sf4YgkOfEcZx7QvZ_2WmKfJFKDNsXAhhZHmSj
- Run application:
python -m flask --app ./main.py run
- Spin up ngrok to expose endpoints:
While applciation is running open new
bash terminal and type the following
ngrok http 5000
source venv/bin/activate
python -m pip install --upgrade pip
pip install depname
pip list
deactivate
python -m flask --app ./main.py run
ngrok http http://localhost:5000
- python = ">=3.10.0,3.11"
- flask = "^3.0.0"
- functions = "^0.7.0"
- openai = "^1.2.3"
- packaging = "^23.2"
- requests = "2.31.0"
- prompt = "^0.4.1"
- pip install flask
- pip install functions
- pip install openai
- pip install packaging
- pip install requests
- pip install prompt
Expose Local web server to internet with flask app: https://sumanshunankana.hashnode.dev/expose-a-local-web-server-to-the-internet-example-flask-app
How to create a simple flask app in just 5 minutes: https://youtu.be/6M3LzGmIAso?si=ndAo_d_NFOwbkFig
Python Boilerplate for .gitignore: https://www.python-boilerplate.com/about/
Ingrok: Ingress Platfor for Devs: Expose endpoints for VF (2FA required) https://ngrok.com/
Start applciation over from scratch commit:
commit 27b9d995f30bd6a98d150bf0f39bc762fb04a315
brew install ngrok/ngrok/ngrok
ngrok config add-authtoken 2ZYQoVIDN45sf4YgkOfEcZx7QvZ_2WmKfJFKDNsXAhhZHmSjs
Authtoken saved to configuration file: /Users/jamesahnking/Library/Application Support/ngrok/ngrok.yml