Skip to main content

Command-line and web tool with modular interface.

Project description


Pegasus

A command line tool for automating various tasks.

Installation

Use the package manager pip to install Pegasus.

pip3 install -r requirements.txt

Usage

Web

Run the pegasus_web.py file, this will start a flask server and allow you to access it through the displayed location (http://127.0.0.1:5000/) in a browser.

python3 pegasus_web.py

Terminal

Run the pegasus_terminal.py file, this will load up the terminal version of Pegasus.

python3 pegasus_terminal.py

command: 

SQL

Use Pegasus to save and run queries more easily. Configure your connections, queries, and commands (collection of queries) by going to /sqlsetup, or using the SQL Setup option in the settings drop-down.

Create connections to your commonly used databases for MySQL, SQL Server and Azure DBs. Save your queries, then group them together with a command. Include parameters in your queries with %p.

Default Commands

  • help (loads list of all available commands
  • format (format json, sql, xml, and sql lists from your clipboard)
  • sql (save and run your common sql queries)
  • update (check and update to the latest version of Pegasus)

Adding modules

Follow the below structure for any new modules. Save this into the modules folder and import this at the top of the main.py file with the format from modules.file_name import class_name

class example:
    """Tagline here for description of the module. Used when running the default 'help' command."""

    def __init__(self):
        pass

    def __run__(self, params=None):

        """actions performed here"""

        return [] # return list of results to be returned to the user

    def sub_commands(self):
        """Provide a list of sub-commands that can be called directly without the module code."""

        return []

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

pegasus_client-0.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

pegasus_client-0.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file pegasus_client-0.3.tar.gz.

File metadata

  • Download URL: pegasus_client-0.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.6

File hashes

Hashes for pegasus_client-0.3.tar.gz
Algorithm Hash digest
SHA256 0cd455ca898a406e2203c667c1c21f99416bdfca4d0f9f0da24a6f923ee1d2d5
MD5 a298096821c12b9f6fb0b58d54b8a418
BLAKE2b-256 63d11643d95860428d7afcce2a05f3cf500db5ffb40959648a1e201fc4f48424

See more details on using hashes here.

File details

Details for the file pegasus_client-0.3-py3-none-any.whl.

File metadata

  • Download URL: pegasus_client-0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.6

File hashes

Hashes for pegasus_client-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a38985ef6ebadc85231c65aaac3ccdfe57c04a5b1847070ea46462dd2f385cf8
MD5 152a0eebe5a6eeec86c4f7b5768a7634
BLAKE2b-256 36751b4b937ce9fdabe852ab9ea2f412bc7013635699131ac09b450c02657052

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