Skip to main content

glesys

A Python library to interact with the Glesys.com API endpoints.
It's also a CLI tool to access a subset of all those features as well as housing a LetsEncrypt certbot Authenticator plugin.

Small Disclaimer: I have no affiliation with Glesys, I just appreciate their API and services

Installation

$ pip install glesys

Usage

:information_source: This assumes a valid glesys.toml configuration.

List all domains

$ glesys dns --all-domains

List all records for hvornum.se

$ glesys dns --all-records hvornum.se

LetsEncrypt challenge

:warning: This assumes you have installed this library locally on the machine before running the certbot utility. This is because certbot will use plugin-discovery via Entry points for plugins. This also requires a valid glesys.toml.

Single certificate for all domains

$ sudo glesys lets-encrypt --all-domains

This will generate certificates for all domains hosted under the Glesys DNS server. This would be eqivilant of running certbot manually for hvornum.se and archlinux.life:

certbot -v certonly --non-interactive --authenticator dns-glesys --preferred-challenges dns --dry-run --server https://acme-staging-v02.api.letsencrypt.org/directory --work-dir /home/anton/github/python-glesys/certbot --logs-dir /home/anton/github/python-glesys/certbot --config-dir /home/anton/github/python-glesys/certbot --text --agree-tos --email anton@hvornum.se --expand --renew-by-default -d '*.hvornum.se,hvornum.se,*.archlinux.life,archlinux.life'

By default it will run against LetsEncrypt staging environment. Use --production to target glesys lets-encrypt against the production endpoint of LetsEncrypt and to remove the dryrun.

Separate certificate for all domains

TBD!

$ sudo glesys lets-encrypt --all-domains --individual

Separate certificate for selected domains

TBD!

$ sudo glesys lets-encrypt --individual --hostname '*.hvornum.se' --hostname 'hvornum.se'

Supported API Endpoints

As of 2023-05-03 API Doc Spec.

Release files for glesys 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glesys 0.2
File Size Uploaded
glesys-0.2.tar.gz 32.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for glesys 0.2
File Interpreter ABI Platform
glesys-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 67.6 kB

Release files / glesys-0.2.tar.gz

Download URL glesys-0.2.tar.gz
Size 32.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6970135159279c8499cd109f094fc029b283c713569ab53645bae5a9a5a595d2
BLAKE2b-256 checksum
How to use checksums
9fbe65057a5294242bdb7b0fe6fae749dc01c4af58e46b6a117a5975673b0a80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / glesys-0.2-py3-none-any.whl

Download URL glesys-0.2-py3-none-any.whl
Size 35.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84d4cc6130d20c97602355afdff012d81177b015384133381964512419dda823
BLAKE2b-256 checksum
How to use checksums
fa8fa1439c351cbbf1d3c4f4aa65073ad2ee789b43b6c21a3987d7c260e72c94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page