Skip to main content

Crystal DBA Agent CLI

Project description

CrystalDBA Agent

Prerequisites

  • Python 3.12 exactly. It is possible later versions will work, but in the past some of our dependencies were not compatible with them.
  • Poetry (Python package manager)

Development Setup

  1. Clone the repository:

    git clone git@github.com:crystaldba/crystaldba.git
    cd crystaldba/agent
    
  2. Install dependencies using Poetry:

    poetry install
    
  3. Copy the environment example file:

    cp env.example .env
    
  4. Edit the .env file with your configuration:

Environment Variables

See agent/shared/constants.py for current details.

Database to Monitor

  • DATABASE_URL: PostgreSQL connection string (required) Example: postgresql://user:password@localhost:5432/dbname

Running the Application

poetry run crystaldba

You can add -v or -vv in order to increase verbosity.

Development Tools

  • Code formatting and linting:

    poetry run ruff format .
    poetry run ruff check .
    
  • Type checking:

    poetry run pyright
    

Running Tests

Install test dependencies:

poetry install --with dev

Apply the required changes to the .env file.

Run unit tests:

poetry run pytest

Run unit tests with increased verbosity:

poetry run pytest -v

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

crystaldba-0.8.0rc1.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

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

crystaldba-0.8.0rc1-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file crystaldba-0.8.0rc1.tar.gz.

File metadata

  • Download URL: crystaldba-0.8.0rc1.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/23.6.0

File hashes

Hashes for crystaldba-0.8.0rc1.tar.gz
Algorithm Hash digest
SHA256 94d518338186f65addb70a01e3326bc33fdcae7eb556e233fa79241c75ed3ad7
MD5 d8db2a1cbcdecba4c9009afc8f2c9d9e
BLAKE2b-256 754bd1f4659b0866d8b804b7783cc196d29567eec90343f4d0607cbc7f3f19a5

See more details on using hashes here.

File details

Details for the file crystaldba-0.8.0rc1-py3-none-any.whl.

File metadata

  • Download URL: crystaldba-0.8.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/23.6.0

File hashes

Hashes for crystaldba-0.8.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c165f324bf884b56e85262cf6403c0a20b131e13c7b3001d239197e1bb9fb2c
MD5 956e6f1582640ac5c822a5e583eba5ea
BLAKE2b-256 544414b0ba375b1f935bb56bb614b15420455022267da17950982a9397b183eb

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