dev [release-patch] #6

Merged
WorldTeacher merged 13 commits from dev into main 2025-11-25 09:05:54 +00:00
Showing only changes of commit 6f38dd482e - Show all commits

View File

@@ -5,7 +5,7 @@ This can run independently to support the PHP application
import os
import re
from bibapi import catalogue
# Avoid importing heavy modules at top-level to keep `import api_service` lightweight
from fastapi import FastAPI, Query
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import JSONResponse
@@ -28,7 +28,9 @@ cat = None
def _get_catalogue():
global cat
if cat is None:
cat = catalogue.Catalogue()
# import inside function to avoid expensive work during module import
from bibapi import catalogue as _catalogue
cat = _catalogue.Catalogue()
return cat