Skip to main content

Easy-to-use Python library for receiving YouTube push notification for video upload and edit in real-time

Project description

logo

ytnoti

Easy-to-use Python library for receiving YouTube push notifications for video upload and edit in real-time

ytnoti is designed to help you receive YouTube push notifications in real-time for video upload and edit 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):
    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):
    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-2.1.4.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

ytnoti-2.1.4-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ytnoti-2.1.4.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.23

File hashes

Hashes for ytnoti-2.1.4.tar.gz
Algorithm Hash digest
SHA256 67216cbf2e46f30dad4edd7d4bb1e1be860ffb4e45fb50c80826a6ee515acf34
MD5 db8d815744ccddd658f9f961549e6995
BLAKE2b-256 41f43b13d19c295eddb5f7608f21b787c23a6c9e817549be3f86329ce1401205

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ytnoti-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.23

File hashes

Hashes for ytnoti-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7b6346714f5cdc86685d99530244e5bcbec284a598e7e74af49579fa6df671a8
MD5 285d53a817ae1c4ddb8d204918628b92
BLAKE2b-256 5fca1db1eab9ac7dc6cc1a23ccc47b75ef19d1433206bf11b42ea1b7b997f020

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