Tutorial

This is where you will learn how to use yaml-resume.

Create a resume

Create a resume is easy. You can obviously edit the sample.yml or use the yaml-resume cli to prompt the questions to build your resume:

$ yaml-resume init my-resume.yml

The init subcommand of yaml-resume will prompt all the fields of the resume according to the schema.

Validate the resume

To validate your yaml file, just use the yaml-resume cli again:

$ yaml-resume validate my-resume.yml

The validate subcommand of yaml-resume will check your yaml file against the schema and return the possible errors like missing or unknown field, regex not matched…

Export the resume to html/pdf

To export your yaml resume to html/pdf and apply a theme:

$ yaml-resume export my-resume.yml [-t <theme>] [-e <html|pdf>] [-i <picture>] [-o <output-file>]

By default, the theme is classic, the format is html and the output file will be resume.html.

Schema

yaml-resume uses Cerberus to define a schema and validate our yaml-resume against this schema.

The schema is available inside the yaml_resume.validator.schema module.

Global schema

The global schema shows the different sections and restrictions including subschemas.

 1
 2resume = {
 3    "contact": {
 4        "type": "dict",
 5        "required": True,
 6        "require_all": True,
 7        "schema": contact,
 8    },
 9    "profiles": {
10        "type": "list",
11        "required": False,
12        "require_all": True,
13        "schema": {"type": "dict", "schema": profile},
14    },
15    "experiences": {
16        "type": "list",
17        "required": True,
18        "require_all": True,
19        "schema": {"type": "dict", "schema": experience},
20    },
21    "education": {
22        "type": "list",
23        "required": True,
24        "require_all": True,
25        "schema": {"type": "dict", "schema": degree},
26    },
27    "skills": {
28        "type": "list",
29        "required": True,
30        "require_all": True,
31        "schema": {"type": "dict", "schema": skill},
32    },
33    "languages": {
34        "type": "list",
35        "required": False,
36        "require_all": True,
37        "schema": {"type": "dict", "schema": language},
38    },
39    "projects": {
40        "type": "list",
41        "required": False,
42        "require_all": True,
43        "schema": {"type": "dict", "schema": project},
44    },
45    "hobbies": {
46        "type": "list",
47        "required": False,
48        "require_all": False,
49        "schema": {"type": "dict", "schema": hobby},
50    },

Subschemas

The subschemas are defined the same as the global schema but describes inner sections. For example:

 1contact = {
 2    "name": {"type": "string"},
 3    "job": {"type": "string"},
 4    "summary": {"required": False, "type": "string"},
 5    "date_of_birth": {"type": "string", "regex": DOB_REGEX},
 6    "email": {"type": "string", "regex": EMAIL_REGEX},
 7    "phone": {"type": "string", "regex": PHONE_NUMBER_REGEX},
 8    "location": {
 9        "type": "dict",
10        "required": True,
11        "require_all": True,
12        "schema": location,
13    },

Regular expressions

The regular expressions are defined to verify validity of the data: for example an email address should respect a format such as john@doe.com.

1EMAIL_REGEX = r"(\w+[.|\w])*@(\w+[.])+\w+"

Example

An YAML resume example is avalaible in the project as sample.yml:

contact:
  name: John Doe
  email: john@doe.com
  date_of_birth: 01/01/1990
  job: Python Developer
  summary: |
        Hi, my name is John and I'm a Python dev since 2012.
        Please hire me!
  location:
    address: 10 Downing Street
    city: London
    country: UK
    zip: SW1A 2AA
  phone: '+44612345678'
experiences:
- company: Foo company
  position: Senior Python Developer
  start_date: January 2018
  summary: |
        Developer for the main Foo webapp.
        I also worked on migration from python 2.7 to 3.6.
        I've been scrum master for a team of 8 people.
        I added automated unit tests to the codebase.
  website: https://foo.com
  tags:
  - flask
  - mongodb
  - redis
  - pytest
  - scrum
- company: Bar company
  position: Python developer
  start_date: January 2014
  end_date: December 2017
  summary: |
        I developped Bar backoffice main features and
        worked on CI/CD
  website: https://bar.net
  tags:
  - django
  - mysql
  - jenkins
- company: Bar company
  position: Junior python developer
  start_date: January 2012
  end_date: December 2013
  website: https://bar.net
  summary: |
        I made multiple KPI dashboards and
        provided automation scripts
profiles:
- network: Facebook
  url: https://facebook.com/johndoe
- network: Twitter
  url: https://twitter.com/nottherealjohndoe
- network: Personal website
  url: https://john.doe.fake
education:
- degree: Bachelor of Software Engineering
  start_date: January 2008
  end_date: January 2012
  institution: University of California, Berkeley
  website: https://www.berkeley.edu
skills:
- name: Python
  level: 90
- name: Flask
  level: 80
- name: Scrum
  level: 80
- name: Java
  level: 50
languages:
- name: English
  level: Native language
- name: French
  level: Proficient
projects:
- name: foo.bar
  description: Just an useless app
  url: https://github.com/johndoe/foo.bar
hobbies:
- name: History
- name: Sport
  details: Running and weightlifting