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.0

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.0
File Size Uploaded
clicast-1.0.0.tar.gz 18.1 kB Details

Built distribution (wheel)

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

Total release size: 27.3 kB

Release files / clicast-1.0.0.tar.gz

Download URL clicast-1.0.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
391e55ce63c3fa586bc495177ba9677ae0a88594cee0870f62d5b66718d44d87
BLAKE2b-256 checksum
How to use checksums
82f5f331d6e55467b397d55f84a4c157a07931148333e8b27846dfd6fbbd1cb4
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.0-py3-none-any.whl

Download URL clicast-1.0.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
382ab5d91dfb003f5838a259a15ac897030c766144a829f00813c111020411d5
BLAKE2b-256 checksum
How to use checksums
1abd3993d4c824397c34733e3d226216ac8062bfe678775e88ca02471884487f
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

1.0.1

2 release files

This release

1.0.0 This release

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