Skip to main content

Serve images from current directory or JSON index as a web gallery

Project description

image-serve

Serve images from your current working directory as a simple web gallery.

Alternatively, you can use a pre-built JSON index denoting filenames to serve images deeply nested in a variety of directories (iMessage attachment backup, for example).

Installation

pip install image-serve

Usage

Serve Current Directory

Simply run image-serve to serve the current directory.

Extra options:

usage: image-serve [-h] [--host HOST] [--port PORT] [--threads THREADS] [-v]
              [--index-file INDEX_FILE]

Serve images in the current working directory as a simple gallery.

options:
  -h, --help            show this help message and exit
  --host HOST           Host/IP to bind (default: 0.0.0.0)
  --port PORT           Port to bind (default: 8000)
  --threads THREADS     Number of worker threads (default: 8)
  -v, --verbose         Enable verbose server logs (still hides dev server
                        banners)
  --index-file INDEX_FILE
                        Path to JSON index file to serve from (instead of
                        CWD). Use 'generate_index.py' to create one.

Serve from JSON Index

First, generate an index:

python examples/indexed/generate_index.py /path/to/images --output index.json

Then serve:

image-serve --index-file index.json --port 8000

Options

  • --host HOST: Host to bind (default: 0.0.0.0)
  • --port PORT: Port to bind (default: 8000)
  • --threads THREADS: Number of threads (default: 8)
  • --index-file FILE: JSON index file to serve from
  • -v, --verbose: Verbose logging

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image_serve-0.1.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

image_serve-0.1.2-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file image_serve-0.1.2.tar.gz.

File metadata

  • Download URL: image_serve-0.1.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for image_serve-0.1.2.tar.gz
Algorithm Hash digest
SHA256 86b35f408ee073403e614bacabce91f857bc54420a11007bde1edcc0f1684743
MD5 26c3b48cd673928614962a327ddce7e9
BLAKE2b-256 cca406c5abf06515813ab24b61515b83375737218134c0548c72cdd00e40f956

See more details on using hashes here.

File details

Details for the file image_serve-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: image_serve-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for image_serve-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d812ef45c4dbf1dfd0fdeb8fc5acbb17ef1f2eaef7f1e09e80ec641cc10731aa
MD5 2d9c89afda07cc43e76a12346af14c7b
BLAKE2b-256 0fb9b193a7ba8e8c721147956bcb89eff08a212d08ec694ecb68a2687f7f20f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page