Skip to main content

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

Project description

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.

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("UC9EEyg7QBL-stRX-7hTV3ng")  # Channel ID of SpeedyStyle
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("UC9EEyg7QBL-stRX-7hTV3ng")  # Channel ID of SpeedyStyle
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.3.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

ytnoti-2.1.3-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ytnoti-2.1.3.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for ytnoti-2.1.3.tar.gz
Algorithm Hash digest
SHA256 99d80fcb82ec5732954cd358196e6db8d51e0e8bf9ff970c66ae0f7c55c110af
MD5 71627232f4920c4710ca166e1c828c1a
BLAKE2b-256 8c7547e6b73ae1a4d80883cd5568f88a2296a71666b456dd12515e6e37b90776

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ytnoti-2.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for ytnoti-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c765526265e0829d40590ac51259f12c68ebccf950be952341b297bcfce25df8
MD5 9cce740efb5d2f1a090f0c48d4c9da1f
BLAKE2b-256 801e6b7d49481ed7a00135128e5d5e17739c96f8453a22f5fc55e94456a18e8d

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