Back to docs


On this page

Getting started

Once you have deployed a Python language Shaip, you can access the code in the source repository and can pull it to a folder to run on your machine, check out this link for a refresher on accessing the source cloud repository. The next step is to start developing your algorithm. The following provides details on using RStudio to develop and commit your R code as well as providing details on how to manage the environment and test your code.

Using Positron to manage and develop your Python Shaip code

Screenshot 2025-03-12 at 8.43.33 AM.png


Untitled.png

Package management using uv

https://docs.astral.sh/uv/

#Navigate to Shaip project directory
cd pythonAlgoAPI

#Create a virtual environment and run the code
uv run fastapi dev
git pull
#Add dependency

uv add httpx

#Remove dependency

uv remove httpx

Developing and testing the API using FastAPI

Setting up and running fastAPI

https://fastapi.tiangolo.com/

Untitled 2.png

[
   {
      "number2": 324,
      "number1": 122
   }
]

Testing the API using Postman

Postman documentation overview | Postman Learning Center

Untitled.png

Summary

  1. Pull your code from your source repository to a local folder.
  2. Open the folder as a project in Positron, make sure the Git option is available in Positron.
  3. Setup uv to manage packages.
  4. Open the file ./pythonAlgoAPI/app/main.py and run the code making sure to note the port number allocated to the local host API.
  5. Use Postman either via the web app with the downloaded agent or a local downloaded app to connect and run your API.
  6. You are now ready to start developing and testing a local version of your Python Shaip.