Skip to main content

Python client for CAX

Project description

pypi github docs tests coverage PyPi license DOI

pycax

pycax is a Python client for the Coordinated Assessments REST API. Make sure to review the StreamNet Terms of Use for these data, the StreamNet Data Policy and the citation information for database queries. pycax was developed by the Northwest Fisheries Science Center Math Bio Program by Elizabeth Holmes and Mari Williams.

NWFSC Math Bio CAX REST API clients:

Installation

From pypi

pip install pycax-client

From GitHub (development version)

pip install git+git://github.com/nwfsc-math-bio/pycax.git#egg=pycax-client

Documentation

The official documentation is hosted on GitHub Pages https://nwfsc-math-bio.github.io/pycax.

Library API

pycax is split up into modules for each of the groups of API methods.

  • hli - Get HLI tables.
  • datasets - Get metadata of tables
  • tables - The workhorse modules for querying tables

Sample analysis

Some Jupyter notebooks are in the notebooks directory.

Contributing

Fork and put in a pull request!

To install editable dev version from github for local development. System prerequisites: python3, conda. Note replace python3 with python if your Python installation points to 3+. requirements-dev.txt includes all the requirements needed for local development, testing and documentation building.

# fetch code
git clone git@github.com:nwfsc-math-bio/pycax.git
cd pycax
# install the requirements
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements-dev.txt
# After making changes, reinstall using
python3 -m pip install -e .
# test your installation
python3 -m pytest
# test and generate a coverage report
python3 -m pytest -rxs --cov=pycax --cov-report term-missing ./pycax
# make the documentation in docs/_build/html
cd docs # pycax/docs
make clean html codecov # linkcheck # linkcheck not working

Citation

Holmes, E. E and M. Williams. 2023. pycax: a Python client for the Coordinated Assessments data exchange REST API. vX.X.X. doi:10.5281/zenodo.7855729.

Make sure to include a citation for the Coordinated Assessments Partnership (CAP) data tables that you use. For details on citing CAP content see: https://www.streamnet.org/resources/citing-sn/

See CITATION file for bibtex version.

Credits

Thanks to the developers of pyobis package who created a package that was easy to use as a full template for a REST API client with tests, documentation files, and GitHub Actions and included the instructions and requirements for local development. The structure of pycax mimics pyobis structure but was adapted and changed for the CAX API. The pygbif package is similar (and seems to have influenced pyobis). pygbif source was used for reference and study though no code directly used. Some pygbif code may appear in pycax if pyobis used pygbif functions for reference. Notably the Sphinx documentation configuration files seem to originate from pygbif.


Disclaimer

This repository is a scientific product and is not official communication of the National Oceanic and Atmospheric Administration, or the United States Department of Commerce. All NOAA GitHub project content is provided on an ‘as is’ basis and the user assumes responsibility for its use. Any claims against the Department of Commerce or Department of Commerce bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.

License

This content was created by U.S. Government employees as part of their official duties. This content is not subject to copyright in the United States (17 U.S.C. §105) and is in the public domain within the United States of America. Additionally, copyright is waived worldwide through the MIT License.

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

pycax-client-1.0.3.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycax_client-1.0.3-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file pycax-client-1.0.3.tar.gz.

File metadata

  • Download URL: pycax-client-1.0.3.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pycax-client-1.0.3.tar.gz
Algorithm Hash digest
SHA256 878193d03f840617e3fdec0e9c6762b2f3edd9bd743be3d96cb9089eea242798
MD5 fce2090d4d3c3ff0adb7a227d591b163
BLAKE2b-256 33889038aabe95d7a6285442c62e6693f303c21e31241c313ad2bb65fd49dd84

See more details on using hashes here.

File details

Details for the file pycax_client-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pycax_client-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pycax_client-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 24332ce35961632ef6e6d5b170e8e30407bb3bae09a092e6e69fba664f90b874
MD5 2f125b07c7d7c37aad4e2d6c7d78fb7e
BLAKE2b-256 820101b84d8fc3468461a8e9c32ce68ec6ab0eb69c34f6f7a5a0bba602b72baa

See more details on using hashes here.

Supported by

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