Skip to main content

A thumbor extension for DASH

Project description

thumbor_dash

A thumbor server extension for DASH

Usage

Requirements

  • Python >= 3.9
  • pip >= 21.1

1. Clone the repo

git clone https://github.com/mayoreee/thumbor_dash.git

cd thumbor_dash

2. Create a virtual environment

python3 -m venv /path/to/new/virtual/environment

Then, activate the virtual environment as described here

3. Install thumbor_dash and its dependencies

pip install .

Then, activate the virtual environment

4. Create a configuration file

thumbor-config > thumbor.conf

5. Add to thumbor.conf file

import thumbor_dash
from thumbor.handler_lists import BUILTIN_HANDLERS


HANDLER_LISTS = BUILTIN_HANDLERS + [
    'thumbor_dash.handler_lists.dashauth'
]

DASHAUTH_ROUTE = '/dashauth'

URL_SIGNER = 'thumbor_dash.url_signers.base64_hmac_sha1'

ALLOW_UNSAFE_URL = False 

# Set allowed thumbnail size
MIN_WIDTH = 1 
MIN_HEIGHT = 1
MAX_WIDTH = 1200
MAX_HEIGHT = 800

6. Run thumbor server with the configuration file

thumbor --conf=thumbor.conf

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

thumbor_dash-0.0.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

thumbor_dash-0.0.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file thumbor_dash-0.0.2.tar.gz.

File metadata

  • Download URL: thumbor_dash-0.0.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for thumbor_dash-0.0.2.tar.gz
Algorithm Hash digest
SHA256 18a15b685f82ad720ca12213bc292ee0e9d1997271ca0f8e1b9a99e76bf6837d
MD5 422151e411af2d330175a5ce293720b1
BLAKE2b-256 ca2b35844cc6b4235a077dd3da00c72624a1048d93ec64563cd001ceb4e2f6e3

See more details on using hashes here.

File details

Details for the file thumbor_dash-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: thumbor_dash-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for thumbor_dash-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 64c1f1e7132cba704121eb8ad956ca49bd3f81af39ece89cd99b75e9eab7ffc3
MD5 84a27bca133b12561361933c381b1ad9
BLAKE2b-256 bfa50189bebe14748c466ff90fc8e2c7d12b8906e69eb3d609bb3f5e3fa6d7b2

See more details on using hashes here.

Supported by

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