This blog will help. https://medium.com/@anupamchand/pgp-encryption-using-python-in-azure-databricks-ef4bd56145ed. We used bash script within databricks to get this working. ​Bash is good good for large files. We tested upto 2GB and it worked fine. With plain python you will run into OOM errors.