Encode and Decode RS256 JSON Web Tokens with Python and Go
Project description
pygo-jwt
This project focuses on managing JSON Web Tokens signed with RS256. Inspired by pyjwt,
this library provides core encode and decode functionality, utilizing the standard crypto package within Go instead of
cryptography.
Example Usage for Python
pip install pygo-jwt
import pygo_jwt
private_jwk = pygo_jwt.new_jwk(size=2048)
private_pem = pygo_jwt.jwk_to_pem(private_jwk)
public_jwk = pygo_jwt.extract_public_jwk(private_jwk)
public_pem = pygo_jwt.extract_public_pem(private_pem)
payload = {'message': 'hello world', 'count': 4}
token = pygo_jwt.encode(payload=payload, key=private_pem, mode='pem')
token_data = pygo_jwt.decode(token=token, key=public_jwk, mode='jwk')
Example Usage for Go
go mod init main
go get github.com/rkhullar/python-libraries/pygo-jwt/pygo_jwt/go
package main
import (
"fmt"
lib "github.com/rkhullar/python-libraries/pygo-jwt/pygo_jwt/go/core"
)
func main() {
private_jwk, _ := lib.NewJWK(2048, nil)
private_pem, _ := lib.JWKToPEM(private_jwk)
fmt.Println(private_jwk)
fmt.Println(private_pem)
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygo-jwt-0.0.9.tar.gz.
File metadata
- Download URL: pygo-jwt-0.0.9.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bfb397b59b8e5f1ac37dbc81d51928f92fa74000b15365c4fd8ca93b73772dc
|
|
| MD5 |
d17671b076844e012189df5facfde15e
|
|
| BLAKE2b-256 |
b90c9eaab5282fe5eb4d50768cadc8a463884581ace1e65e45fa077fed88b0c7
|
File details
Details for the file pygo_jwt-0.0.9-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.2 MB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07867d153a55062c67264aba233cefb9cd848111308732e495f35d1c1aa759f0
|
|
| MD5 |
2babd2e67974a90ef1c01afc2d595328
|
|
| BLAKE2b-256 |
5875f2550c073fa8ebe196ba659b9a857117b9717280edaf05d482ba7201f79a
|
File details
Details for the file pygo_jwt-0.0.9-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.3 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feae78e1e7ba767a25d7cfa91c20c5e0134dd74cda3fa77173de9f690f650aaf
|
|
| MD5 |
3ee69ae83105c8af28fd99e76a12c7f1
|
|
| BLAKE2b-256 |
21cc87a0e16a294998ec20dfe3840b0edc0898376ec9b3fa1fea39b404989b2f
|
File details
Details for the file pygo_jwt-0.0.9-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 2.5 MB
- Tags: PyPy, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
338a225438ed0c47f7a6bde9d05686b6e1c97d271a08505e6503d114806cc77a
|
|
| MD5 |
37c3e22b6ad2fac61f3f2f095fd2ce84
|
|
| BLAKE2b-256 |
eafe0a1e8c31e493d5ed296725a417a9d315ad3853b8e85bee9c2fcac24dd251
|
File details
Details for the file pygo_jwt-0.0.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: PyPy, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b839ad892c9ac4e331a46dd6da72289c2ec9c1103579e43522b6540fe7874b21
|
|
| MD5 |
dce21491c0395f43afc77b1d6f79b8ac
|
|
| BLAKE2b-256 |
0661c19bdb5bfe0cf95078259e97f6ce7faf706ebfab1f5912f057488307bb55
|
File details
Details for the file pygo_jwt-0.0.9-pp310-pypy310_pp73-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: PyPy, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9cd07a9fec1a31ec4d980f31b8946afef53c85dd26be01f6abe5decc2d4e2c2
|
|
| MD5 |
ebcfa06fb6431fa91f6446b186dcab63
|
|
| BLAKE2b-256 |
a07c8ad46ddf3c5ed77b24aa6598ae23dd9d72df8006372d540446a4954d0875
|
File details
Details for the file pygo_jwt-0.0.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34762e8494969509894bf6336dfa82cc570cfa2e5f3bf64614be1bb2fa7f0e7a
|
|
| MD5 |
e0e4012a95f78534f93fe8958a2cd272
|
|
| BLAKE2b-256 |
d0e6ab328a51ef58c01d60f3da3c24188d07587ea3a228ad721fb658bb36e0ca
|
File details
Details for the file pygo_jwt-0.0.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6719e3dc80bb78e50565aa83f3ea4b87001f870b4b75d896fbfdf32257b0380
|
|
| MD5 |
927efc59e39309ecc9198aab6341fac4
|
|
| BLAKE2b-256 |
2726e7ea2b89b9007427ee42e23c6811ace34871f76814103b0b2b78c352d3fb
|
File details
Details for the file pygo_jwt-0.0.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7f48b7213d4e915ab1d75e8c60408d03aff8b99474c62b911f9a11b2dd0e2cd
|
|
| MD5 |
3117f239bd97798865643e2acf0a9ef8
|
|
| BLAKE2b-256 |
75cd49ab0137d83057455cf61e8faaa70179a11f0fb6303f562e91d631c7a057
|
File details
Details for the file pygo_jwt-0.0.9-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0979655ec6528912f5bd9962401dcf59eaee6186cc2c6b20f0b1033c15be029e
|
|
| MD5 |
dba3aeb4dc78a5b376b9698c221e0545
|
|
| BLAKE2b-256 |
1cd2408b1b89eddfef7c329ee75b21da8400f60d939bd0d3da05dbde445a4468
|
File details
Details for the file pygo_jwt-0.0.9-cp312-cp312-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ebf30880218c6f29ae9c90ca9fc293903ab1c385f130a2faa40c740baf74549
|
|
| MD5 |
feedbb115bf7fea22e625ac39d9b22e4
|
|
| BLAKE2b-256 |
89c7d4eac385805d3159025ad5d4fcbf51ac255c52bd1937f74f0f6379dfbe5b
|
File details
Details for the file pygo_jwt-0.0.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc70c947d9a611343b7b5390adc64bcc1eb95f228910b37802fdd8e85af7e476
|
|
| MD5 |
029c014558a4a8280356011fd9e987c2
|
|
| BLAKE2b-256 |
fbc647aec514ac25ced38af05f806f943c3e796290be6dfe10a999c3578ff4e0
|
File details
Details for the file pygo_jwt-0.0.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
776e2578bb0af98d27f743e9e9b2865652c6b84149966b8faae497f19dbf43c9
|
|
| MD5 |
37086569c6618110dc066de5097e7906
|
|
| BLAKE2b-256 |
66bf1d7643487ddba741b78ae1eb4d15fb7523724992dfe943815dc25f94d991
|
File details
Details for the file pygo_jwt-0.0.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4450a2bd29238357a27365274a468a7c52d02ac2784e8bded8ad966c04e502c2
|
|
| MD5 |
1eae436fd650c956eebc2eff9be62956
|
|
| BLAKE2b-256 |
456e03755d4a64b1df2e1ad5901a9399b5500c5a66c5dca392af36065213a547
|
File details
Details for the file pygo_jwt-0.0.9-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0f666004de52911398ca3b5393f38c6bffbe5b4e06075d6d9ebb53634d0d866
|
|
| MD5 |
ee006dccaa53c299173a14945c7b7202
|
|
| BLAKE2b-256 |
11ace35f17ef01949fe438740d9fb5a2959c929c09d946a7ccc5c8faa20b0d52
|
File details
Details for the file pygo_jwt-0.0.9-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9ab50ea8248b72f9a4bca3b081736f27ef6e3de03705d3d0b321120459cea2e
|
|
| MD5 |
4e6d59879ededa8a12d97e56714b3078
|
|
| BLAKE2b-256 |
913525fd8df835c16c255f71c78acd58e4f69850e471babffa2c4159225dee02
|
File details
Details for the file pygo_jwt-0.0.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c4a85bd8ed21b99e230333f689058dee0f4ba62a51383f41fabab60f5770525
|
|
| MD5 |
7f5b70d6b75b89cb1ed43f17e39c9234
|
|
| BLAKE2b-256 |
551accc38380807486f7a3342f3251505050070a3d5f0698e24d1ec6744e47f8
|
File details
Details for the file pygo_jwt-0.0.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86cd7f4cc62ed8653b10df858c09e095326af65d4fa18bc76bd96b334b2e2406
|
|
| MD5 |
d37171110ac8a15c20ca2211e7ed339a
|
|
| BLAKE2b-256 |
b6cbc46fe56749bb78edea8273ca003be15f429cab27e7acce9d8967a486a491
|
File details
Details for the file pygo_jwt-0.0.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ i686, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0f8aa917e1be4814e0a3e5ae113ab74101532f931f755f9a154ccc95e7a252f
|
|
| MD5 |
545ff2991fd68eced488f405cd45fb77
|
|
| BLAKE2b-256 |
5555be2dec76df37331c5432e56570227a7b8a1cd9bc81bd8b66f73006fd48d0
|
File details
Details for the file pygo_jwt-0.0.9-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd25de23c1cee7e609c299bf3941ce0360f5e519a3ccfbf60cd5aeff430221cb
|
|
| MD5 |
a55f96519d710cdb3ea3b28a61f85038
|
|
| BLAKE2b-256 |
2429e4f5e7e8b1e1454ccf165c3053fcede41389de4f76e5557970ebd6c6991c
|
File details
Details for the file pygo_jwt-0.0.9-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: pygo_jwt-0.0.9-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f80f89739b3ea4bdba349f4396a332303d9771a879ff64cf69b26868797cda
|
|
| MD5 |
469c207d2ae589cd4b717e1e257716a8
|
|
| BLAKE2b-256 |
5fd9bd5468680d68d40f8c46931711f1b77f24d94e833263f023f3e8a834228e
|