Skip to main content
logo

ytnoti

Easy-to-use Python library for receiving real-time YouTube push notifications for video uploads, edits, deletions, and live streams.
PyPI version

ytnoti is designed to help you receive YouTube push notifications in real-time for video upload, edit, delete, and live stream easily and efficiently.

🛠️ How it works

This library uses YouTube Data API v3 via PubSubHubbub to receive push notifications, so you can receive notifications in real time without constantly polling the YouTube API.

In addition, this method doesn't require any API key for YouTube Data API, so you can use this library without any quota limit.

💻 Installation

This library requires Python 3.11 or higher.

pip install ytnoti

📖 Simple Example

Following is a simple example of how to use ngrok to receive push notifications (not recommended for production).

from pyngrok import ngrok
from ytnoti import YouTubeNotifier, Video

ngrok.set_auth_token("Your ngrok token here")

notifier = YouTubeNotifier()


@notifier.upload()
async def listener(video: Video) -> None:
    print(f"New video from {video.channel.name}: {video.title}")


notifier.subscribe("UCuFFtHWoLl5fauMMD5Ww2jA")  # Channel ID of CBC News
notifier.run()

Following is a simple example of how to use your domain to receive push notifications.

from ytnoti import YouTubeNotifier, Video

notifier = YouTubeNotifier(callback_url="https://yourdomain.com")


@notifier.upload()
async def listener(video: Video) -> None:
    print(f"New video from {video.channel.name}: {video.title}")


notifier.subscribe("UCuFFtHWoLl5fauMMD5Ww2jA")  # Channel ID of CBC News
notifier.run()

For more examples, please visit the examples folder.

📚 Documentation

Please read the documentation before asking questions. Your question may already be answered there.

👥 Community

If you are having any problems with using this library, please feel free to ask for help in the issues section or on my Discord server.

discord invite

📄 License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Metadata

Release files for ytnoti 3.0.2

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

Source distribution (sdist)

Source distribution for ytnoti 3.0.2
File Size Uploaded
ytnoti-3.0.2.tar.gz 19.6 kB Details

Built distribution (wheel)

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

Total release size: 34.9 kB

Release files / ytnoti-3.0.2.tar.gz

Download URL ytnoti-3.0.2.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d0e5780c90711eacc1848ece46d0a017731186916148f6902def5f3c096eb274
BLAKE2b-256 checksum
How to use checksums
ad7b13647e20df1966cd401a98e4abe89deaeba8cdbfe6c7ff9878d7154ea9ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ytnoti-3.0.2-py3-none-any.whl

Download URL ytnoti-3.0.2-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1aebb76548eb764932a9b71bbd8663965fd5fd7c538386b185e6b8e84472df1a
BLAKE2b-256 checksum
How to use checksums
1473e94e2a7ccac6018a86c9bb05f6bbd7421567496bc35e17e2d1fce10f9735
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

3.0.4

2 release files

3.0.3

2 release files

This release

3.0.2 This release

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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