Skip to main content

Command line utility to call the Endid.app Slack app

Project description

Endid Python and Command-line client

Command-line utility and Python client for calling the Endid Slack app to announce that a task has ended!

Endid.app is a simple informal Slack integration for developers and data scientists.

Find yourself constantly checking terminals, notebooks, or web apps waiting to see if your dev tasks have finished?

Endid supplies a single token for any Slack channel. You can use Endid's simple API or command-line utility to let you know when any process has completed.

Installation

To install both Python and Command-line clients:

pip install endid

Usage

Both clients store last-used tokens and messages on your system, so subsequently calling the bare-bones client with no token will still reach Slack.

Once Endid is installed in Slack, go to any channel (or message history with Endid app bot) and type /endid. You will receive a token such as 7c710a188f874520be1f7ab7815c6cd1 which you would use in the examples below.

Command Line

Supply the token as an argument so a simple message ('Your task has ended!') appears in the Slack channel:

endid -t 7c710a188f874520be1f7ab7815c6cd1

Next time, just call endid to reuse the same token and Slack channel:

endid

Supply a custom message (to the saved channel/token):

endid -t 7c710a188f874520be1f7ab7815c6cd1 -m 'Here is a message'

For more command-line options run endid -h

From Python code

From your Python code, for example in a Jupyter notebook:

import endid
endid.call(token='7c710a188f874520be1f7ab7815c6cd1')

To use the same token as last time (whether from Python or Command-line):

import endid
endid.call()

Extra arguments:

message - a custom message to display in the Slack channel.

writeprefs - whether to write token/message to the preferences file so they can become defaults next time (default=True)

readprefs - whether to read token/message from the preferences file (default=True)

printoutput - whether to print any success or error messages to the screen (default=False)

The call function returns an OK response from the API if everything goes to plan, and error messages if not.

Installation Troubleshooting

The installation instructions assume you have pip on your system. This is usually the case for modern Windows and Mac. If not, you can install pip first.

Alternatively, download this file, rename it to endid and place it somewhere in your path. Make it executable too.

If you are using virtualenvs for Python development, pip install endid may attempt to install it inside your active virtualenv - which will work fine as long as the virtualenv is active. To install 'globally' deactivate the virtualenv first. If you then get a complaint that pip 'could not find an activated virtualenv', first set the environment variable PIP_REQUIRE_VIRTUALENV=false.

Please do not hesitate to raise a GitHub Issue on this repo, or contact support@endid.app to resolve installation or usage issues on your system.

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

endid-0.0.5.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

endid-0.0.5-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file endid-0.0.5.tar.gz.

File metadata

  • Download URL: endid-0.0.5.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for endid-0.0.5.tar.gz
Algorithm Hash digest
SHA256 47d40e8a1095fc10633964b091cf0381a987d2e6150cd4864b45ca1c169a9d54
MD5 31127f6b62fe6671e4ff7880fb2ccae6
BLAKE2b-256 be2e12bc6451f1e76e6540ab11375c6b2def03ac45decee6f1f22efc242ed8ed

See more details on using hashes here.

File details

Details for the file endid-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: endid-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for endid-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 040d0118f5e97956da877a86d92a8c675192beaaed5f2cee8eb7a4aa2f6c0004
MD5 aa889c188746d99b06d9f98189a49860
BLAKE2b-256 2a83d40f23b7a6ebd69a31dfba6ce1a64ba5b9afe2fd6bc5bc30668c0e8aa40c

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