{"id":15023325,"url":"https://github.com/adafruit/adafruit_circuitpython_jwt","last_synced_at":"2026-04-23T23:02:26.955Z","repository":{"id":37919676,"uuid":"203632532","full_name":"adafruit/Adafruit_CircuitPython_JWT","owner":"adafruit","description":"JSON Web Token Authentication","archived":false,"fork":false,"pushed_at":"2025-01-16T19:48:04.000Z","size":103,"stargazers_count":7,"open_issues_count":0,"forks_count":8,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-01-28T22:37:33.238Z","etag":null,"topics":["hacktoberfest","jws","jwt"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adafruit.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-21T17:26:50.000Z","updated_at":"2025-01-16T15:11:56.000Z","dependencies_parsed_at":"2024-09-23T23:01:44.298Z","dependency_job_id":"ec3520b2-1e2f-4848-a0bb-686e26bd57c7","html_url":"https://github.com/adafruit/Adafruit_CircuitPython_JWT","commit_stats":{"total_commits":83,"total_committers":17,"mean_commits":4.882352941176471,"dds":0.7710843373493976,"last_synced_commit":"124a61391c78f004a6a14b1f5c92b8edc07ed2c8"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_CircuitPython_JWT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_CircuitPython_JWT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_CircuitPython_JWT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_CircuitPython_JWT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adafruit","download_url":"https://codeload.github.com/adafruit/Adafruit_CircuitPython_JWT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237181541,"owners_count":19268054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","jws","jwt"],"created_at":"2024-09-24T19:58:56.943Z","updated_at":"2025-10-19T17:31:33.663Z","avatar_url":"https://github.com/adafruit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-jwt/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/jwt/en/latest/\n    :alt: Documentation Status\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n    :target: https://adafru.it/discord\n    :alt: Discord\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_JWT/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_JWT/actions/\n    :alt: Build Status\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n    :target: https://github.com/astral-sh/ruff\n    :alt: Code Style: Ruff\n\nJSON Web Token (JWT) Authentication module for CircuitPython. JSON Web Tokens are an open, industry standard\n`RFC 7519 \u003chttps://tools.ietf.org/html/rfc7519\u003e`_ method for representing claims securely between two parties.\n\nThis library currently supports the following signature algorithms for JWT generation and verification:\n * No encoding (\"none\")\n * RS256/SHA-256 (via `Adafruit_CircuitPython_RSA \u003chttps://github.com/adafruit/Adafruit_CircuitPython_RSA\u003e`_)\n * RS384/SHA-384 (via `Adafruit_CircuitPython_RSA \u003chttps://github.com/adafruit/Adafruit_CircuitPython_RSA\u003e`_)\n * RS512/SHA-512 (via `Adafruit_CircuitPython_RSA \u003chttps://github.com/adafruit/Adafruit_CircuitPython_RSA\u003e`_)\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython \u003chttps://github.com/adafruit/circuitpython\u003e`_\n* `Adafruit_CircuitPython_RSA \u003chttps://github.com/adafruit/Adafruit_CircuitPython_RSA\u003e`_\n* `Adafruit_CircuitPython_binascii \u003chttps://github.com/adafruit/Adafruit_CircuitPython_binascii\u003e`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle \u003chttps://github.com/adafruit/Adafruit_CircuitPython_Bundle\u003e`_.\n\nInstalling from PyPI\n=====================\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI \u003chttps://pypi.org/project/adafruit-circuitpython-jwt/\u003e`_. To install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-jwt\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-jwt\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n    mkdir project-name \u0026\u0026 cd project-name\n    python3 -m venv .venv\n    source .venv/bin/activate\n    pip3 install adafruit-circuitpython-jwt\n\nUsage Example\n=============\n\nGenerating encoded JWT\n\n.. code-block:: python\n\n        from os import getenv\n        import adafruit_jwt\n\n        # Import Private RSA key from a settings.toml file\n        private_key = getenv[\"private_key\"]\n\n        # Create JWT Claims\n        claims = {\"iss\": \"joe\",\n                \"exp\": 1300819380,\n                \"name\": \"John Doe\",\n                \"admin\": True}\n\n        # Generate JWT, sign with RSA private key and RS-256\n        encoded_jwt = adafruit_jwt.JWT.generate(\n            claims, private_key, algo=\"RS256\")\n        print(\"Encoded JWT: \", encoded_jwt)\n\n\nValidating a generated JWT, encoded_jwt.\n\n.. code-block:: python\n\n        import adafruit_jwt\n        decoded_jwt = adafruit_jwt.JWT.validate(encoded_jwt)\n        # The decoded JWT's JOSE header and claims set are returned as a tuple\n        print('JOSE Header: {}\\nJWT Claims: {}'.format(decoded_jwt[0], decoded_jwt[1]))\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs \u003chttps://docs.circuitpython.org/projects/jwt/en/latest/\u003e`_.\n\nFor information on building library documentation, please check out `this guide \u003chttps://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1\u003e`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n\u003chttps://github.com/adafruit/Adafruit_CircuitPython_JWT/blob/main/CODE_OF_CONDUCT.md\u003e`_\nbefore contributing to help this project stay welcoming.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Fadafruit_circuitpython_jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadafruit%2Fadafruit_circuitpython_jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Fadafruit_circuitpython_jwt/lists"}