hired.tools#

High-level orchestration functions - the main API.

These are the primary user-facing functions that coordinate the entire pipeline.

Functions

mk_content_for_resume(candidate_info_src, ...)

Generate resume content from candidate and job information.

mk_resume(content[, rendering, output_path, ...])

Render resume content to final format.

render_resume_with_template_and_css(content, ...)

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 dict

  • job_info_src (Union[ContentSource, str, dict[str, Any], JobResult]) – Job information as ContentSource, file path, dict, or JobResult

  • agent (Optional[Any]) – Optional AI agent for content generation

  • validate (bool) – Whether to validate the generated content

  • strict (bool) – Whether to use strict validation

Return type:

ResumeSchemaExtended

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:

bytes

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 as custom_css so 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:

bytes

Returns:

PDF file bytes.