Basic Flask app structure for integration with Redis and Celery.
Flask-Redis-Celery is divided in 3 microservices:
- Flask is a Python Web Framework. Is the base webapp. (http://flask.pocoo.org)
- Celery is an background asynchronous task service. (http://www.celeryproject.org)
- Redis is in-memory data structure store, which can be used as a database, cache and message broker. Default Redis installation (password-protected)
git clone https://github.com/nyamba/ocr-api.git
docker-compose build && docker-compose up -d
create .env file with following variables
AWS_ACCESS_KEY_ID=<Your AWS key id>
AWS_SECRET_ACCESS_KEY=<aws secret>
HASURA_SECRET= < hasura key>
HASURA_GQL_URL=< hasura url>
PAGE_SEPERATOR=##############
To shut down:
docker-compose down
Request:
curl --header "Content-Type: application/json" --request POST --data '{"content_id": 2803, "key": "10a2r67jxu0yqqh_ST_470002200_3584.PDF", "bucket": "contents-demo1"}' localhost:5000/