Repository navigation
Settings & Enumerations
All settings live in evil_flowers_catalog/settings/base.py and are read through django.conf.settings. Almost every value is also exposed as an environment variable (a few are Python-only constants — those rows are marked ❌). Settings without a default must be supplied for the feature they gate to work.
| Setting | Env | Default | Description |
|---|---|---|---|
SECRET_KEY |
✔ | — | Django secret key. Required in production. |
INSTANCE_NAME |
✔ | evilflowers.local |
Display name surfaced in error pages and OpenAPI metadata. |
EVILFLOWERS_STATUS_SUPERVISOR |
true |
/api/v1/status also asks supervisord and answers 503 unless every process is RUNNING. Set false on Kubernetes (catalog_split), where gunicorn and Celery run in their own pods without supervisord (#195). The database, broker and storage checks run either way. |
|
EVILFLOWERS_STATUS_SUPERVISOR_SOCKET |
/tmp/supervisor.sock |
supervisord's XML-RPC socket. | |
EVILFLOWERS_STATUS_TIMEOUT |
2.0 |
Seconds the status endpoint's broker check waits for a connection. | |
ALLOWED_HOSTS |
✔ | localhost |
;-separated hostnames. |
SECURE_SSL_REDIRECT |
✔ | 0 |
Force HTTPS redirects when 1. |
MEDIA_ROOT |
✔ | {BASE_DIR}/media |
Local media directory. |
DJANGO_LOG_LEVEL |
✔ | INFO |
Root logger level. |
| Env | Default | Description |
|---|---|---|
PGHOST |
— | PostgreSQL host. |
PGPORT |
5432 |
PostgreSQL port. |
PGDATABASE |
— | Database name. |
PGUSER |
— | Database user. |
PGPASSWORD |
— | Database password. |
PGBOUNCER_TRANSACTION_POOLING |
0 |
1 when PGHOST/PGPORT is PgBouncer in transaction mode: sets DISABLE_SERVER_SIDE_CURSORS, because a named cursor's next fetch can land on another server connection. Leave 0 for session mode and direct connections. |
EVILFLOWERS_DB_POOL |
0 |
1: a psycopg connection pool per gunicorn worker process, shared by its greenlets (#133). Only the gunicorn process uses it (conf/gunicorn.conf.py marks it); Celery (prefork closes the pool around every task) and management commands connect per task/command, whatever this says. |
GUNICORN_WORKERS |
4 |
Gunicorn (gevent) worker processes (conf/gunicorn.conf.py). A worker runs one request's Python at a time, so a CPU-heavy request (an entry list with facets) delays every other request of its worker. More processes may let the kernel interleave them when the pod has CPU left under its limit; measure before raising it. Each worker holds its own database pool. |
PGPOOL_MIN / PGPOOL_MAX
|
2 / 10
|
Pooled connections per worker process. PgBouncer sees up to GUNICORN_WORKERS × PGPOOL_MAX client connections per pod. In PgBouncer session mode each also pins a server connection, so keep the total under the database's max_db_connections; transaction mode has no such limit. PGPOOL_MAX=0 turns the pool off. |
PGPOOL_TIMEOUT |
5 |
Seconds a request waits for a free pooled connection before it fails (PoolTimeout). |
PGPOOL_MAX_IDLE |
300 |
Seconds an idle pooled connection is kept above PGPOOL_MIN. |
PGPOOL_HEALTH_CHECKS |
0 |
1 tests a pooled connection before each request uses it (one round trip), so a PgBouncer restart fails no request. |
| Env | Default | Description |
|---|---|---|
REDIS_HOST |
127.0.0.1 |
Redis host (cache + default Celery broker). |
REDIS_PORT |
6379 |
Redis port. |
REDIS_DATABASE |
0 |
Redis DB index. |
CELERY_BROKER_URL |
redis://{REDIS_HOST}:{REDIS_PORT}/{REDIS_DATABASE} |
Override to point Celery at a different broker. |
CELERY_BROKER_VISIBILITY_TIMEOUT |
43200 |
Seconds before Redis redelivers an unacknowledged task (12 h). Every consumer of the same Redis db restores all unacked tasks older than its own value, so keep it at least as long as the longest task of any service sharing the db (extraction passes take over 2 h). |
CELERY_TASK_TIME_LIMIT |
1800 |
Hard time limit per task in seconds (default 30 min). |
CELERY_TIMEZONE |
UTC |
Celery scheduling timezone. |
CELERY_HOSTNAME |
catalog@%h |
Node name of the catalog's Celery worker (--hostname, set in the image). %h expands to the container hostname; on k8s set a stable name such as catalog@dev, so Flower does not list every pod of a rollout. |
CELERY_WORKER_CONCURRENCY |
unset (Celery's default) | Number of prefork worker processes. Celery's default is os.cpu_count(), the node's core count, which ignores a container CPU limit (16 children in a 4-CPU pod, #129). On k8s set it to the pod's CPU limit. Unset or 0 keeps the default. |
CELERY_WORKER_PREFETCH_MULTIPLIER |
4 |
Messages each worker process reserves ahead of the one it runs. Reserved messages leave the Redis list, so the queue length an autoscaler reads under-counts the backlog and a freshly scaled pod finds nothing to take (#142). Set 1 when the worker autoscales: a worker then holds at most CELERY_WORKER_CONCURRENCY tasks. |
CELERY_TASK_ACKS_LATE |
false |
Acknowledge a task when it finishes instead of when it starts, so a task interrupted by a dead worker is delivered again (at-least-once, #142). Turn on together with CELERY_TASK_REJECT_ON_WORKER_LOST. A pod killed outright (SIGKILL after the grace period, node loss) gets its tasks back only after CELERY_BROKER_VISIBILITY_TIMEOUT (12 h). send_notification opts out (a repeat would send the e-mail twice). |
CELERY_TASK_REJECT_ON_WORKER_LOST |
false |
With late acks: requeue a task whose child process died (OOM, kill -9) instead of marking it failed. A task that kills its child every time will loop; the hard time limit (CELERY_TASK_TIME_LIMIT) is a failure, not a requeue. |
EVILFLOWERS_DISPLAY_TIME_ZONE |
Europe/Bratislava |
Time zone of dates in notification e-mails and of the assistant's daily quota reset. Processes always run in UTC (TIME_ZONE); do not change that, Celery worker events depend on it. |
| Setting | Env | Default | Description |
|---|---|---|---|
SECURED_VIEW_JWK |
✔ | — | JSON Web Key used to sign JWT access/refresh/API tokens. Required. |
SECURED_VIEW_JWT_ACCESS_TOKEN_EXPIRATION |
✔ |
5 (minutes) |
Access-token lifetime. |
SECURED_VIEW_JWT_REFRESH_TOKEN_EXPIRATION |
✔ |
1440 (minutes) |
Refresh-token lifetime. |
| Setting | Env | Default | Description |
|---|---|---|---|
EVILFLOWERS_PAGINATION_DEFAULT_LIMIT |
✔ | 10 |
Default page size for paginated REST responses. |
EVILFLOWERS_IMAGE_UPLOAD_MAX_SIZE |
✔ |
5 MB |
Maximum image upload size. |
EVILFLOWERS_IMAGE_MIME |
❌ | image/gif image/jpeg image/png |
Accepted image MIME types. |
EVILFLOWERS_IMAGE_THUMBNAIL |
❌ | (768, 480) |
Thumbnail dimensions. |
EVILFLOWERS_FEEDS_NEW_LIMIT |
✔ | 20 |
Item count for the Latest and Popular OPDS 1.2 feeds. |
EVILFLOWERS_OPDS_PAGE_SIZE |
✔ | 50 |
Page size of OPDS 1.2 acquisition feeds and the shelf (RFC 5005 next/previous links). A feed's own per_page overrides it. |
EVILFLOWERS_OPDS_COMPLETE_FEED_MAX_ENTRIES |
✔ | 2000 |
The OPDS 1.2 Complete Acquisition Feed is served whole with fh:complete up to this many entries; a larger catalog is paged at this size (OPDS 1.2 §2.5). |
EVILFLOWERS_IDENTIFIERS |
❌ | isbn google doi dataverse_pid dataverse_dataset_id |
Recognized external identifier types. |
EVILFLOWERS_MODIFIERS |
❌ | {"application/pdf": "apps.core.modifiers.pdf.PDFModifier"} |
MIME → modifier class for per-acquisition transformations (slicing, watermarking, …). |
EVILFLOWERS_CONTACT_EMAIL |
✔ (CONTACT_EMAIL) |
root@localhost |
Administrator contact address surfaced in PDF intro pages and notification footers. |
EVILFLOWERS_BASE_URL |
✔ | falls back to EVILFLOWERS_READIUM_BASE_URL
|
Public base URL used to build absolute links in notification e-mails (claim links, .lcpl downloads). Must be the public https origin; readium.W001 warns at startup when it is loopback while notifications are enabled. |
EVILFLOWERS_ALLOWED_IP_RANGES |
✔ | unset (disabled) | Comma-separated CIDRs that may download acquisitions. Empty disables IP gating. |
| Setting | Env | Default | Description |
|---|---|---|---|
EVILFLOWERS_ISBN_METADATA_SERVICES |
✔ | crossref,openlibrary,snk,googlebooks |
Provider queue, asked in order. Each field takes the first provider's value, and the queue continues past a match while a field the entry lacks is still empty. crossref (keeps editors apart), openlibrary, snk (Slovak National Library, Z39.50), googlebooks (only with a key); isbnlib's openl, goob, wiki are still accepted. Used by evilflowers_metadata_fetch and enrich_from_isbn. |
EVILFLOWERS_ISBN_METADATA_DELAY |
✔ | 1.0 |
Seconds enrich_from_isbn waits between two entries. |
EVILFLOWERS_ISBN_METADATA_TIMEOUT |
✔ | 10 |
Seconds one provider may take (HTTP request or Z39.50 session). |
EVILFLOWERS_CROSSREF_MAILTO |
✔ | empty | Contact address sent to Crossref (its "polite pool"). |
EVILFLOWERS_GOOGLE_BOOKS_API_KEY |
✔ | empty | Google Books API key (1Password "Elvira – Google Books API"). Without it googlebooks is skipped: keyless requests get a daily quota of 0. |
EVILFLOWERS_SNK_Z3950 |
✔ | z3950.snk.sk:1111/clas01 |
Slovak National Library union catalogue, host:port/database. Needs outbound TCP 1111. |
EVILFLOWERS_DECIDER_BANDS (JSON) holds one rule per task. Every rule stays empty until calibration (knowledge#65); until then nothing is hidden or re-ranked, and every answer is still stored.
| Rule | Shape | Effect |
|---|---|---|
figure, table
|
{"hide": [...], "upper": 0.9, "lower": 0.6} |
Region bands (#189). With thresholds, figure search sorts review after keep, and tables use their score as a tie-break (#205). |
edge |
{"hide": ["none"], "upper": 0.9} |
Hides unrelated section pairs (#190). A relation whose p ≥ upper multiplies its pair's similarity by EVILFLOWERS_DECIDER_RELATION_WEIGHTS (#203). |
paragraph |
{"hide": ["references", "toc", "legal", "running_head"], "upper": 0.9, "lower": 0.6} |
Hidden paragraphs stay in the reader but leave passage search, the assistant, section similarity and summaries. manage.py reband_paragraphs applies a changed rule (#208). |
mention, shows
|
{"upper": 0.9} (hides named / no by default) |
Keeps MENTIONS / SHOWS edges out of the graph (#206). |
harvest_match |
— | Not read yet: harvest match suggestions always wait for a librarian (#207). |
| Setting | Env | Default | Description |
|---|---|---|---|
EVILFLOWERS_DECIDER_RELATION_WEIGHTS |
✔ | {} |
JSON factors per relation (same, pre, example, loose) applied in related_sections above the edge threshold. |
EVILFLOWERS_DECIDER_MENTION_SCHEDULE |
✔ |
45 2 * * * with a decider URL |
Beat job decider-mention-sweep (#206). Empty turns it off. |
EVILFLOWERS_DECIDER_MENTION_LIMIT |
✔ | 2000 |
MENTIONS pairs and SHOWS pairs asked per night, each. |
EVILFLOWERS_DECIDER_MATCH_CANDIDATES |
✔ | 5 |
Candidate entries offered to the decider for a harvested record with no shared identifier (#207). |
| Setting | Env | Default | Description |
|---|---|---|---|
EVILFLOWERS_ENFORCE_USER_ACQUISITIONS |
✔ | 0 |
When 1, creating a UserAcquisition is required to download a file and GET /api/v1/acquisitions/{id} redirects with HTTP 303 See Other. |
EVILFLOWERS_USER_ACQUISITION_MODE |
— | — | Removed in IP-036: a live grant of the same acquisition and page range is reused. See Entries — Acquisitions. |
EVILFLOWERS_PERSONALISED_COPY_SCOPE |
✔ | reader |
reader (a personalised copy per reader and variant) or grant (a copy per grant). IP-036. |
EVILFLOWERS_PERSONALISED_PRERENDER |
✔ | 1 |
Render a new personal grant's PDF copy in a worker before its first download. IP-036. |
EVILFLOWERS_FILES_RANGE_FAST_PATH |
✔ | 1 |
Serve signed-URL ranges of a pinned reading session without the database; 0 = always the full path. IP-036. |
EVILFLOWERS_FILES_SIGNED_URL_TTL |
✔ | 21600 |
Seconds a stream_url works (#214). |
EVILFLOWERS_PERSONALISED_SHARED_BASE |
✔ | 1 |
Render readers' PDF copies from a shared normalised base (#214). |
EVILFLOWERS_PERSONALISED_BASE_IDLE_HOURS |
✔ | 168 |
A shared base is evicted this long after its last use (#214). |
See Storage for the full driver matrix.
| Setting | Env | Default | Description |
|---|---|---|---|
EVILFLOWERS_STORAGE_DRIVER |
✔ | apps.files.storage.filesystem.FileSystemStorage |
Dotted path to the storage backend class. |
EVILFLOWERS_STORAGE_FILESYSTEM_DATADIR |
✔ | {BASE_DIR}/data/evilflowers/storage |
Root directory for the filesystem driver. |
EVILFLOWERS_STORAGE_S3_HOST |
✔ | — | S3-compatible endpoint (e.g. s3.amazonaws.com, minio:9000). |
EVILFLOWERS_STORAGE_S3_ACCESS_KEY |
✔ | — | S3 access key. |
EVILFLOWERS_STORAGE_S3_SECRET_KEY |
✔ | — | S3 secret key. |
EVILFLOWERS_STORAGE_S3_SECURE |
✔ | 0 |
TLS toggle (1 = HTTPS). |
EVILFLOWERS_STORAGE_S3_BUCKET |
✔ | — | Target bucket. |
EVILFLOWERS_ORPHAN_CLEANUP_SCHEDULE |
✔ | unset (off) | Cron expression (m h dom mon dow) of the beat job that deletes storage directories no catalog or entry owns (apps.tasks.tasks.cleanup_orphans). |
EVILFLOWERS_ORPHAN_CLEANUP_MIN_AGE_HOURS |
✔ | 168 |
An orphan directory holding a file modified more recently than this is kept. |
Cron expressions are in UTC (m h dom mon dow). An empty value turns the beat job off. Each beat job is also a maintenance kind on /api/v1/jobs, where it can be started by hand.
| Setting | Env | Default | Description |
|---|---|---|---|
EVILFLOWERS_ASSISTANT_SUMMARISE_SCHEDULE |
✔ | empty (off) | Beat job assistant-summarise-sweep. It declares assistant.summarise_sections for the next publications without summaries, most read first, and skips LCP titles. Suggested value: */10 0-3 * * *. |
EVILFLOWERS_ASSISTANT_SUMMARISE_CONCURRENCY |
✔ | 1 |
Publications whose summaries may be on their way at once. A tick only tops this up. |
EVILFLOWERS_ASSISTANT_SUMMARISE_RETRY_HOURS |
✔ | 20 |
A publication whose summaries failed (after 3 attempts) is swept again after this many hours. |
EVILFLOWERS_ASSISTANT_DESCRIBE_FIGURES_SCHEDULE |
✔ | empty (off) | Beat job assistant-describe-figures. It declares assistant.describe_figures, and a tick is a no-op while the previous batch is still on its way. Suggested value: 5,35 0-3 * * *. |
EVILFLOWERS_ASSISTANT_DESCRIBE_FIGURES_BATCH |
✔ | 10 |
Figures one batch describes. |
EVILFLOWERS_GRAPH_REBUILD_SCHEDULE |
✔ | 50 4 * * * |
Beat job graph-rebuild. It drops and re-projects the Apache AGE graph, and is skipped where AGE is not installed. |
EVILFLOWERS_POST_PROCESS_SWEEP_SCHEDULE |
✔ |
*/5 * * * * when EVILFLOWERS_EXTRACTION_ENABLED, else empty (off) |
Beat job extraction-post-process-sweep (#155). It declares extraction.post_process for active runs not marked with the current POST_PROCESS_VERSION, most read first. The first pass after the migration is the backfill; /api/v1/jobs/summary?kind=extraction.post_process shows its progress. |
EVILFLOWERS_POST_PROCESS_SWEEP_BATCH |
✔ | 4 |
Post-processing runs in flight at most. Each embeds figures through TEI. |
EVILFLOWERS_POST_PROCESS_MAX_ATTEMPTS |
✔ | 3 |
Runs of one run's post-processing before its job is failed. The sweep then skips it until a manual apply or a new POST_PROCESS_VERSION. |
EVILFLOWERS_SIMILARITY_REBUILD_SCHEDULE |
✔ | 20 4 * * 0 |
Beat job extraction-similarity-rebuild (#155). It recomputes every cross-book section pair with one set of per-language means, weekly, before graph-rebuild re-projects SIMILAR_TO. |
EVILFLOWERS_EXTRACTION_STEP_RERUN |
✔ |
0 (off) |
Lets extraction.run take {"steps": [...]} and re-run only the unfinished steps of a failed run, keeping the finished ones (#183). Turn on only with an analyzer that supports the steps kwarg: an older one ignores it, its full /start is refused (409) and the run stays failed. Off: the spec is refused with a reason. |
| Env | Default | Description |
|---|---|---|
EVILFLOWERS_EVENT_BROKER_EXECUTOR |
— | Dotted path to the executor (apps.events.services.CeleryEventExecutionService or apps.events.services.KafkaEventExecutionService). |
EVILFLOWERS_EVENT_BROKER_TRANSFORMER |
— | Dotted path to the payload transformer. |
KAFKA_HOST |
127.0.0.1 |
Kafka bootstrap host (used by KafkaEventExecutionService). |
KAFKA_PORT |
9092 |
Kafka bootstrap port. |
See Readium LCP Integration and Readium LCP Deployment for the full picture.
| Setting | Default | Description |
|---|---|---|
EVILFLOWERS_READIUM_DATADIR |
{BASE_DIR}/data/evilflowers/readium |
Local artifact directory (encrypted file staging). |
EVILFLOWERS_READIUM_LCPSV_URL |
http://127.0.0.1:8989 |
LCP License Server URL. Include htpasswd creds for authenticated upstream. |
EVILFLOWERS_READIUM_LSDSV_URL |
http://127.0.0.1:8990 |
LCP License Status Server URL. |
EVILFLOWERS_READIUM_BASE_URL |
http://{DJANGO_RUNSERVER_IP}:{DJANGO_RUNSERVER_PORT} |
Public base used inside LCP license link rewrites. |
EVILFLOWERS_READIUM_PROVIDER_URL |
falls back to EVILFLOWERS_READIUM_BASE_URL
|
Provider URL embedded in provider field of every LCP license. |
EVILFLOWERS_READIUM_DEFAULT_BORROW_DURATION_DAYS |
14 |
Default loan length when callers don't pass one. |
EVILFLOWERS_READIUM_PRINT_LIMIT_PAGES |
✔ | 10 |
EVILFLOWERS_READIUM_COPY_LIMIT_CHARS |
✔ | 2048 |
EVILFLOWERS_READIUM_MAX_RENEW_DAYS |
14 |
Maximum renewal extension from now (IP-003 §3e). |
EVILFLOWERS_READIUM_RENEW_EMBARGO_DAYS |
30 |
How long after creation a license cannot yet be renewed. |
EVILFLOWERS_READIUM_MAX_RENEWALS |
unset (uncapped) | Optional integer cap on per-license renewals (IP-009 Phase 5). |
EVILFLOWERS_READIUM_OVERSHARE_THRESHOLD |
5 |
Device-count threshold for check_overshared_licenses (IP-003 Phase 2). |
EVILFLOWERS_READIUM_RESERVATION_CLAIM_HOURS |
48 |
Claim window after a reservation flips to available. |
EVILFLOWERS_READIUM_MAX_RESERVATIONS_PER_USER |
5 |
Per-user cap on non-terminal reservations. |
EVILFLOWERS_READIUM_EXPIRY_REMINDER_DAYS |
3 |
How many days ahead of expiry the notify_expiring_licenses job fires. |
EVILFLOWERS_CAPABILITY_TOKEN_LCPL_TTL_SECONDS |
60 |
TTL for single-use .lcpl download tokens (IP-009 Phase 4). |
EVILFLOWERS_CAPABILITY_TOKEN_LCPL_FEED_TTL_SECONDS |
1800 |
TTL for the multi-use .lcpl tokens embedded in OPDS feeds. |
| Setting | Default | Description |
|---|---|---|
EVILFLOWERS_OPDS2_PAGE_SIZE |
50 |
Default publication count per OPDS 2.0 page. |
EVILFLOWERS_OPDS2_MAX_PAGE_SIZE |
100 |
Hard maximum for per_page. |
See Model Context Protocol for the endpoint and tool reference.
| Env | Default | Description |
|---|---|---|
EVILFLOWERS_MCP_ENABLED |
1 |
0 unmounts /mcp/v1 entirely — a probe gets 404, not a disabled endpoint. |
EVILFLOWERS_MCP_DEFAULT_LIMIT |
10 |
Page size when a tool call does not specify one. |
EVILFLOWERS_MCP_MAX_LIMIT |
50 |
Ceiling on limit. Below the REST one on purpose: every result is spent from a model's context window. |
EVILFLOWERS_MCP_SUMMARY_MAX_CHARS |
600 |
Summary truncation in search hits. |
EVILFLOWERS_MCP_CONTENT_MAX_CHARS |
4000 |
Description truncation in get_entry. |
EVILFLOWERS_MCP_ALLOWED_ORIGINS |
origin of EVILFLOWERS_BASE_URL
|
Comma-separated browser origins permitted to reach the endpoint (DNS-rebinding guard). Requests without an Origin header (non-browser MCP clients) always pass. * disables the check. |
EVILFLOWERS_MCP_ALLOW_WRITE |
1 |
The management tools (create/update/delete feeds and categories). 0 removes them from tools/list entirely, so an agent is never told they exist. |
EVILFLOWERS_MCP_REQUIRE_AUTHENTICATION |
0 |
1 refuses anonymous sessions at the transport with a 401 challenge — no public browsing without a credential, and no tool listing either. |
EVILFLOWERS_MCP_AUTHENTICATION_SCHEMAS |
Bearer |
Comma-separated subset of SECURED_VIEW_AUTHENTICATION_SCHEMAS this endpoint accepts. Basic is excluded by default: it would put a reusable (possibly LDAP) password in an agent's config file, whereas an API key is independently revocable. |
EVILFLOWERS_MCP_MAX_REQUEST_BYTES |
1048576 |
Ceiling on one JSON-RPC request body. |
Search runs in PostgreSQL; the search-service and SEARCH_SERVICE_* are gone.
| Env | Default | Description |
|---|---|---|
EVILFLOWERS_EMBEDDING_URL |
empty (words only) |
tei-embed base URL (multilingual-e5-large-instruct). |
EVILFLOWERS_EMBEDDING_API_KEY |
empty | Bearer key of tei-embed (1Password ELVIRA/stu.inference.tei). |
EVILFLOWERS_EMBEDDING_HOST |
empty |
Host header for the Compose path through the internal gateway (embed.elvira.internal). |
EVILFLOWERS_EMBEDDING_MODEL |
from TEI /info
|
model@revision stored with every vector; pin it in production so /info is never on the request path. |
EVILFLOWERS_EMBEDDING_BATCH_LANE |
bulk |
Gateway lane of document batches (entries, regions, passages), sent as x-embed-lane like the text worker's TEI_LANE: the bulk lane has a 150 s timeout and E-core pods and keeps batches away from searches. Empty sends no header. Readers' queries never carry it. |
EVILFLOWERS_EMBEDDING_BATCH_TIMEOUT |
150 |
Seconds one batch request waits, matching the bulk lane's gateway timeout. Batches retry 429/503/504, timeouts and connection errors 3 times. |
EVILFLOWERS_EMBEDDING_QUERY_TIMEOUT |
0.3 |
Seconds a catalog search waits for TEI to embed the query (#134); later it runs on the words only (metadata.search.degraded) and stays so for its later pages (10 min). Type-ahead never waits: it uses a query vector only when a search cached one. The assistant and passage search keep 2 s. |
EVILFLOWERS_SEARCH_EMBED_CONCURRENT |
true |
Embed the query on a thread while the lexical query runs (#141), so the wait for TEI overlaps the SQL. false keeps it on the request thread, after the lexical leg. |
EVILFLOWERS_SEARCH_EMBED_THREADS |
4 |
Threads per process (gunicorn worker, Celery child) for those embeds. |
EVILFLOWERS_SEARCH_VECTOR_MIN_SCORE |
0.8 |
Cosine similarity floor of the meaning channel. |
EVILFLOWERS_SEARCH_VECTOR_WEIGHT |
0.5 |
Weight of the meaning channel in Reciprocal Rank Fusion (words: 1.0). |
EVILFLOWERS_SEARCH_VECTOR_CANDIDATES |
100 |
Entries the meaning channel contributes at most. |
EVILFLOWERS_SEARCH_RRF_K |
60 |
RRF constant. |
EVILFLOWERS_SEARCH_TRIGRAM_THRESHOLD |
0.45 |
Typo fallback: trigram word similarity of title/author. |
EVILFLOWERS_SEARCH_SUGGEST_THRESHOLD |
0.3 |
did_you_mean: similarity of a suggested word. |
EVILFLOWERS_SEARCH_PASSAGE_WORD_WEIGHT |
1.0 |
Passage search (#188 option C): weight of the word channel in the passage fusion (vectors: 1.0). |
EVILFLOWERS_SEARCH_PASSAGE_RERANK_URL |
empty (off) | Passage search (#188 option B): tei-rerank base URL (bge-reranker-v2-m3). When set, the best fused paragraphs are reordered by the cross-encoder and a passage's score is its relevance; a failure or timeout leaves the fused order. Leave empty until assistant_eval retrieval --rerank-url … has measured it. |
EVILFLOWERS_SEARCH_PASSAGE_RERANK_API_KEY |
EVILFLOWERS_EMBEDDING_API_KEY |
Bearer key of tei-rerank. |
EVILFLOWERS_SEARCH_PASSAGE_RERANK_HOST |
empty |
Host header for the Compose path (rerank.elvira.internal). |
EVILFLOWERS_SEARCH_PASSAGE_RERANK_CANDIDATES |
30 |
Fused paragraphs sent to the reranker (one batch per search). |
EVILFLOWERS_SEARCH_PASSAGE_RERANK_TIMEOUT |
3.0 |
Seconds the reranker may take before the fused order stands. |
| Env | Default | Description |
|---|---|---|
EVILFLOWERS_REVIEWS_ENABLED |
1 |
0 answers 404 on the review endpoints and returns rating: null on entries. |
EVILFLOWERS_REVIEWS_BODY_MAX_CHARS |
5000 |
Longest review text accepted. |
EVILFLOWERS_REVIEWS_PRIOR_MEAN |
3.0 |
Prior of the Bayesian average used by order_by=-rating. |
EVILFLOWERS_REVIEWS_PRIOR_WEIGHT |
5 |
How many prior ratings the Bayesian average adds; higher pulls entries with few ratings harder to the prior. |
| Setting | Env | Default | Description |
|---|---|---|---|
EVILFLOWERS_NOTIFICATIONS_ENABLED |
✔ | false |
Master switch for the notification dispatcher; signals stay silent when off. |
EVILFLOWERS_NOTIFICATION_FROM_EMAIL |
✔ | falls back to EVILFLOWERS_CONTACT_EMAIL
|
From: address used by NotificationService. |
EVILFLOWERS_NOTIFICATION_SCOPED_TOKEN_TTL_HOURS |
✔ | 72 |
TTL for download tokens embedded in notification CTAs. |
EVILFLOWERS_NOTIFICATION_LIBRARY_NAME |
✔ | Evil Flowers Catalog |
Library name shown in the e-mail header and footer (STU: Digitálna knižnica Elvíra / Digital Library Elvira). |
Application-level cache lifetimes (Redis keys prefixed with evilflowers:). Values are in minutes.
| Env | Default | Description |
|---|---|---|
EVILFLOWERS_CACHE_HASHES |
10080 (7 days) |
TTL for password-hash lookups. |
EVILFLOWERS_CACHE_API_KEYS |
0 (disabled) |
TTL for the API-key resolver — 0 disables caching. |
EVILFLOWERS_CACHE_CLIENT_IMAGES |
1440 (1 day) |
Cache-Control: max-age returned with cover/thumbnail images. |
EVILFLOWERS_BACKUP_DESTINATION and EVILFLOWERS_BACKUP_SCHEDULE together register the daily backup Celery beat job — both must be set.
| Env | Description |
|---|---|
EVILFLOWERS_BACKUP_PGDUMP_BIN |
Path to the pg_dump binary (default: pg_dump). |
EVILFLOWERS_BACKUP_PGHOST / EVILFLOWERS_BACKUP_PGPORT
|
Direct PostgreSQL host and port for pg_dump, past PgBouncer. Unset: PGHOST / PGPORT. |
EVILFLOWERS_BACKUP_EXCLUDE_TABLE_DATA |
Comma-separated table patterns whose rows pg_dump skips (--exclude-table-data); the schema stays. E.g. extraction_* where extraction results can be re-derived. Unset: everything. |
EVILFLOWERS_BACKUP_SCHEDULE |
Cron expression (m h dom mon dow) controlling the backup beat job. |
EVILFLOWERS_BACKUP_TIME_LIMIT |
Hard limit of the backup task in seconds (default 10800, 3 h). It overrides CELERY_TASK_TIME_LIMIT for this task and is also the jobs sweeper's lost threshold. Prod (~26 GiB) uses 21600. |
EVILFLOWERS_BACKUP_DESTINATION |
Backup target — local path or s3://bucket/prefix. |
EVILFLOWERS_BACKUP_S3_HOST |
S3 endpoint for the destination strategy. |
EVILFLOWERS_BACKUP_S3_ACCESS_KEY |
Access key for the backup bucket. |
EVILFLOWERS_BACKUP_S3_SECRET_KEY |
Secret key for the backup bucket. |
EVILFLOWERS_BACKUP_S3_SECURE |
1 (default) for HTTPS, 0 to disable TLS. |
Used by apps.dataverse.*. All values are consumed via django.conf.settings. The legacy os.getenv() names are kept only for backwards compatibility — application code uses the EVILFLOWERS_* constants.
| Env | Default | Description |
|---|---|---|
DATAVERSE_API_TOKEN |
— | API token used when calling the upstream Dataverse instance. |
DATAVERSE_WORKFLOW_SECRET |
— | Shared secret for the prepublish workflow webhook. |
DV_BASE_INTERNAL |
http://dataverse:8080 |
Internal Dataverse URL (server-to-server). |
DV_PUBLIC_BASE |
falls back to DV_BASE_INTERNAL
|
Public Dataverse URL embedded in user-facing links. |
DV_WORKFLOW_RESUME_BASE |
empty (use Dataverse base) | Workflow-resume base URL override. |
EVILFLOWERS_DATAVERSE_CATALOG_MAP |
empty | JSON map of Dataverse identifier → catalog url_name. |
EVILFLOWERS_DATAVERSE_GLOBAL_ID_PREFIXES |
empty | JSON list of accepted persistent-id prefixes. |
DATAVERSE_CATALOG_URL_NAME |
empty | Deployment-wide fallback catalog. |
EVILFLOWERS_DATAVERSE_SYNC_DELETE_REMOVED |
false |
When truthy, delete acquisitions removed from Dataverse during sync. |
DATAVERSE_RESUME_WORKFLOW |
false |
Gate the workflow-resume Celery task. |
DATAVERSE_RESUME_WORKFLOW_ATTEMPTS |
10 |
Retry budget for workflow resume. |
DATAVERSE_RESUME_WORKFLOW_INITIAL_DELAY |
1.0 |
Initial backoff (seconds) for workflow resume. |
DATAVERSE_AUTO_WHITELIST_WORKFLOW_RESUME |
false |
Auto-add the resume callback to the workflow whitelist on first use. |
| Env | Description |
|---|---|
EVILFLOWERS_LOG_FORMAT |
json (default): one JSON object per line with level and trace_id; text for a terminal. |
OTEL_EXPORTER_OTLP_ENDPOINT |
OTLP/HTTP collector. Unset: the default gateway (or HOST_IP) is probed on port 4318 once per process. |
OTEL_EXPORTER_OTLP_AUTODISCOVER |
false disables that probe. |
OTEL_SERVICE_NAME |
Defaults to evilflowers. |
OTEL_RESOURCE_ATTRIBUTES |
e.g. service.namespace=elvira,deployment.environment.name=production. |
OTEL_TRACES_EXPORTER / OTEL_METRICS_EXPORTER
|
otlp (default), console, none. |
OTEL_SDK_DISABLED |
true turns telemetry off. |
Logfire, Elastic APM and Sentry were removed in IP-019; OpenTelemetry is the only telemetry. See docs/observability.md.
All keys are prefixed with evilflowers: (the CACHES.default.KEY_PREFIX).
| Key pattern | Purpose |
|---|---|
evilflowers:refresh_token:{token} |
Refresh-token revocation tracking. See Security — Authentication. |
evilflowers:api_key:{token} |
Cached API key lookups (TTL: EVILFLOWERS_CACHE_API_KEYS). |
evilflowers:password_hash:{username} |
Cached password-hash lookups (TTL: EVILFLOWERS_CACHE_HASHES). |
The standard Django permissions are used. The most commonly referenced ones:
| Permission | Effect |
|---|---|
core.add_user |
Create new users. |
core.view_user |
List users other than self. |
core.change_user |
Edit users other than self. |
core.delete_user |
Delete users. |
core.add_catalog |
Create new catalogs. |
core.add_apikey |
Create long-lived API keys. |
core.change_entry |
Edit any entry (catalog managers and superusers). |
Catalog-scoped access is controlled by UserCatalog.level (read / write / manage) — see Security — Authorization model.
Made with ❤️ and ☕️ Sibyx and EvilFlowers community.
We provide complete OpenAPI documentation on elvira.digital/EvilFlowersCatalog/. If you are looking also for some example feel free to check the Insomnia collection bellow (keep in mind that the Insomnia collection can be sometimes little bit outdated).