tech-envision commited on
Commit
a5ef538
Β·
1 Parent(s): 79a843f

Move API modules to dedicated package

Browse files
api/__init__.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Public interface for the API package."""
2
+
3
+ from .api import create_app, app
4
+ from .document_service import (
5
+ save_document,
6
+ list_documents,
7
+ get_document,
8
+ read_content,
9
+ )
10
+
11
+ __all__ = [
12
+ "create_app",
13
+ "app",
14
+ "save_document",
15
+ "list_documents",
16
+ "get_document",
17
+ "read_content",
18
+ ]
19
+
{src β†’ api}/api.py RENAMED
@@ -13,7 +13,7 @@ from .document_service import (
13
  get_document,
14
  read_content,
15
  )
16
- from .log import get_logger
17
 
18
 
19
  class DocumentInfo(BaseModel):
 
13
  get_document,
14
  read_content,
15
  )
16
+ from src.log import get_logger
17
 
18
 
19
  class DocumentInfo(BaseModel):
{src β†’ api}/document_service.py RENAMED
@@ -6,8 +6,8 @@ from typing import List, Optional
6
 
7
  from fastapi import UploadFile
8
 
9
- from .config import UPLOAD_DIR
10
- from .db import Document, User, init_db
11
 
12
 
13
  def _ensure_user_dir(username: str) -> Path:
 
6
 
7
  from fastapi import UploadFile
8
 
9
+ from src.config import UPLOAD_DIR
10
+ from src.db import Document, User, init_db
11
 
12
 
13
  def _ensure_user_dir(username: str) -> Path: