A Jetforce application for serving information about UK tidal events over the Gemini Protocol
Project description
GemTide
A Jetforce application for serving information about UK tidal events over the Gemini Protocol.
Take a look | Report a bug | Contact the author
Built with
- Jetforce - framework for writing Gemini applications
- UKHO Tides - client wrapper for the Admiralty UK Tidal API
- Jinja2 - templating engine
Requirements
- Python 3.7 or newer
- API key for the UK Tidal API from Admiralty Maritime Data Solutions Developer Portal. The Discovery subscription is free and provides current plus 6 days' worth of events. Follow the Start up guide for help.
Getting Started
Recommended
Create a virtual environment
$ mkdir /opt/gemtide
$ python3 -m venv /opt/gemtide/venv
$ python3 -m pip install -U pip
$ . /opt/gemtide/venv/bin/activate
Installation
From pip
$ pip install gemtide
Or, from source
$ git clone https://git.sr.ht/~supergrizzlybear/gemtide
$ cd gemtide
$ pip install .
Create file config.yaml and add:
api_key: Your UK Tidal API key
station_prefix: (Optional) the path / prefix that the responses will be served with
Usage
Run the application with a default Jetforce server
$ python3 -m gemtide [config.yaml]
Or, if using a virtual environment
$ /opt/venv/gemtide/bin/gemtide [config.yaml]
Custom Jetforce application
See Jetforce README section on Virtual Hosting
Usage
from jetforce import GeminiServer
from gemtide import GemTideApplication
app = GemTideApplication(api_key, station_prefix="location/")
server = GeminiServer(app)
server.run()
Developing
Create a virtual environment
$ mkdir /opt/gemtide
$ python3 -m venv /opt/gemtide/venv
$ python3 -m pip install --upgrade pip
$ . /opt/gemtide/venv/bin/activate
Clone the repository
$ git clone git@git.sr.ht:~supergrizzlybear/gemtide
$ cd gemtide
Install requirements
$ pip install -r requrements.txt
Test
$ python3 test_gemtide.py
License
This project is licensed under the Floodgap Free Software License.
The Floodgap Free Software License (FFSL) has one overriding mandate: that software using it, or derivative works based on software that uses it, must be free. By free we mean simply "free as in beer" -- you may put your work into open or closed source packages as you see fit, whether or not you choose to release your changes or updates publicly, but you must not ask any fee for it.
Contact
- Email: supergrizzlybear@protonmail.com
- Mastodon: @supergrizzlybear@fosstodon.org
- Gemini: super.grizzlybear.site
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gemtide-0.1.0.tar.gz.
File metadata
- Download URL: gemtide-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
109e12bfc3e4000e69f0b5446365008d640f5fc76adbc9a2ee7809c177667d24
|
|
| MD5 |
d7f4b0dceafe1f78faea192e24b5f9f8
|
|
| BLAKE2b-256 |
692957bc263a9aa8e67aca1603a8043b796676589bc229354fcf9f6f47b76d4a
|
File details
Details for the file gemtide-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gemtide-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0933aa85194ef52add2fd05b9e0193c472769224b6c30b4cb6c7d06cdfe1857b
|
|
| MD5 |
8ca44ff756d8f85a40d04f6faad21c5f
|
|
| BLAKE2b-256 |
6c5086a5d9e8f3ffe2d5f2f5e7a9571fafde344d869df9444cdf30e4efef4d76
|