Git Product home page Git Product logo

fireball's Introduction

Fireball

Fireball is a basic Flask app that takes a JSON payload and uses this to generate a PDF, which is uploaded to S3.

Running

# build docker image
docker build -t fireball:local .

# run listening to localhost:5001
docker run -it --rm -p 5001:80 --name fireball fireball:local

Environment Variables

The docker container accepts the following environment variables:

  • DEBUG - if True then debug logging is enabled, else Info logging is enabled. Default: TRUE.
  • FIREBALL_WORK_FOLDER - Working URL for storing working files. Default: /tmp.
  • FIREBALL_DOWNLOAD_POOL_SIZE - The number of workers to use for downloading resources. Default: 50.

Sample Payload

{
    "title": "Demo",
    "method": "s3",
    "output": "s3://dlcs-pdf/2/1/pdf-item/abcd1/0/result.pdf",
    "pages": [
        {
            "type": "pdf",
            "method": "download",
            "input": "https://wellcomelibrary.org/service/pdf-cover/abcd1"
        },
        {
            "type": "jpg",
            "method": "s3",
            "input": "s3://dlcs-thumbs/2/1/xyz1/low.jpg"
        },
        {
            "type": "redacted"
        }
    ],
    "customTypes": {
        "redacted": {
            "message": "This page has been removed."
        },
        "missing": {
            "message": "This page is missing."
        }
    }
}

fireball's People

Contributors

fractos avatar donaldgray avatar jacklewis-digirati avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.