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.

Python 3.5 / Django 1.11

Build status Code coverage Code Health Requirements Status

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.1.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

viapy-0.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: viapy-0.1.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for viapy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 23bc099edce62597fd44b8823de4f1ed605691d2af723bb74faa9a2fe1cff46f
MD5 0476be254bfa0aa8445819a69138446b
BLAKE2b-256 a4568831c293c98f8646fa57388620614a328d7d1bc0644e493cb792f6d8432a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for viapy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9258e502a0c29332c80ee4cbbd1b176777ae9fa3cf9ae2ad14c3111acc14516
MD5 0b9444d108f5ac2cd07e2e42d0f59f89
BLAKE2b-256 9a64d2423a046093bd5fb5a43c67b5842f7e4d40fd607f9a8a1f23020ca5a3fd

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