hired.cover_letter#

Cover letter generation functionality.

Generate professional cover letters tailored to specific job applications.

Functions

generate_cover_letter_content(...[, tone])

Generate cover letter content from candidate and job information.

mk_cover_letter(candidate_info, job_info, *)

Generate and render a cover letter.

render_cover_letter(cover_letter_data[, ...])

Render cover letter to specified format.

Classes

CoverLetterData(applicant_name, ...[, ...])

Data structure for cover letter generation.

class hired.cover_letter.CoverLetterData(applicant_name, applicant_email, company_name, position_title, applicant_phone=None, applicant_address=None, hiring_manager_name=None, opening_paragraph='', body_paragraphs=None, closing_paragraph='', date=None)[source]#

Bases: object

Data structure for cover letter generation.

to_dict()[source]#

Convert to dictionary for template rendering.

Return type:

Dict[str, Any]

hired.cover_letter.generate_cover_letter_content(candidate_info, job_info, tone='professional')[source]#

Generate cover letter content from candidate and job information.

Parameters:
  • candidate_info (Dict[str, Any]) – Candidate information (resume dict or basics)

  • job_info (Union[Dict[str, Any], JobResult]) – Job information (dict, text, or JobResult)

  • tone (str) – Tone of the letter (‘professional’, ‘enthusiastic’, ‘formal’)

Return type:

CoverLetterData

Returns:

CoverLetterData object with generated content

Examples

>>> data = generate_cover_letter_content(
...     candidate_info={'basics': {'name': 'Jane Doe', 'email': 'jane@example.com'}},
...     job_info={'title': 'Software Engineer', 'company': 'TechCorp'},
... )
hired.cover_letter.mk_cover_letter(candidate_info, job_info, *, tone='professional', format='text', output_path=None)[source]#

Generate and render a cover letter.

Parameters:
  • candidate_info (Dict[str, Any]) – Candidate information (resume dict or basics)

  • job_info (Union[Dict[str, Any], JobResult]) – Job information (dict, text, or JobResult)

  • tone (str) – Tone of the letter (‘professional’, ‘enthusiastic’, ‘formal’)

  • format (str) – Output format (‘text’, ‘html’, ‘markdown’)

  • output_path (Optional[str]) – Optional path to save the cover letter

Return type:

str

Returns:

Rendered cover letter as string

Examples

>>> from hired import mk_cover_letter, JobSources, SearchCriteria
>>>
>>> # From job search result
>>> sources = JobSources()
>>> jobs = sources.jobspy.search(SearchCriteria(query="software engineer"))
>>>
>>> letter = mk_cover_letter(
...     candidate_info={'basics': {'name': 'Jane Doe', 'email': 'jane@example.com'}},
...     job_info=jobs[0],
...     format='html'
... )
hired.cover_letter.render_cover_letter(cover_letter_data, format='text', template=None)[source]#

Render cover letter to specified format.

Parameters:
  • cover_letter_data (CoverLetterData) – CoverLetterData object

  • format (str) – Output format (‘text’, ‘html’, ‘markdown’)

  • template (Optional[str]) – Optional custom Jinja2 template string

Return type:

str

Returns:

Rendered cover letter as string