{"id":24093217,"url":"https://github.com/umd-lib/mezcal","last_synced_at":"2026-02-08T11:33:24.833Z","repository":{"id":147002976,"uuid":"610943063","full_name":"umd-lib/mezcal","owner":"umd-lib","description":"Mezzanine Caching and Access Layer Web Application","archived":false,"fork":false,"pushed_at":"2025-09-23T18:57:30.000Z","size":76607,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-09-23T20:37:07.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umd-lib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-07T19:47:07.000Z","updated_at":"2025-08-18T13:14:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"6df765cc-65bb-45c8-9b49-93a7dd8c239d","html_url":"https://github.com/umd-lib/mezcal","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/umd-lib/mezcal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fmezcal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fmezcal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fmezcal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fmezcal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umd-lib","download_url":"https://codeload.github.com/umd-lib/mezcal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fmezcal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29229290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T09:43:19.170Z","status":"ssl_error","status_checked_at":"2026-02-08T09:42:55.556Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-10T09:26:08.876Z","updated_at":"2026-02-08T11:33:24.826Z","avatar_url":"https://github.com/umd-lib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mezcal\n\nMezzanine Caching and Access Layer Web Application\n\n## Purpose\n\nMezcal serves as an intermediary microservice between a repository storing\npreservation masters of digital object images (typically in a storage- and\nbandwidth-intensive format such as TIFF) and a IIIF image server\nthat delivers these images over the web. As its name suggests, it stores\nand serves mezzanine-quality versions of the digital object images as JPEGs.\n\n## Development Environment\n\nPython version: 3.11\n\n### Installation\n\n```zsh\ngit clone git@github.com:umd-lib/mezcal.git\ncd mezcal\npyenv install --skip-existing $(cat .python-version)\npython -m venv .venv --prompt mezcal-py$(cat .python-version)\nsource .venv/bin/activate\npip install -e '.[test]'\n```\n\n### Configuration\n\nCreate a `.env` file with the following contents:\n\n```dotenv\n# authentication token for the origin repository\nMEZCAL_JWT_TOKEN=...\n# base URL to the origin repository\nMEZCAL_REPO_BASE_URL=...\n# local storage directory\nMEZCAL_STORAGE_DIR=image_cache\n# storage directory layout\n# allowed values are \"basic\", \"md5_encoded\", and \"md5_encoded_pairtree\"\nMEZCAL_STORAGE_LAYOUT=basic\n# maximum pixel size of an image;\n# default is 0, which lets PIL use its default;\n# set to a positive number to change the maximum size,\n# or set to a negative number to set no limit\nMEZCAL_MAX_IMAGE_PIXELS=0\n# enable debugging and hot reloading when run via \"flask run\"\nFLASK_DEBUG=1\n```\n\nFor further information about `MEZCAL_MAX_IMAGE_PIXELS`, see the\n[Pillow 5.0.0 Release Notes]\n\n### Running\n\nTo run the application in debug mode, with hot code reloading:\n\n```bash\nflask --app mezcal.web:app run\n```\n\nTo run the application in production mode, using the [waitress] WSGI server:\n\n```bash\nmezcal\n```\n\nEither way, the application will be available at \u003chttp://localhost:5000/\u003e\n\n### Running with Docker\n\nBuild the image:\n\n```bash\ndocker build -t docker.lib.umd.edu/mezcal:latest .\n```\n\nCreate a volume to store the mezzanine files:\n\n```bash\ndocker volume create mezcal-cache\n```\n\nRun the container:\n\n```zsh\ndocker run -d -p 5000:5000 \\\n    -v mezcal-cache:/var/cache/mezcal \\\n    -e MEZCAL_JWT_TOKEN=... \\\n    -e MEZCAL_REPO_BASE_URL=... \\\n    -e MEZCAL_STORAGE_DIR=/var/cache/mezcal \\\n    -e MEZCAL_STORAGE_LAYOUT=basic \\\n    docker.lib.umd.edu/mezcal:latest\n```\n\nIf you created a `.env` file (see [Configuration](#configuration)), you \ncan run the Docker image using that file. If you mount a `mezcal-cache` \nvolume, you should make sure that your `MEZCAL_STORAGE_DIR` is \n`/var/cache/mezcal`.\n\n```zsh\ndocker run -d -p 5000:5000 \\\n    -v mezcal-cache:/var/cache/mezcal \\\n    --env-file .env \\\n    docker.lib.umd.edu/mezcal:latest\n```\n\n[pyenv]: https://github.com/pyenv/pyenv\n[waitress]: https://pypi.org/project/waitress/\n[Pillow 5.0.0 Release Notes]: https://github.com/python-pillow/Pillow/blob/fdbd719da4c77c7e23e2e9e9b71d0d177f2d3369/docs/releasenotes/5.0.0.rst#decompression-bombs-now-raise-exceptions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fmezcal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumd-lib%2Fmezcal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fmezcal/lists"}