https://github.com/lupusanay/image-resize
Flask async REST service for image resizing
https://github.com/lupusanay/image-resize
celery docker flask python
Last synced: about 2 months ago
JSON representation
Flask async REST service for image resizing
- Host: GitHub
- URL: https://github.com/lupusanay/image-resize
- Owner: LupusAnay
- License: mit
- Created: 2019-02-10T17:44:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-22T04:30:29.000Z (over 3 years ago)
- Last Synced: 2024-04-24T08:08:11.527Z (about 2 years ago)
- Topics: celery, docker, flask, python
- Language: Python
- Size: 92.8 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Resize
Flask async REST service using for image resizing
Usage: `docker-compose up`
Further information can be found in the
documentation on Docker and Docker Compose
## API Reference:
### Create resize task:
```http request
POST /operation/resize HTTP/1.1
Content-Type: multipart/form-data
```
Accepts a file in `mulipart/form-data` format and json with height and width
parameters
Returns a json with created task id, or error
### Get task state
```http request
GET /status/ HTTP/1.1
```
Accepts a task id in UUID format as a GET parameter, and returns state of that
task, or returns 404 if there is not task with given id
### Get task result
```http request
GET /operation/result/ HTTP/1.1
```
Accepts a task id in UUID format as a GET parameter, and returns result of that
task, or returns 404 if there is not task with given id or it's not completed
yet