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         Show directory statistics and image counts in logs
  --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: Show directory statistics and image counts in logs

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.3.tar.gz (8.8 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.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: image_serve-0.1.3.tar.gz
  • Upload date:
  • Size: 8.8 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.3.tar.gz
Algorithm Hash digest
SHA256 337ad34e725c846714a5f8c4d1272f42bd3eb03b277dadfd0e6a0007c2a80d93
MD5 f165661d7edd2ef961c91939672365d4
BLAKE2b-256 9918ea2053e752281e11602878ce1494096d89452f3ee2bf3f47ff881d32a9d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: image_serve-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a925594a7f976cd8008d735b9b6f215acbe45a46d95cf724e5b6ace2c9fdcc2
MD5 248b531252261b6d117739427b17da39
BLAKE2b-256 db2cb5ef1ee63d563684b59a5cae1002a1d12315189f08b0936a58fc80ccd28c

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