Skip to main content

A beautiful Python CLI tool built with typer and rich, distributed via pip and based on Pingera SDK

Project description

Pingera Platform CLI 🚀

A beautiful Python CLI tool for the Pingera Platform - built with typer and rich, distributed via pip and based on Pingera SDK.

PyPI version Python Support License: MIT

✨ Features

  • Beautiful Terminal Output: Powered by Rich library for colorful, formatted output
  • Modern CLI Interface: Built with Typer for intuitive command-line interactions
  • Pingera Platform Integration: Seamlessly integrates with Pingera SDK for managing and running checks (statuspages and other coming soon)
  • Cross-Platform: Works on Windows, macOS, and Linux
  • Easy Installation: Simple pip install with all dependencies managed
  • Configuration Management: Flexible configuration with environment variables and config files

🚀 Installation

Install Pingera Platform CLI using pip:

pip install pingera-cli

🔐 Authentication

Before using the CLI, you need to authenticate with the Pingera Platform:

  1. Get your API key: Visit app.pingera.ru and create an API token in your account settings
  2. Login to the CLI:
    pngr auth login --api-key your-api-key-here
    
  3. Verify authentication:
    pngr auth status
    

Alternatively, you can set the API key as an environment variable:

export PINGERA_API_KEY=your-api-key-here

📖 Basic Usage

List all monitoring checks

pngr checks list

Get details of a specific check

pngr checks get <check-id>

Create a new web check

pngr checks create \
  --name "My Website" \
  --type web \
  --url https://example.com \
  --interval 300

Get check results

pngr checks results <check-id>

Run an on-demand check

pngr checks run custom \
  --type web \
  --url https://example.com \
  --name "Quick Test"

Manage check groups

# List all check groups
pngr checks groups list

# Create a new group
pngr checks groups create \
  --name "Production APIs" \
  --description "Critical production endpoints" \
  --color "#FF5733"

# Assign a check to a group
pngr checks assign-group check_123 --group-id group_456

List available regions

pngr checks list-regions

Filter regions by check type

pngr checks list-regions --check-type web

🔧 Configuration

The CLI stores configuration in ~/.config/pingera-cli/config.json. You can manage settings with:

# Show current configuration
pngr config show

# Set default output format
pngr config set output_format json

📊 Output Formats

The CLI supports multiple output formats:

  • table (default): Human-readable tables
  • json: JSON format for scripting
  • yaml: YAML format
# JSON output
pngr checks list --output json

# YAML output  
pngr checks list --output yaml

🌐 Platform Links

🛠️ Development

# Clone the repository
git clone https://github.com/pingera/pingera-cli.git
cd pingera-cli

# Install in development mode
pip install -e .

# Test the CLI (after installation)
pngr --help

# Run tests
python -m pytest tests/

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📞 Support

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

pingera_cli-0.1.3.tar.gz (56.4 kB view details)

Uploaded Source

Built Distribution

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

pingera_cli-0.1.3-py3-none-any.whl (49.2 kB view details)

Uploaded Python 3

File details

Details for the file pingera_cli-0.1.3.tar.gz.

File metadata

  • Download URL: pingera_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 56.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for pingera_cli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 32194fcf51f51b52af3a6504ddb6cd0db65bdd5b8f83d5d69e2eb7b85ed24569
MD5 4d8aaf306021ea2a43571016297f2de8
BLAKE2b-256 be052dbd79371fd134998ec9813f0a6d690a38efbfc6991415a2e56ea6372489

See more details on using hashes here.

File details

Details for the file pingera_cli-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pingera_cli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f6023a13a95c526a49ad3b3769321f2003372ee3958988cb5b5a0ee08623acc6
MD5 a1a5e0729557a05339177857ffdcee57
BLAKE2b-256 3a16eb7749daf16a4acdf0f13507628d76da620c048c0bd707d22189a842cb4c

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