Skip to main content

Client library to the AnavNet website, which provides messages about current portuguese ports warnings

Project description

AnavNet

Client library to the AnavNet website, which provides messages about current portuguese ports warnings.

  • Includes all the available port names and identifiers.
  • Counts the total messages per port.
  • Parses all the items of the messages.
  • Includes a script to allow the usage from console.

Requirements

Installation

$ pip install anavnet

Usage

>>> from anavnet import AnavNet
>>> anavnet = AnavNet()
>>> anavnet.set_port(16)
>>> anavnet.get_total_messages()
>>> 12
>>> anavnet.get_message(1)
{'num_aviso': '288/18', 'dt_promulgacao': '23-Ago-2018', 'dt_inicio': '24-Ago-2018', 'dt_fim': '05-Set-2018', 'ent_promulgacao': 'Capitania do Porto de Lisboa - CAPIMARLISBOA', 'local': 'Rio Tejo - Cais Militar do Portinho da Costa.', 'assunto': 'Área interdita à navegação', 'descricao': 'No período de 24AGO a 05SET, está interdita a navegação a menos de 50 metros do Cais Militar do Portinho da Costa.', 'dt_cancelamento': 'Data de cancelamento: 05-Set-2018'}

Or the console script:

$ anavclient --help

Tests

To run the available tests:

$ python -m unittest discover -s tests

License

BSD-3-Clause

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

anavnet-0.0.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

anavnet-0.0.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

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