Add services layer, tests, streaming UI, and cleanup legacy code
This commit is contained in:
parent
5514fa6381
commit
d205d15c74
62 changed files with 3729 additions and 1024 deletions
41
crawler/services/__init__.py
Normal file
41
crawler/services/__init__.py
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
"""Services package for real estate crawler.
|
||||
|
||||
This package contains two layers of services:
|
||||
|
||||
## Low-level services (internal implementation):
|
||||
- listing_fetcher: Fetches listing data from Rightmove API
|
||||
- image_fetcher: Downloads floorplan images
|
||||
- floorplan_detector: OCR-based square meter detection from floorplans
|
||||
- route_calculator: Calculates transit routes using Google Maps API
|
||||
|
||||
## High-level services (use these in CLI and API):
|
||||
- listing_service: Unified listing operations (get, refresh, download images, etc.)
|
||||
- export_service: Export listings to CSV, GeoJSON
|
||||
- district_service: District lookup and validation
|
||||
- task_service: Background task management
|
||||
"""
|
||||
# Low-level services (internal)
|
||||
from services.listing_fetcher import dump_listings, dump_listings_full
|
||||
from services.image_fetcher import dump_images
|
||||
from services.floorplan_detector import detect_floorplan
|
||||
from services.route_calculator import calculate_route
|
||||
|
||||
# High-level services (CLI and API should use these)
|
||||
from services import listing_service
|
||||
from services import export_service
|
||||
from services import district_service
|
||||
from services import task_service
|
||||
|
||||
__all__ = [
|
||||
# Low-level
|
||||
"dump_listings",
|
||||
"dump_listings_full",
|
||||
"dump_images",
|
||||
"detect_floorplan",
|
||||
"calculate_route",
|
||||
# High-level
|
||||
"listing_service",
|
||||
"export_service",
|
||||
"district_service",
|
||||
"task_service",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue