Skip to main content

Patroni CLI

Patroni CLI is a command-line tool that allows you to manage a Patroni PostgreSQL cluster. You can use it to view cluster status, elect new leaders, and perform switchovers between nodes.

Features

  • View Cluster Status: List all cluster members and their roles.
  • Elect New Leader: Trigger a failover and elect a new leader for the cluster.
  • Switchover: Perform a switchover to a specified node or any healthy node.

Installation

You can install the Patroni CLI via pip after packaging:

pip install patroni-cli

Usage

Here are the available commands:

Check Cluster Status

patroni-cli --url http://localhost:8008 --username admin --password admin status

Elect a New Leader

patroni-cli --url http://localhost:8008 --username admin --password admin elect new_leader_name

Perform a Switchover

patroni-cli --url http://localhost:8008 --username admin --password admin switchover target_leader_name

If you want to perform a switchover without specifying a target leader, use:

patroni-cli --url http://localhost:8008 --username admin --password admin switchover

Release files for patroni-cli 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for patroni-cli 0.1.2
File Size Uploaded
patroni_cli-0.1.2.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for patroni-cli 0.1.2
File Interpreter ABI Platform
patroni_cli-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / patroni_cli-0.1.2.tar.gz

Download URL patroni_cli-0.1.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1ff20e96b61143bffa33d8f9af847a8ced1b966d696044df92ffc78d1eff6915
BLAKE2b-256 checksum
How to use checksums
3b8a916dc47357c5ad4537e092d0cd9c92acb69e1778c66c26230bdb8433092c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.4

Release files / patroni_cli-0.1.2-py3-none-any.whl

Download URL patroni_cli-0.1.2-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
651175ba97c75e47eb011ac3bb7b35c20b15eb981a1157f270e4216bef5042e5
BLAKE2b-256 checksum
How to use checksums
3cf24265e7091694f94d735b3f2bcf2e70e4296a80ae113cea999cdfe1ea54ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page