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.1.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.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: image_serve-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3d296a8fe7ae953f9eaa77b57ac483bb278adafa830ddfbff1ba4f1e12a05146
MD5 10b2de5154d1a134f5b9fc511abe27b4
BLAKE2b-256 76ee72af06e4e482ebda77f9d9a82a7863298375cba0951ba222c34d2a64bdd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: image_serve-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c21f710af8f977af2474c0f6923cf84716ddbb449863cab017606eb333b3326
MD5 1ea20943c23ef65c5e61a28e02ec407a
BLAKE2b-256 c59d3e813119512284834a65e65abcf1d2c832e1beaea5dd20e7e146ffffd54e

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