Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

JSON schema validator for the resume-schema (https://github.com/jsonresume/resume-schema) spec

Project Description

resumeschema is a json-schema validator for the resume-schema spec.

Installation

$ [sudo] pip install resumeschema

API

validate(instance)

Check if the provided instance is valid under the resume-schema spec.

Returns nothing.

Raises a jsonschema.ValidationError on error.

import resumeschema
instance = {
    'basics': {
        'name': 'Resume Schema',
    },
}
resumeschema.validate(instance)

is_valid(instance)

Check if the provided instance is valid under the resume-schema spec.

Returns True if valid False if not.

import resumeschema
instance = {
    'basics': {
        'name': 'Resume Schema',
    },
}
if resumeschema.is_valid(instance):
    print 'It is valid!'

iter_errors(instance)

Get an iterator to iterate any jsonschema.ValidationErrors from the provided instance.

Returns an iterator of jsonschema.ValidationErrors.

import resumeschema
invalid_instance = {
    'basics': {
        # `first_name` is not a supported field
        'first_name': 'Resume Schema',
    },
}
for error in resumeschema.iter_errors(invalid_instance):
    print error.message

validator

An instance of jsonschema.Draft4Validator to use as you so choose.

import resumeschema
instance = {
    'basics': {
        'name': 'Resume Schema',
    },
}
resumeschema.validator.validate(instance)

Release History

This version
History Node

1.0.0

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting