Technical requirements
We’ll create and process authorization tokens in this chapter, and for that, we need the PyJWT
package, which you install like this:
$ pip install pyjwt
We could include (hardcode) the created tokens in our Django app and microservices, but that would be rather unsafe. Therefore, we’ll include the tokens as settings in a safe .env
file, and to process the tokens, we’ll apply the python-dotenv
package, which you install as follows:
$ pip install python-dotenv
Furthermore, you’ll find the files for this chapter on GitHub at https://github.com/PacktPublishing/Hands-on-Microservices-with-Django/tree/main/Chapter09.