Express Install-x
In most cases, Python and Python Projects are simple and fast to install, as described below. If you encounter issues, open the Detailed Install.
Follow these instructions to:
- Install API Logic Server
- Create the sample Tutorial API Logic Server Project
- Open it in your IDE
- Prepare the projects' Python environment
Create an install directory
You can create this anywhere, such as your home folder or Desktop.
mkdir ApiLogicServer # a directory of projects on your local machine
Use Local Install, or Docker
You can install API Logic Server locally using pip
, or use Docker. If you already have docker, it can eliminate many of the sometimes-tricky Python install issues.
Open the appropriate section below.
Verify Pre-reqs: Python 3.8+
Ensure you have these pre-reqs:
python --version # on macs, you may need to use Python3
If you need to install Python (it can be tricky), see these notes.
Install API Logic Server in a Virtual Environment
Then, install API Logic Server in the usual manner:
python -m venv venv # may require python3 -m venv venv
venv\Scripts\activate # mac/linux: source venv/bin/activate
python -m pip install ApiLogicServer
If you are using SqlServer, you also need to install pyodbc
.
Create the Tutorial Project
ApiLogicServer tutorial
- Open Folder
ApiLogicServer/tutorial
in VSCode- Decline options for Containers
- Establish your Virtual Environment - open Terminal > New Terminal, and
python -m venv venv # may require python3 -m venv venv
venv\Scripts\activate # mac/linux: source venv/bin/activate
python -m pip install -r requirements.txt # accept "new Virtual environment"
Start Docker
docker run -it --name api_logic_server --rm -p 5656:5656 -p 5002:5002 -v ${PWD}:/localhost apilogicserver/api_logic_server
Windows: use Powershell (
PWD
is not supported in Command Line)
Create the Tutorial Project
You are now running a terminal window in the Docker machine. Create the Tutorial project:
$ cd /localhost/ # a directory on your local file system in which...
$ ApiLogicServer tutorial # tutorial directory will be created
$ exit # return to local host
- Open Folder
ApiLogicServer/tutorial
in VSCode-
Accept option to "Reopen in Container"
If you already skipped this option, no worries. Use View > Command Palette > Remote-Containers: Reopen in Container
-
Next Steps - Tutorial
You're all set - the Tutorial is created, installed and ready to run. Proceed to Explore the Tutorial.