JWT API AUTHENTICATION

Hello everyone, I’m a bit stuck trying to create a Python script to authenticate with JWT. With GPG, I had 100% success using Ansible, but my experience with JWT has been quite complicated. If anyone can help me with a template or a step-by-step guide on how to perform the authentication, I would greatly appreciate it.