HTTP server for uploading images and generating thumbnails
Project description
kodak
Web server for auto-generating banners, previews, thumbnails, and more from any directory. Lightweight, simple, and designed for performance.
Developed with Poetry 1.0+
Goals
-
Support defining server-side manipulation specifications
KODAK_MANIP_FOOBAR_CROP_VERTICAL=300 KODAK_MANIP_FOOBAR_SCALE_HORIZONTAL=1200 KODAK_MANIP_FOOBAR_SCALE_STRATEGY=absolute KODAK_MANIP_FIZZBUZZ_NAME=black+white KODAK_MANIP_FIZZBUZZ_BLACK_AND_WHITE=true KODAK_MANIP_FIZZBUZZ_SCALE_HORIZONTAL=50 KODAK_MANIP_FIZZBUZZ_SCALE_STRATEGY=relative
-
Support retrieving manipulated images based on server side configuration
GET /image/<name>/foobar GET /image/<name>/black+white
-
Support optionally exposing full-resolution source images
GET /image/<name>/original
-
Support caching of generated image manipulations for reuse
-
Support HTTP 410 for indicating removed images and manipulations
-
Support optional authentication with pre-generated access tokens
-
Support static file tree management for exposure via external web server (which is faster than serving files with python)
-
Support automatic indexing of newly added image files
-
Support automatic indexing of removed image files
-
Support arbitrary source directory structure
-
Support Dockerized deployment
-
Support bare-metal deployment (via systemd)
Non-goals
-
Client-defined image manipulations through publicly exposed parameters
Manipulating images is- in the grand scheme of things- pretty resource intensive. Exposing dynamic parameters that can be cycled through to generate hundreds or thousands of permutations for every known image on a server could be used to either consume the server's entire disk or server's entire CPU.
-
Upload functionality
This application should be as simple as possible. Lots of people have implemented file upload systems, synchronizers, and managers way better than I have.
-
Robust and flexible access control
See above. Complex authentication can be added using a reverse proxy or any one of several dozen options for 3rd party middleware. The provided authentication is supposed to be dead simple for people who absolutely need the server to be private but absolutely cannot implement something more complicated.
-
Pre-creation of image manipulations
The goal of this program is just-in-time creation of the manipulated assets with aggressive caching; first load is slow, subsequent loads are fast. For this use case there's no sense creating or storing an asset until it's known to be needed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kodak-0.1.0.tar.gz
.
File metadata
- Download URL: kodak-0.1.0.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.14.18-300.fc35.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbdd61e1258f7ae639db06d7353387f5266e16023da3191c2798cd632c88788e |
|
MD5 | 922142e2818d890c3c1fe702785f28fc |
|
BLAKE2b-256 | 691036e3c08ecb2a83a8769446a4805b4ca63b818e156b26cac28fa25741efe2 |
File details
Details for the file kodak-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: kodak-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.10.0 Linux/5.14.18-300.fc35.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7d6373e617f7580242871ed89f4cc17d7e413ebd40f7b40afdf79912de878b4 |
|
MD5 | c64df93f4eace4aa00910188235d9a5c |
|
BLAKE2b-256 | dcccacfb03ad60eb857f13efb6bacc0b98e04534c896c78c250b4ebc17ff425a |