modify: sqlite_vfs v0.2.0
This commit is contained in:
@@ -104,10 +104,13 @@ base = [
|
||||
"chongming_worker.route_config",
|
||||
"chongming_worker.routes_publisher",
|
||||
"chongming_request",
|
||||
"chongming_auth",
|
||||
"server",
|
||||
"module_bank", # 模块化打包工具
|
||||
"sqlite_vfs",
|
||||
"sqlite_vfs.core",
|
||||
"sqlite_vfs.contrib",
|
||||
"sqlite_vfs.contrib.fastapi_static",
|
||||
"fastapi", # web 应用依赖
|
||||
"fastapi.staticfiles",
|
||||
"fastapi.middleware.cors",
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ dependencies = [
|
||||
"module-bank",
|
||||
"openai",
|
||||
"python-multipart",
|
||||
"sqlite-vfs",
|
||||
"sqlite-vfs==0.2.0",
|
||||
"tomli",
|
||||
"typing-extensions",
|
||||
"uvicorn",
|
||||
|
||||
@@ -20,7 +20,8 @@ from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from chongming_config import get_config
|
||||
from .core.logger import get_logger
|
||||
from .core.static_files import SVFSStaticFiles
|
||||
# from .core.static_files import SVFSStaticFiles
|
||||
from sqlite_vfs.contrib.fastapi_static import SVFSStaticFiles
|
||||
from .core import lifespan_setup, call_stats
|
||||
from .routes import storage_router, stats_router, worker_admin_router, auth_router
|
||||
|
||||
@@ -307,7 +308,7 @@ async def global_exception_handler(_: Request, exc: Exception):
|
||||
# 静态文件服务(可选)
|
||||
if vfs_db_path := config[env].get("file_system", {}).get("path", None):
|
||||
logger.info("静态文件已存在,将使用静态文件服务")
|
||||
static_files_handler = SVFSStaticFiles(directory="/", vfs_db_path=vfs_db_path)
|
||||
static_files_handler = SVFSStaticFiles(vfs_db_path=vfs_db_path)
|
||||
app.mount("/static", static_files_handler, name="static")
|
||||
|
||||
app.include_router(storage_router)
|
||||
|
||||
@@ -636,7 +636,7 @@ requires-dist = [
|
||||
{ name = "module-bank" },
|
||||
{ name = "openai" },
|
||||
{ name = "python-multipart" },
|
||||
{ name = "sqlite-vfs" },
|
||||
{ name = "sqlite-vfs", specifier = "==0.2.0" },
|
||||
{ name = "tomli" },
|
||||
{ name = "typing-extensions" },
|
||||
{ name = "uvicorn" },
|
||||
@@ -1707,11 +1707,11 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "sqlite-vfs"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
source = { registry = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple" }
|
||||
sdist = { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/70/ff/9cbb7f704d59f88ae048bb84a3de19b5d6dd0c1ae21af53396723af18d14/sqlite_vfs-0.1.0.tar.gz", hash = "sha256:cd6cf5cb7d60c1983d9befdc6c4cce8ab050fc4fd215e5e63ece1d2d28f4f9bb", size = 57435, upload-time = "2025-11-08T08:16:01.715Z" }
|
||||
sdist = { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/16/5a/02f0ed40f663aac63afb7e4a8a27ca7a802f2a16d46ba8911322bf2e7353/sqlite_vfs-0.2.0.tar.gz", hash = "sha256:b7eece43438067196eb06d6840e393f389360baf5d45be08b6071ef5d211eb8c", size = 256855, upload-time = "2026-09-13T16:39:10.509Z" }
|
||||
wheels = [
|
||||
{ url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/ef/26/a3f51ea9d10efe2c4f85cac78dcbd898b437d2331cf25d470f804e4498b7/sqlite_vfs-0.1.0-py3-none-any.whl", hash = "sha256:c6e27a35e504bb6360fb0d9083d79572367a903788b3b14aea5f1188130e9314", size = 10768, upload-time = "2025-11-08T08:15:18.588Z" },
|
||||
{ url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/75/bf/b8a60d29332f1e594f0eab4c850c27c04a5c91eb40f619a6aa440b1a379e/sqlite_vfs-0.2.0-py3-none-any.whl", hash = "sha256:df7178b897cc604333f727970435a07b93c1ba22253d4aa21e996b31c06ac468", size = 68295, upload-time = "2026-09-13T16:39:07.111Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in New Issue
Block a user