Skip to main content

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

Project description

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.

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

ytnoti-3.0.1.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ytnoti-3.0.1-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file ytnoti-3.0.1.tar.gz.

File metadata

  • Download URL: ytnoti-3.0.1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}

File hashes

Hashes for ytnoti-3.0.1.tar.gz
Algorithm Hash digest
SHA256 10266a5317d1b1150ed60cfbaf3208aef4e10b6e31e1d340256b75581fd4c953
MD5 25cc4135f4e54354bda1d37c5149f683
BLAKE2b-256 3c26921e4b98114aff27b6020e177de94c7fb4d6c395682b3d1503e1afd72c5f

See more details on using hashes here.

File details

Details for the file ytnoti-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: ytnoti-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}

File hashes

Hashes for ytnoti-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 58cd93b1332b5c54ff0e367d5a90764d7838b7d5aa88abdc4d0600529d0e6a52
MD5 c8302335637129f16d5452423006f846
BLAKE2b-256 f046fe625ecd6862c17f559eee3f1bba36a61cbb4f6f1ecd992d38ab9a37ffcc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page