hired.search.base#
Base classes and interfaces for job search functionality.
Classes
|
Compensation information for a job. |
|
Standardized job result across all sources. |
Abstract base class for job search sources. |
|
|
Standardized job types across all sources. |
|
Location information for a job. |
|
Standardized search criteria across all sources. |
Exceptions
Raised when a source is not properly configured. |
- class hired.search.base.CompensationInfo(min_amount=None, max_amount=None, currency=None, interval=None)[source]#
Bases:
objectCompensation information for a job.
- class hired.search.base.JobResult(title, source, company=None, company_url=None, job_url=None, location=None, is_remote=None, description=None, job_type=None, compensation=None, date_posted=None, date_updated=None, application_deadline=None, skills=<factory>, benefits=<factory>, emails=<factory>, raw_data=<factory>)[source]#
Bases:
objectStandardized job result across all sources.
This provides a unified interface regardless of which source the job was retrieved from.
- class hired.search.base.JobSearchSource[source]#
Bases:
ABCAbstract base class for job search sources.
All job search sources must implement this interface to be registered in the system.
- abstract property display_name: str#
Return the display name of this source (e.g., ‘Indeed’, ‘USAJobs’).
- abstractmethod get_setup_instructions()[source]#
Return setup instructions for this source.
Should include:
Where to get API keys if needed
Environment variables or config file settings
URLs for documentation
- Return type:
- Returns:
Multi-line string with setup instructions.
- abstractmethod is_configured()[source]#
Check if this source is properly configured.
- Return type:
- Returns:
True if the source is ready to use, False otherwise.
- abstractmethod search(criteria)[source]#
Search for jobs using the given criteria.
- Parameters:
criteria (
SearchCriteria) – SearchCriteria object with search parameters- Return type:
- Returns:
List of JobResult objects
- Raises:
SourceConfigError – If the source is not properly configured
Exception – For other errors during search
- validate_configured()[source]#
Validate that the source is configured, raise error if not.
- Raises:
SourceConfigError – If the source is not properly configured
- Return type:
- class hired.search.base.LocationInfo(city=None, state=None, country=None, postal_code=None, raw=None)[source]#
Bases:
objectLocation information for a job.
- class hired.search.base.SearchCriteria(query, location=None, country=None, city=None, state=None, postal_code=None, distance_miles=None, job_type=None, is_remote=None, posted_within_days=None, results_wanted=20, offset=0, min_salary=None, max_salary=None, keywords=<factory>, exclude_keywords=<factory>, source_params=<factory>)[source]#
Bases:
objectStandardized search criteria across all sources.
Different sources may not support all criteria, but this provides a consistent interface for users.