Skip to content

maumaugithub/inky-picture-fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inky-picture-fastapi

Fast Open API for inky_picture_service. This API will serve a new Portrait Device.

Development Setup

  1. Create a venv environment with Python 3.12 Linux:
.\.venv\bin\activate

with Microsoft:

.\\.venv\Scripts\Activate.ps1

verify:

python --version
  1. Install requirements
pip install -r requirements.txt
  1. Run the API

This triggers the Run panel on IntelliJ.

Notice: the port here is the one on the api code line 12.

python inky_picture_service/inky-pic-api.py

I have run with the previous command and with the snippet below on VSCode

uvicorn inky_picture_service/inky-pic-api:app --reload --port 5000

Test with curl

I will share the postman collection later ;)

curl --location 'http://127.0.0.1:9000/pics'

Test with AREPL in VSCode

This is a very fast way to see if code works. We still need proper tests but here any changes are visualized real time. Yeeeiii!

Installation

pip install -U inky_picture_service

Then you can run

inky_picture_service --help

About

Fast Open API for inky-picture-service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages