FastAPI service backed by PostgreSQL+PostGIS: cities/places/place_content schema (normalized per-language, per-length content for easy future re-ingestion), Alembic migration, an iterative-radius-expansion nearby search endpoint, a name-search fallback for denied-location flows, and a YAML seed loader CLI. Verified end-to-end against a live Docker Postgres+PostGIS instance (migration, city seed, place/content CRUD, and nearby radius expansion all confirmed working via curl). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
25 lines
457 B
Python
25 lines
457 B
Python
import enum
|
|
|
|
|
|
class PlaceCategory(str, enum.Enum):
|
|
building = "building"
|
|
bridge = "bridge"
|
|
monument = "monument"
|
|
park = "park"
|
|
district = "district"
|
|
skyscraper = "skyscraper"
|
|
cathedral = "cathedral"
|
|
museum = "museum"
|
|
gate = "gate"
|
|
square = "square"
|
|
|
|
|
|
class ContentLanguage(str, enum.Enum):
|
|
ru = "ru"
|
|
en = "en"
|
|
|
|
|
|
class ContentLength(str, enum.Enum):
|
|
short = "short"
|
|
medium = "medium"
|
|
long = "long"
|