Skip to main content

wait for postgres defined in django settings to be up

Project description

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:

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.

pgwait path.to.settings

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

pgwait-0.4.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pgwait-0.4-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file pgwait-0.4.tar.gz.

File metadata

  • Download URL: pgwait-0.4.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.21.0 CPython/3.11.11 Linux/6.12.10-1-default

File hashes

Hashes for pgwait-0.4.tar.gz
Algorithm Hash digest
SHA256 e963f5bf8aa81f01edac3082c6790cc81464504066902d6e33e2d99e5f0a5148
MD5 b3a9f7bab50d431d6881e6d72a5552b3
BLAKE2b-256 adb3e434e07108dd88d3efeac570c70fa0493eb2df50649abc3f0e7004735574

See more details on using hashes here.

File details

Details for the file pgwait-0.4-py3-none-any.whl.

File metadata

  • Download URL: pgwait-0.4-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.21.0 CPython/3.11.11 Linux/6.12.10-1-default

File hashes

Hashes for pgwait-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 016fe3c8cf60f96422bd792190ce607c21d0ed8b625870f995cd9e747c719b5f
MD5 1373110a42c4a75f22fd778079f4275b
BLAKE2b-256 88f55d93f70af8b892b675c9522205f58e148c6b75d038bfee59093f5542afcb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page