Skip to content

Instantly share code, notes, and snippets.

View roman-ku's full-sized avatar

Roman Kuleshov roman-ku

View GitHub Profile
roman-ku /
Created January 1, 2019 01:56 — forked from peterkuma/
A flask server for serving all JPEG images in a local directory and subdirectories. Uses unveil.js for lazy-loading of images. Thumbnails are created on the fly by PIL.
# you also need to download this file:
# and place it in the same directory as this python file with the name "jquery.unveil.js"
import os
from io import BytesIO
from flask import Flask, Response, request, abort, render_template_string, send_from_directory
from PIL import Image
import datetime
from pprint import pprint as pp
from trello import TrelloClient
client = TrelloClient(