Skip to main content

Broadcast messages for CLI tools, such as a warning for critical bug or notification about new features.

Project description

clicast

Broadcast messages for CLI tools, such as a warning for critical bug or notification about new features.

Quick Start Tutorial

As easy as 1-2-3:

  1. Install:

    pip install clicast
  2. Create your own cast file and make it accessible as an URL. I.e. https://raw.githubusercontent.com/maxzheng/clicast/master/tests/example.cast

    cast "New Message" -f example.cast
    # See 'cast -h' for more options to edit cast file
  3. Import and call check_message:

    from clicast import check_message
    
    def main():
        check_message('https://raw.githubusercontent.com/maxzheng/clicast/master/tests/example.cast',
                      allow_exit=True,
                      header='=' * 80,
                      footer='=' * 80)

CLI Example

Don’t even want to write the bin script to try? I got you covered! :)

$ wget https://raw.githubusercontent.com/maxzheng/clicast/master/bin/cast-example
$ chmod +x cast-example

If you run cast-example for the first time, you will see:

$ ./cast-example
================================================================================
We found a big bad bug. Please try not to step on it!! Icky...
No worries. It will be fixed soon! :)

Version 0.1 has been released! If you upgrade, you will get:
1) Cool feature 1
2) Cool feature 2
So what are you waiting for? :)

Version 0.2 has been released! Upgrade today to get cool features.

There is a small bug over there, so watch out!
================================================================================
Hello World! Pass in '-f' to see message targeted for that option

And run it again:

$ ./cast-example
================================================================================
We found a big bad bug. Please try not to step on it!! Icky...
No worries. It will be fixed soon! :)
================================================================================
Hello World! Pass in '-f' to see message targeted for that option

And now with -f option:

$ ./cast-example -f
================================================================================
We found a big bad bug. Please try not to step on it!! Icky...
No worries. It will be fixed soon! :)

A bug that affects the -f option. (applies only if `clicast.filters.match_cli_args` filter is used)
================================================================================
Hello World! Pass in '-f' to see message targeted for that option

That’s it!

More

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

clicast-1.0.1.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

clicast-1.0.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file clicast-1.0.1.tar.gz.

File metadata

  • Download URL: clicast-1.0.1.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for clicast-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3b4eb7593972d1d6b6ad829135ccdb080d804534cdbd8ebd651c99ea1cfa5129
MD5 6583e7ec944df78dac5facae2f1e5259
BLAKE2b-256 7bdd8807daa012e2a857ed27cbff33724a307b837462ad70dbd2c90f8bacdf6d

See more details on using hashes here.

File details

Details for the file clicast-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: clicast-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for clicast-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6f048298e194d80672d1308708db964958de740e3efae13b3663b594ff412c2c
MD5 075f15ac35820a86a98a4254b34b0004
BLAKE2b-256 2ee4050ba96c4076a30736eac287a18634f710a3abd27bb344055e6ed6258e82

See more details on using hashes here.

Supported by

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