Skip to content

FMI-Test/API

Repository files navigation

Flask Restplus API

Install AWS CLI V2

Install AWS CLI V2

Install Boto3

Install Boto3

Setup Virtual Environemnt

# Install pyenv
brew install pyenv

# Install Python 3.12.2
pyenv install 3.12.2

# Create a new virtual environment using Python 3.12.2
/Users/bamdad/.pyenv/versions/3.12.2/bin/python -m venv venv 

# Activate virtual environment
source venv/bin/activate

# Upgrade pip
pip install --upgrade pip

# Install requirements
pip install -r requirements.txt

# OSX
python -m pip install --user virtualenv # osx
sudo pip install --upgrade virtualenv 
pip install virtualenv
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

# check venv
pip -V

# activate venv
source venv/bin/activate

# Upgrade pip
pip install --upgrade pip

# deactivate venv
deactivate

# Check System aliases
alias

Versions

pip freeze | egrep 'Flask|flask|Werk|its|Jinja|jmespath|MarkupSafe|virtual|util|py|Py'

Run app

python wsgi.py

TODO:

Fix ./wsgi.py errors

Done: update utils.py isLocal()

Done: update utils.py with arg parser

Apple Silicon and macOS Compatibility

For development on Macs with Apple silicon, note the following from Apple support (https://support.apple.com/en-us/102527):

About Intel-based Apps, Rosetta, and the Transition to Apple Silicon

Apple transitioned from Intel processors to Apple silicon in 2020. Rosetta translates Intel-based apps for Apple silicon compatibility. Rosetta is available through macOS 27, but from macOS 28, it will only support certain older games.

For optimal performance, update apps to Universal or Apple silicon versions.

Update Intel-based Apps for Apple Silicon

  • Use the App Store for updates.
  • Check app menus for built-in updates.
  • Visit developer websites for Universal versions.
  • Update plug-ins and extensions separately.

Identify Intel-based Apps

In Finder, select the app, Get Info (Cmd-I), check "Kind":

  • Application (Intel): Needs update or Rosetta.
  • Application (Universal): Compatible.
  • Application (Apple silicon): Native.

Universal apps can optionally use Rosetta for Intel-only add-ons.

Run Intel-based Apps Using Rosetta

Rosetta installs automatically when opening an Intel app. It translates in the background. For best performance, update to native versions.

This ensures development tools run smoothly on Apple silicon Macs.

About

Flask Rest+API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors