Skip to main content

A SDK/helper library to work with Glesys API.

Project description

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.

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

glesys-0.2.tar.gz (32.1 kB view hashes)

Uploaded Source

Built Distribution

glesys-0.2-py3-none-any.whl (35.4 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