https://github.com/koji/api-for-simulator
api server for opentrons-simulator
https://github.com/koji/api-for-simulator
api fastapi python
Last synced: about 2 months ago
JSON representation
api server for opentrons-simulator
- Host: GitHub
- URL: https://github.com/koji/api-for-simulator
- Owner: koji
- Created: 2023-10-11T07:32:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-09T23:20:52.000Z (over 2 years ago)
- Last Synced: 2025-11-03T09:27:14.285Z (8 months ago)
- Topics: api, fastapi, python
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# api-for-simulator
api server for opentrons-simulator
## how to run locally
```shell
pip install -r requirements.txt
cd app
uvicorn main:app --reload
```
### docs
```shell
uvicorn main:app
```
Then go to http://localhost:8000/docs to check the api doc.
`/protocol/id` does not work since it is a dummy function right now.
## How to run the server with Dockerfile
```shell
git clone https://github.com/koji/api-for-simulator.git
cd api-for-simulator
docker build -t simulator-api:1.0.0 .
```
After building the image
```shell
docker run -d --name simulator-api-container -p 80:80 simulator-api:1.0.0
```
Check the container
```shell
docker ps -q -f "name=simulator-api-container" | xargs docker logs -f
```
Test the api server with curl or postman/httpie
```shell
curl localhost:80
```
## Tool
- postman: https://www.postman.com/
- httpie: https://httpie.io/
- orbstack https://orbstack.dev/
A GUI app for Docker which is better than Docker Desktop