Skip to main content

Simple CLI for Aqualink API

Project description

pyaqua: Simple CLI for Aqualink API

Twitter URL CI pyaqua PyPI - License PyPI DOI

Aqualink is a philanthropic engineering organization working on building ocean conservation technology. Read more about their inspiration, smart buoy, and web application. This tool is designed to help interact programmatically with the Aqualink.org map and is not based on any official API so expect features to break once in a while. This tool is designed for only only those sites associated with a spotter.

Disclaimer: This is an unofficial tool. Is not licensed or endorsed by Aqualink org. It is created and maintained by Samapriya Roy.

Citation

Samapriya Roy. (2021). samapriya/pyaqua: Simple CLI for Aqualink Org (0.0.1).
Zenodo. https://doi.org/10.5281/zenodo.5775224

Readme Docs available online

Table of contents

Installation

This assumes that you have native python & pip installed in your system, you can test this by going to the terminal (or windows command prompt) and trying

python and then pip list

pyaqua only support Python v3.7 or higher

To install pyaqua: Simple CLI for Aqualink API you can install using two methods.

pip install pyaqua

or you can also try

git clone https://github.com/samapriya/pyaqua.git
cd pyaqua
python setup.py install

For Linux use sudo or try pip install pyaqua --user.

I recommend installation within a virtual environment. Find more information on creating virtual environments here.

Getting started

As usual, to print help:

usage: pyaqua [-h] {site-list,site-info,site-live,site-daily,site-timeseries} ...

Simple CLI for Aqualink API

positional arguments:
  {site-list,site-info,site-live,site-daily,site-timeseries}
    site-list           Print lists of Site Name and ID with spotters
    site-info           Get detailed info about a site
    site-live           Get most recent/live info from a site
    site-daily          Print daily data info for a site
    site-timeseries     Print daily data info for a site

optional arguments:
  -h, --help            show this help message and exit

To obtain help for specific functionality, simply call it with help switch, e.g.: pyaqua site-live -h. If you didn't install pyaqua, then you can run it just by going to pyaqua directory and running python pyaqua.py [arguments go here]

pyaqua Simple CLI for Aqualink API

The tool is designed to interact with the Aqualink.org API, for now this is focused only on the spotter endpoints.

site list

This allows you to get existing sites with spotters attached and print Site Name and ID. These could be in different status of application including maintenance, deployed, lost, shipped and so on. The tool also applies a fuzzy search and allows you to look for a specific site to get site id.

site_list

site info

The site info tool uses the site ID to get detailed information about the setup, location, time zone, status information to name a few. Historical means are dropped along with admin data for ease of parsing and since they do not add a large amount of value for general purpose users directly. The user does have the option to get to the complete admin or historical data if needed

site-info

site-live

This allows to get the most updated/live information about a site based on a site ID from the idlist. The tool parses the output as an indent JSON object.

site_live

site daily

This allows to get the most daily data for a site based on a site ID from the idlist. The tool parses the daily output as an indented JSON and you can specify months since today as well as data type like wind/wave/temp.

site_daily

site timeseries

This allows to get the most daily data for a site based on a site ID from the idlist. The tool exports the time series data for both NOAA and spotter datasets as CSV to a given folder. It attaches the site_id to the CSV filename spotter_dhw_siteid for example spotter_dhw_1113

site_timeseries

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

pyaqua-0.0.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

pyaqua-0.0.3-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file pyaqua-0.0.3.tar.gz.

File metadata

  • Download URL: pyaqua-0.0.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.6

File hashes

Hashes for pyaqua-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4b3f49ae03330ef0637c1daa8ee42ffd1755b32fcab66d4e6ea1d02b7411f1a5
MD5 79e48b97056f2dfe8e4824ff7e25536f
BLAKE2b-256 44d1d89661b9031c5f438b9afd776b4a3f00d390b40c543ddc1dde952203872b

See more details on using hashes here.

File details

Details for the file pyaqua-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pyaqua-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.6

File hashes

Hashes for pyaqua-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d025d0f348fd8983b4bd7b6c1a6588c3ff11a67aa80936baa9fe0ee69be840a6
MD5 d39a95322d5ffce11cdad03f9ba9ae7d
BLAKE2b-256 c7692dde1573c633bae5bb0464a5841143cc964df9b8bf07cd55b1e7558e076b

See more details on using hashes here.

Supported by

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