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 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 = [
    ...
    path(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.11 virtualenv:

    python3 -m venv viapy
    source viapy/bin/activate
  • pip install the package with all development and test dependencies:

    pip install -e ".[dev]""

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 ".[dev]"

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.

©2024 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.4.0.tar.gz (75.6 kB view details)

Uploaded Source

Built Distribution

viapy-0.4.0-py3-none-any.whl (73.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: viapy-0.4.0.tar.gz
  • Upload date:
  • Size: 75.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for viapy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 cee74cd2efe1260dbdd34addcf927f6d623cd96d921331822b96ee65dac21add
MD5 ee30b43c12980b6fcd52e47131896bdb
BLAKE2b-256 1692c2aa75838fefdb3edf692163663590f99dd4a567acb4c320f366cc430c6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for viapy-0.4.0.tar.gz:

Publisher: python-publish.yml on Princeton-CDH/viapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: viapy-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 73.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for viapy-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e2f7a72ee3be9cd614c0a10c24f346df1e5d5ff726801b01c6cb77e4437f598
MD5 d646469a9b34f4375950f11747ee276e
BLAKE2b-256 3e5bdabf7a3e5a33efe710d2605a634dfcfe7318be006e6ed8e66fa52af245ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for viapy-0.4.0-py3-none-any.whl:

Publisher: python-publish.yml on Princeton-CDH/viapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page