Server Module
HTTP Server - 12-Factor App Factor VII: Port Binding.
- class server.ApplicationRequest(*, title: str, company: str, location: str, url: str, source: str)[source]
Bases:
BaseModel- company: str
- location: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- source: str
- title: str
- url: str
- class server.JobResponse(*, title: str, company: str, location: str, url: str, source: str, posted_date: str | None = None)[source]
Bases:
BaseModel- company: str
- location: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- posted_date: str | None
- source: str
- title: str
- url: str
- class server.SearchRequest(*, tags: List[str] | None = None)[source]
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- tags: List[str] | None
- async server.add_application(app: ApplicationRequest)[source]
Record a new job application.
- async server.update_application_status(url: str, status: str, notes: str = '')[source]
Update application status.
FastAPI Application
The server module provides a REST API for the Job Agent.
Endpoints
- GET /
Health check endpoint.
- Returns:
Service status
- Rtype:
dict
- GET /health
Detailed health check.
- Returns:
Health status
- Rtype:
dict
- GET /jobs
Search for jobs.
- Returns:
List of jobs
- Rtype:
dict
- GET /applications
Get or add applications.
- Returns:
Application list or status
- Rtype:
dict