hired.tools#
High-level orchestration functions - the main API.
These are the primary user-facing functions that coordinate the entire pipeline.
Functions
|
Generate resume content from candidate and job information. |
|
Render resume content to final format. |
|
Render a resume dict (or pydantic model) to PDF using a specific HTML template file and optional CSS file. |
- hired.tools.mk_content_for_resume(candidate_info_src, job_info_src, *, agent=None, validate=True, strict=False)[source]#
Generate resume content from candidate and job information.
- Parameters:
candidate_info_src (
Union[ContentSource,str,dict[str,Any]]) – Candidate information as ContentSource, file path, or dictjob_info_src (
Union[ContentSource,str,dict[str,Any],JobResult]) – Job information as ContentSource, file path, dict, or JobResultagent (
Optional[Any]) – Optional AI agent for content generationvalidate (
bool) – Whether to validate the generated contentstrict (
bool) – Whether to use strict validation
- Return type:
- Returns:
ResumeSchemaExtended object with generated content
Examples
>>> # Using file paths >>> content = mk_content_for_resume("candidate.json", "job.txt") >>> >>> # Using JobResult from job search >>> from hired import JobSources, SearchCriteria >>> sources = JobSources() >>> jobs = sources.jobspy.search(SearchCriteria(query="python developer")) >>> content = mk_content_for_resume(candidate_dict, jobs[0])
- hired.tools.mk_resume(content, rendering=None, *, output_path=None, strict=False)[source]#
Render resume content to final format.
- Return type:
- hired.tools.render_resume_with_template_and_css(content, template_path, css_path=None, *, format='pdf', strict=False)[source]#
Render a resume dict (or pydantic model) to PDF using a specific HTML template file and optional CSS file.
- Parameters:
content (
Union[ResumeSchemaExtended,dict[str,Any]]) – Resume content as a dict or ResumeSchemaExtended instance.template_path (
Union[str,Path]) – Path to an HTML/Jinja template file to render from.css_path (
Union[str,Path,None]) – Optional path to a CSS file; its contents will be passed to the renderer ascustom_cssso PDF rendering picks up the styles.format (
str) – Output format, ‘pdf’ or ‘html’. Default is ‘pdf’.strict (
bool) – If True, enable stricter schema validation.
- Return type:
- Returns:
PDF file bytes.