Metadata-Version: 2.1
Name: sud
Version: 0.1.0
Summary: Scaleway Update DNS
Home-page: https://github.com/ffaraone/sud
License: Apache-2.0
Keywords: sud,scaleway,dns,dynamic,dynamicdns
Author: Francesco Faraone
Requires-Python: >=3.10,<4
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: Name Service (DNS)
Classifier: Topic :: System :: Networking
Classifier: Topic :: Utilities
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: humanize (>=4.9.0,<5.0.0)
Requires-Dist: python-telegram-bot (>=20.8,<21.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: rich (>=13.7.0,<14.0.0)
Project-URL: Documentation, https://github.com/ffaraone/sud
Project-URL: Repository, https://github.com/ffaraone/sud
Description-Content-Type: text/markdown

# SUD

![pyversions](https://img.shields.io/pypi/pyversions/sud.svg) [![PyPi Status](https://img.shields.io/pypi/v/sud.svg)](https://pypi.org/project/sud/) [![Test SUD](https://github.com/ffaraone/sud/actions/workflows/test.yml/badge.svg)](https://github.com/ffaraone/sud/actions/workflows/test.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=sud&metric=alert_status)](https://sonarcloud.io/dashboard?id=sud) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=sud&metric=coverage)](https://sonarcloud.io/dashboard?id=sud) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=sud&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=sud)


   > Sud nuie simme r'o Sud,  
   > nuie simme curt' e nire,  
   > nuie simme buone pe' canta  
   > e faticamm' a faticà  
   >  
   > [(Pietra Motecorvino)](https://en.wikipedia.org/wiki/Pietra_Montecorvino)


`SUD` (Scaleway Update Dns) is a small utility to add/update an "A" record in a DNS zone
managed by [Scaleway](https://scaleway.com).


## Install via Pip


```bash
$ pip install sud
```

## Configure

By default SUD search for a configuration file in `/etc/sud/sud-config.yml`.

A minimal configuration file need the hostname you want to add/update and
the API secret needed to talk with the Scaleway API like in the following example:

```yaml
hostname: myname.mydomain.com
api_secret: 1279bde5-150f-4113-ba37-c4c58e1dfece
```

It is possible to change the frequency with which SUD checks if an IP change has occurred
as well as receiving a telegram notification with the new IP address:


```yaml
hostname: myname.mydomain.com
api_secret: 1279bde5-150f-4113-ba37-c4c58e1dfece
frequency: 600 # each 10 minutes
notifications:
  telegram:
    token: 0987654321:tdCkfKaJooaIWMvebbKYeliLfLhlhvpKAB
    chat_id: -1234567890
```

## Run

To run sud just type:

```bash
$ sud run
```

if you want to place your config file somewhere else you can use:

```bash
$ sud -c /path/to/config.yml run
```

## Help

You can get help just typing:

```bash
$ sud --help
```

## License

`SUD` is released under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).

