{"id":13397003,"url":"https://github.com/mpdavis/python-jose","last_synced_at":"2025-05-14T21:02:05.821Z","repository":{"id":30724872,"uuid":"34281115","full_name":"mpdavis/python-jose","owner":"mpdavis","description":"A JOSE implementation in Python","archived":false,"fork":false,"pushed_at":"2025-03-21T13:03:20.000Z","size":630,"stargazers_count":1612,"open_issues_count":106,"forks_count":244,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-05-07T19:47:42.764Z","etag":null,"topics":["jose","jwt","python"],"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/mpdavis.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2015-04-20T19:19:35.000Z","updated_at":"2025-05-06T14:53:26.000Z","dependencies_parsed_at":"2025-04-28T10:47:15.174Z","dependency_job_id":null,"html_url":"https://github.com/mpdavis/python-jose","commit_stats":{"total_commits":538,"total_committers":49,"mean_commits":"10.979591836734693","dds":"0.47211895910780666","last_synced_commit":"96474ecfb6ad3ce16f41b0814ab5126d58725e2a"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpdavis%2Fpython-jose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpdavis%2Fpython-jose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpdavis%2Fpython-jose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpdavis%2Fpython-jose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpdavis","download_url":"https://codeload.github.com/mpdavis/python-jose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672748,"owners_count":21945483,"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":["jose","jwt","python"],"created_at":"2024-07-30T18:01:09.125Z","updated_at":"2025-05-14T21:02:05.238Z","avatar_url":"https://github.com/mpdavis.png","language":"Python","readme":"python-jose\n===========\n\nA JOSE implementation in Python\n\n|pypi| |Github Actions CI Status| |Coverage Status| |Docs| |style|\n\nDocs are available on ReadTheDocs_.\n\nThe JavaScript Object Signing and Encryption (JOSE) technologies - JSON\nWeb Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and\nJSON Web Algorithms (JWA) - collectively can be used to encrypt and/or\nsign content using a variety of algorithms. While the full set of\npermutations is extremely large, and might be daunting to some, it is\nexpected that most applications will only use a small set of algorithms\nto meet their needs.\n\n\nInstallation\n------------\n\n::\n\n    $ pip install python-jose[cryptography]\n\n\nCryptographic Backends\n----------------------\n\nAs of 3.3.0, python-jose implements three different cryptographic backends.\nThe backend must be selected as an extra when installing python-jose.\nIf you do not select a backend, the native-python backend will be installed.\n\nUnless otherwise noted, all backends support all operations.\n\nDue to complexities with setuptools, the native-python backend is always installed,\neven if you select a different backend on install.\nWe recommend that you remove unnecessary dependencies in production.\n\n#. cryptography\n\n   * This backend uses `pyca/cryptography`_ for all cryptographic operations.\n     This is the recommended backend and is selected over all other backends if any others are present.\n   * Installation: ``pip install python-jose[cryptography]``\n   * Unused dependencies:\n\n     * ``rsa``\n     * ``ecdsa``\n     * ``pyasn1``\n\n#. pycryptodome\n\n   * This backend uses `pycryptodome`_ for all cryptographic operations.\n   * Installation: ``pip install python-jose[pycryptodome]``\n   * Unused dependencies:\n\n     * ``rsa``\n\n#. native-python\n\n   * This backend uses `python-rsa`_ and `python-ecdsa`_ for all cryptographic operations.\n     This backend is always installed but any other backend will take precedence if one is installed.\n   * Installation: ``pip install python-jose``\n\n   .. note::\n\n       The native-python backend cannot process certificates.\n\nUsage\n-----\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from jose import jwt\n    \u003e\u003e\u003e token = jwt.encode({'key': 'value'}, 'secret', algorithm='HS256')\n    u'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ2YWx1ZSJ9.FG-8UppwHaFp1LgRYQQeS6EDQF7_6-bMFegNucHjmWg'\n\n    \u003e\u003e\u003e jwt.decode(token, 'secret', algorithms=['HS256'])\n    {u'key': u'value'}\n\n\nThanks\n------\n\nThis library was originally based heavily on the work of the folks over at PyJWT_.\n\n.. |pypi| image:: https://img.shields.io/pypi/v/python-jose?style=flat-square\n   :target: https://pypi.org/project/python-jose/\n   :alt: PyPI\n.. |Github Actions CI Status| image:: https://github.com/mpdavis/python-jose/workflows/main/badge.svg?branch=master\n   :target: https://github.com/mpdavis/python-jose/actions?workflow=main\n   :alt: Github Actions CI Status\n.. |Coverage Status| image:: http://codecov.io/github/mpdavis/python-jose/coverage.svg?branch=master\n   :target: http://codecov.io/github/mpdavis/python-jose?branch=master\n.. |Docs| image:: https://readthedocs.org/projects/python-jose/badge/\n   :target: https://python-jose.readthedocs.org/en/latest/\n.. _ReadTheDocs: https://python-jose.readthedocs.org/en/latest/\n.. _PyJWT: https://github.com/jpadilla/pyjwt\n.. _pyca/cryptography: http://cryptography.io/\n.. _pycryptodome: https://pycryptodome.readthedocs.io/en/latest/\n.. _pycrypto: https://www.dlitz.net/software/pycrypto/\n.. _python-ecdsa: https://github.com/warner/python-ecdsa\n.. _python-rsa: https://stuvel.eu/rsa\n.. |style| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://github.com/psf/black\n   :alt: Code style: black\n","funding_links":[],"categories":["Authentication","Python","Authorization \u0026 Authentication","验证","语言资源库"],"sub_categories":["python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpdavis%2Fpython-jose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpdavis%2Fpython-jose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpdavis%2Fpython-jose/lists"}