---
title: "PyJWT | pypx"
description: "JSON Web Token implementation in Python"
canonical_url: "https://pypx.app/packages/PyJWT"
meta:
  "og:description": "JSON Web Token implementation in Python"
  "og:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_PyJWT%2Cversion_2.15.1%2Csummary_JSON%2BWeb%2BToken%2Bimplementation%2Bin%2BPython%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9QeUpXVCI%2Cs_hhlalafCTQemwKbw.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "PyJWT 2.15.1"
  "twitter:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_PyJWT%2Cversion_2.15.1%2Csummary_JSON%2BWeb%2BToken%2Bimplementation%2Bin%2BPython%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9QeUpXVCI%2Cs_hhlalafCTQemwKbw.png"
---

> Index of every page on this site: [llms.txt](https://pypx.app/llms.txt)

# **PyJWT**

v2.15.1

JSON Web Token implementation in Python

33 KB Python 3.9+ py3-none-anyMIT1 deps

[** Diff **](https://pypx.app/packages/PyJWT/diff)

`$ uv add PyJWT`

# PyJWT

A Python implementation of [RFC 7519](https://tools.ietf.org/html/rfc7519). Original implementation was written by [@progrium](https://github.com/progrium).

## Sponsor

+--------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | | If you want to quickly add secure token-based authentication to Python projects, feel free to check Auth0's Python SDK and free plan at [auth0.com/signup](https://auth0.com/signup). | +--------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

## Installing

Install with **pip**:

```console
$ pip install PyJWT
```

## Usage

```pycon
>>> import jwt
>>> encoded = jwt.encode({"some": "payload"}, "secret", algorithm="HS256")
>>> print(encoded)
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg
>>> jwt.decode(encoded, "secret", algorithms=["HS256"])
{'some': 'payload'}
```

## Documentation

View the full docs online at https://pyjwt.readthedocs.io/en/stable/

## Tests

You can run tests from the project root after cloning with:

```console
$ tox
```

## **Details **

<dl>

<dt>Version</dt>
<dd>2.15.1</dd>

<dt>License</dt>
<dd>MIT</dd>

<dt>Python</dt>
<dd>&gt;=3.9</dd>

<dt>Maintainer</dt>
<dd>Jose Padilla &lt;hello@jpadilla.com&gt;</dd></dl>

## **Links**

- [Homepage](https://github.com/jpadilla/pyjwt)
- [View on PyPI](https://pypi.org/project/PyJWT/)

## **Release Cadence **

**7**

releases in the past year

avg 100 days between releases

## **Maintainers **

- Jose Padilla · [hello@jpadilla.com](mailto:hello@jpadilla.com)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://pypx.app/#website","@type":"WebSite","description":"The Python Package Index, reimagined. Fast search, dependency insights, download trends, and changelogs — all in one place.","name":"pypx","url":"https://pypx.app/"},{"@id":"https://pypx.app/packages/pyjwt#webpage","@type":"WebPage","description":"JSON Web Token implementation in Python","name":"PyJWT","url":"https://pypx.app/packages/pyjwt","isPartOf":{"@id":"https://pypx.app/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://pypx.app/packages/pyjwt"]}]},{"@id":"https://pypx.app/packages/pyjwt#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","description":"JSON Web Token implementation in Python","license":"MIT","name":"PyJWT","softwareVersion":"2.15.1"}]}
```

## Sitemap

See the full [sitemap](https://pypx.app/sitemap.md) for all pages.
