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

Installation

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+https://github.com/Princeton-CDH/viapy.git@develop#egg=viapy

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:

INSTALLED_APPS = (
    ...
    'dal',
    'dal_select2',
    'viapy',
    ...
)

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/testsettings.py testsettings.py
  • To run the tests, either use the configured setup.py test command:

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

    pip install -e '.[test_all]'
    py.test

Documentation

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.

License

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.

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

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file viapy-0.2.0.tar.gz.

File metadata

  • Download URL: viapy-0.2.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.0

File hashes

Hashes for viapy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d09a99c16e974b20da18f205d206a0021eea1320601d333bb47ae1490c112671
MD5 7374d36ba28d82076f5293473d391c45
BLAKE2b-256 e6730f73e71b0846f397436cae46ddc6c464be4d2b89140dfe32ef18c76e58dd

See more details on using hashes here.

File details

Details for the file viapy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: viapy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.0

File hashes

Hashes for viapy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4803ef1529c515916383271a81ef5c8a9c12f274d6a6224808389911bd830066
MD5 f7f17dcb6f715fc177fdb92bb7a7a0c4
BLAKE2b-256 d8568b26e12161d4ff782ba1faab2d221483e1d17d0b11cad8ed123459e772eb

See more details on using hashes here.

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