https://github.com/mostafaasadi/spline-api
A api to draw spline
https://github.com/mostafaasadi/spline-api
Last synced: 7 months ago
JSON representation
A api to draw spline
- Host: GitHub
- URL: https://github.com/mostafaasadi/spline-api
- Owner: mostafaasadi
- License: gpl-3.0
- Created: 2021-05-25T22:08:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-26T10:24:38.000Z (over 4 years ago)
- Last Synced: 2025-01-17T11:12:42.387Z (9 months ago)
- Language: Python
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spline-api
### A api to draw spline## Usage
- Clone this project
- Create and active cirtual envirement
```
virtualenv venv
source venv/bin/activate
```
- Install requirements
`pip install -r requirements.txt`- Run server
`python app.py`- Make post request to server with **multipart/form-data** Content-Type Header and **tck** and **image** body
tck structure example:
```
[
[0, 0, 0, 0, 0.68247947, 1, 1, 1, 1],
[
[150, 44.395705, 1279.960176, 94.6343365, 300],
[150, 2446.74514, 1017.743452, -18.844085, 700]
],
3
]
```
request example:
```
curl --request POST \
--url http://127.0.0.1:5000/ \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--form 'tck=[
[0, 0, 0, 0, 0.68247947, 1, 1, 1, 1],
[
[150, 44.395705, 1279.960176, 94.6343365, 300],
[150, 2446.74514, 1017.743452, -18.844085, 700]
],
3
]' \
--form image=image.jpg --output response.png
```
it return an image as response.