Three isolated services (alert scraper, apply HTTP worker, web UI+DB) with argon2 auth, signed cookies, CSRF, rate-limited login, kill switch, apply circuit breaker, audit log, and strict CSP. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
22 lines
569 B
Python
22 lines
569 B
Python
import asyncio
|
|
from abc import ABC, abstractmethod
|
|
import logging
|
|
|
|
from classes.application_result import ApplicationResult
|
|
|
|
logger = logging.getLogger("flat-apply")
|
|
|
|
class Provider(ABC):
|
|
@property
|
|
@abstractmethod
|
|
def domain(self) -> str:
|
|
"""every flat provider needs a domain"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def apply_for_flat(self, url: str) -> ApplicationResult:
|
|
"""every flat provider needs to be able to apply for flats"""
|
|
pass
|
|
|
|
def test_apply(self, url):
|
|
print(asyncio.run(self.apply_for_flat(url)))
|