Users can import their top tracks from Last.fm by entering their username. No OAuth required - uses the public Last.fm API with user.getTopTracks and user.getInfo endpoints. Includes a preview feature to verify the username and see sample tracks before importing. Supports configurable time periods (all time, 7 days, 1/3/6/12 months). Free tier playlist limit enforced.
45 lines
1.1 KiB
Python
45 lines
1.1 KiB
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
APP_NAME: str = "Vynl"
|
|
DEBUG: bool = False
|
|
SECRET_KEY: str = "change-me-in-production"
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 7 # 7 days
|
|
|
|
# Database
|
|
DATABASE_URL: str = "postgresql+asyncpg://vynl:vynl@localhost:5432/vynl"
|
|
DATABASE_URL_SYNC: str = "postgresql://vynl:vynl@localhost:5432/vynl"
|
|
|
|
# Redis
|
|
REDIS_URL: str = "redis://localhost:6379/0"
|
|
|
|
# Spotify
|
|
SPOTIFY_CLIENT_ID: str = ""
|
|
SPOTIFY_CLIENT_SECRET: str = ""
|
|
SPOTIFY_REDIRECT_URI: str = "http://localhost:5173/auth/spotify/callback"
|
|
|
|
# Claude API
|
|
ANTHROPIC_API_KEY: str = ""
|
|
|
|
# Stripe
|
|
STRIPE_SECRET_KEY: str = ""
|
|
STRIPE_PUBLISHABLE_KEY: str = ""
|
|
STRIPE_PRICE_ID: str = ""
|
|
STRIPE_WEBHOOK_SECRET: str = ""
|
|
|
|
# Last.fm
|
|
LASTFM_API_KEY: str = ""
|
|
|
|
# Frontend
|
|
FRONTEND_URL: str = "http://localhost:5173"
|
|
|
|
# Rate limits (free tier)
|
|
FREE_DAILY_RECOMMENDATIONS: int = 10
|
|
FREE_MAX_PLAYLISTS: int = 1
|
|
|
|
model_config = {"env_file": ".env", "extra": "ignore"}
|
|
|
|
|
|
settings = Settings()
|