Skip to main content

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

Metadata

Release files for clicast 1.0.1

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

Source distribution (sdist)

Source distribution for clicast 1.0.1
File Size Uploaded
clicast-1.0.1.tar.gz 18.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clicast 1.0.1
File Interpreter ABI Platform
clicast-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.3 kB

Release files / clicast-1.0.1.tar.gz

Download URL clicast-1.0.1.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3b4eb7593972d1d6b6ad829135ccdb080d804534cdbd8ebd651c99ea1cfa5129
BLAKE2b-256 checksum
How to use checksums
7bdd8807daa012e2a857ed27cbff33724a307b837462ad70dbd2c90f8bacdf6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / clicast-1.0.1-py3-none-any.whl

Download URL clicast-1.0.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f048298e194d80672d1308708db964958de740e3efae13b3663b594ff412c2c
BLAKE2b-256 checksum
How to use checksums
2ee4050ba96c4076a30736eac287a18634f710a3abd27bb344055e6ed6258e82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.4.5

1 release file

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