Skip to main content

Rezume, validate and create text-based resumes easily.

Project description

Rezume is a Python library to validate and easily create a YAML based resume file that is JSON Resume compatible according to the defined schema.

Installation

Install from Pypi by running this command:

pip install rezume

Dependencies

Rezume requires Python 3.6+ and depends mainly on pydantic for data validation and pyyaml for processing YAML data.

Usage

You can use rezume as a Python package as shown below:

from rezume import RezumeError, Rezume

# sample (invalid) rezume data to validate
rezume_data = { name: 'John Doe' }

# check the validity of sample data
if Rezume.is_valid(rezume_data):
    print('Validated successfully!')
else:
    print('Invalid rezume')

# alternatively, if we prefer catching exceptions
try:
    Rezume.validate(rezume_data)
    print('Validated successfully!')
except RezumeError as ex:
    print(f'Invalid rezume: {ex}')

To validate a rezume file instead:

from pathlib import Path
from rezume import RezumeError, Rezume

# path to sample file to validate
rezume_file = Path('/path/to/sample/rezume-file.yml')

# use
Rezume.is_valid(rezume_file)    # returns boolean

# or
Rezume.validate(rezume_file)    # throws exception if invalid

Furthermore, you can programmatically process a Rezume:

import json
from pathlib import Path
from rezume import RezumeError, Rezume

# load and modify a standard JSON resume

rezume = Rezume()

json_file = Path('/path/to/json/resume-file.json')
with json_file.open('r') as fp:
    data = json.load(fp)
    rezume.load_data(data)   # throws exception if invalid

rezume.basics.name = 'John Doe (Verified)'
print(rezume.dump_data())


# or programmatically modify a YAML rezume file

yaml_file = Path('/path/to/yaml/rezume-file.yml')
try:
    rezume = Rezume()
    rezume.load(yaml_file)  # throws exception if invalid
except RezumeError:
    print('Unable to process rezume file')
else:
    rezume.basics.label = 'Pythonista'
    print(rezume.dump_data())

In addition, rezume can be used as a command line tool to create or validate a YAML-based rezume file. Here is the output of rezume --help

Usage: rezume [OPTIONS] COMMAND [ARGS]...

Options:
  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                          customize the installation.

  --help                Show this message and exit.

Commands:
  init   Initializes a new rezume.yml file
  serve  Serves a rezume for local viewing applying available themes
  test   Validates correctness of a rezume.yml file

License

This project is licensed under the BSD license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rezume-0.4.2.tar.gz (23.2 kB view hashes)

Uploaded Source

Built Distribution

rezume-0.4.2-py3-none-any.whl (24.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page