Signing URLs in Python


I am trying to sign my video URLs in Python, but the example given to do this is in JS. I am not familiar enough with JS so I am not sure how to convert the example code. Has anyone done this in Python before?

Reference article:

I’ve shared a GitHub Gist for this: Generate signed tokens for Cloudflare Stream in Python · GitHub

Basically, it uses the jwcrypto library to abstract all the tedious process of managing signing. You’ll see it’s just a few lines to generate a valid token.


1 Like

We just released a small Python wrapper for Cloudflare Stream. Signing URLs is included in it.

GitHub - Arbington/python-cloudflare-stream: A simple Python API wrapper for Cloudflare Stream's API. is the package
python-cloudflare-stream/ at main · Arbington/python-cloudflare-stream · GitHub is the signed URL code.