No project description provided
Project description
ntfy-jupyter
ntfy-jupyter
is an IPython extension that allows you to send notifications using the ntfy service directly from Jupyter notebooks. This extension helps you keep track of your notebook tasks and results, sending notifications upon cell execution or failure.
Features
- Send Notifications: Notify on cell execution success or failure.
- Customizable Messages: Include custom messages and cell code in notifications.
- Error Reporting: Automatically notify if a cell fails to execute.
- Topic Creation: Generate unique, pseudo-private topic names for notifications.
Table of Contents
Installation
To install ntfy-jupyter
, use Poetry or pip.
Using Poetry
-
Clone the repository:
git clone https://github.com/vali101/ntfy-jupyter cd ntfy-jupyter
-
Install dependencies:
poetry install
Using pip
Alternatively, you can install ntfy-jupyter
directly from PyPI:
pip install ntfy-jupyter
Usage
To use ntfy-jupyter
, follow these steps:
-
Load the Extension: In a Jupyter notebook cell, load the extension with:
%load_ext ntfy_jupyter
-
Use the Magic Command: Notify about cell execution or errors using the
notify
magic command:%%notify -t your_topic -m "Your message" -e -i # Your cell code here
-t
or--topic
: The topic for the notification.-m
or--message
: The message to send. Defaults to an empty message.-e
or--errors
: Include error details in the notification if the cell fails.-i
or--include
: Include the cell code in the notification.
Topic Creation
You can use the create_topic
utility function to generate unique, pseudo-private topic names:
from ntfy_jupyter import create_topic
topic = create_topic('alerts')
print(f"Generated topic: {topic}")
create_topic(base_name, key_length=16)
: Creates a unique topic name by appending a cryptographic key to the base name.
Configuration
You can configure the behavior of ntfy-jupyter
through the command-line arguments of the %notify
magic command. Ensure you have a valid ntfy
topic to receive notifications.
Development
To contribute to the development of ntfy-jupyter
, follow these steps:
-
Clone the Repository:
git clone https://github.com/yourusername/ntfy-jupyter.git cd ntfy-jupyter
-
Set Up Development Environment:
poetry install
-
Make Your Changes and submit a pull request.
For detailed contribution guidelines, refer to CONTRIBUTING.md.
Contributing
We welcome contributions to ntfy-jupyter
. Please follow these guidelines:
- Fork the Repository: Create your own fork of the repository.
- Create a Branch: Make a new branch for your changes.
- Submit a Pull Request: Provide a clear description of your changes.
Please ensure your code adheres to the project's style guide and passes all tests.
License
ntfy-jupyter
is licensed under the MIT License. See LICENSE for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ntfy_jupyter-0.1.0.tar.gz
.
File metadata
- Download URL: ntfy_jupyter-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.9 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8227faf547cc98627f1073f0d35e8e19aeac2adc7cc28d6ca54c68725dfe0ef |
|
MD5 | bfbce0d472e31c182da6a8e088c3ef81 |
|
BLAKE2b-256 | 3c7988c6fe3dace6d1035efce5227aecde5923e815093e85dc382d8009b7ee59 |
File details
Details for the file ntfy_jupyter-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ntfy_jupyter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.9 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc4f123c470f6e5824f828707720e9004314a648709d098f9697bc2d154d15ab |
|
MD5 | 6a640345de019766f4a89385d24bee01 |
|
BLAKE2b-256 | 5874e8d3b38adbc6e5122a2a1b002e295255f0de416b7c36fb3129dd8dad5b25 |