Metadata-Version: 2.1
Name: pgwait
Version: 0.4
Summary: wait for postgres defined in django settings to be up
Keywords: postgresql,postgres,cli,database,rdbms,django
Author-Email: Evstifeev Roman <someuniquename@gmail.com>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown

This command-line tool reads django settings, then tries to connect to configured postgresql server until connection succeeds. It is useful on service startup, when you want to launch migrations right after postgres database gets ready.

## Installation

```
pip install pgwait
```

## Usage
To wait before migrations:

```bash
pgwait && ./manage.py migrate
```

### Specifying settings path

You can either set `DJANGO_SETTINGS_MODULE` environment variable, or specify settings module path in the first command-line argument.

```bash
pgwait path.to.settings
```
