Skip to main content

Python module for interacting with VIAF data & APIs

Project description

VIAF via Python

Python module for interacting with VIAF (the Virtual International Authority File) data and APIs.

viapy provides optional Django integration; this currently includes a django-autocomplete-light lookup view and a VIAF url widget.

Build status Code coverage Requirements Status CodeFactor PyPI - Python Version PyPI - Django Version


Use pip to install from GitHub. Use a branch or tag name, e.g. @develop or @1.0 if you want to install a specific tagged release or branch:

pip install git+

Configuration for use with Django

Using viapy with Django requires additional configuration. Add viapy to installed applications along with the needed django-autocomplete-light modules:


Include the viapy urls at the desired base url with the namespace:

urlpatterns = [
    url(r'^viaf/', include('viapy.urls', namespace='viaf')),

Development instructions

This git repository uses git flow branching conventions.

Initial setup and installation:

  • Recommended: create and activate a python 3.5 virtualenv:

    virtualenv viapy -p python3.5
    source viapy/bin/activate
  • pip install the package with its python dependencies:

    pip install -e .
    pip install -e ".[django]""

Unit Testing

Unit tests are set up to be run with py.test

  • Copy sample test settings and add a SECRET_KEY:

    cp ci/
  • To run the tests, either use the configured test command:

    python test
  • Or install test requirements and use py.test directly:

    pip install -e '.[test_all]'


Documentation is generated using sphinx. To generate documentation, first install development requirements:

pip install -e ".[docs]"

Then build the documentation using the customized make file in the docs directory:

cd sphinx-docs
make html

When building documentation for a production release, use make docs to update the published documentation on GitHub Pages.


viapy is distributed under the Apache 2.0 License.

©2017 Trustees of Princeton University. Permission granted via Princeton Docket #18-3449-1 for distribution online under a standard Open Source license. Ownership rights transferred to Rebecca Koeser provided software is distributed online via open source.

Download files

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

Source Distribution

viapy-0.2.0.tar.gz (6.9 kB view hashes)

Uploaded source

Built Distribution

viapy-0.2.0-py3-none-any.whl (11.7 kB view hashes)

Uploaded py3

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