Metadata-Version: 2.4
Name: pgagent-yaml
Version: 0.1.0
Summary: Yaml interface for pgagent
Home-page: https://github.com/andruche/pgagent-yaml
Author: Andrey Chernyakov
License: BSD
Project-URL: Documentation, https://github.com/andruche/pgagent-yaml/blob/master/README.md
Project-URL: Bug Tracker, https://github.com/andruche/pgagent-yaml/issues
Keywords: pgagent,git,yaml
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic
Requires-Dist: pyyaml
Requires-Dist: asyncpg<0.31.0,>=0.27.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

## pgagent-yaml - Yaml interface for pgagent

Export structure of pgagent jobs to yaml files
Sync yaml files to pgagent jobs

## installation

```
pip install pgagent-yaml
```

## usage

### export jobs:
```
usage: pgagent_yaml export [--help] [-d DBNAME] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] --out-dir OUT_DIR [--clean]
                           [--ignore-version] [--include-schedule-start-end]

options:
  --help                show this help message and exit
  -d DBNAME, --dbname DBNAME
                        database name to connect to
  -h HOST, --host HOST  database server host or socket directory
  -p PORT, --port PORT  database server port
  -U USER, --user USER  database user name
  -W PASSWORD, --password PASSWORD
                        database user password
  --out-dir OUT_DIR     directory for exporting files
  --clean               clean out_dir if not empty (env variable PGAGENT_YAML_AUTOCLEAN=true)
  --ignore-version      try exporting an unsupported server version
  --include-schedule-start-end
                        include "start", "end" fields (without by default)
```

### sync jobs:
```
usage: pgagent_yaml sync [--help] [-d DBNAME] [-h HOST] [-p PORT] [-U USER] [-W PASSWORD] --source SOURCE [--dry-run]
                         [--echo-queries] [-y] [--ignore-version]

options:
  --help                show this help message and exit
  -d DBNAME, --dbname DBNAME
                        database name to connect to
  -h HOST, --host HOST  database server host or socket directory
  -p PORT, --port PORT  database server port
  -U USER, --user USER  database user name
  -W PASSWORD, --password PASSWORD
                        database user password
  --source SOURCE       directory or file with jobs to sync to pgagent
  --dry-run             test run without real changes
  --echo-queries        echo commands sent to server
  -y, --yes             do not ask confirm
  --ignore-version      try exporting an unsupported server version
```

## examples

```
$ pgagent_yaml export -d my_database -h 127.0.0.1 -p 5432 -U postgres --out-dir /tmp/jobs/
$ pgagent_yaml sync -d my_database -h 127.0.0.1 -p 5432 -U postgres --source /tmp/jobs/
```
