Skip to content

Python validator for the eLife Sciences API

Notifications You must be signed in to change notification settings

elifesciences/api-validator-python

Repository files navigation

eLife API Validator for Python

This library provides a validator for the eLife Sciences API.

It validates HTTP responses to make sure that they match the schema specification for that media type.

Dependencies

  • Python 3.5 or greater

Installation

python setup.py install

Usage

To validate a response:

import requests

from elife_api_validator.validators import JSONResponseValidator

>>> response = requests.get('https://api.elifesciences.org/articles')
>>> JSONResponseValidator.validate(response)

The validate method will return None if valid, otherwise it will raise a ValidationError with the appropriate information.

About

Python validator for the eLife Sciences API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published