python-jose


Namepython-jose JSON
Version 3.3.0 PyPI version JSON
download
home_pagehttp://github.com/mpdavis/python-jose
SummaryJOSE implementation in Python
upload_time2021-06-05 03:30:40
maintainer
docs_urlNone
authorMichael Davis
requires_python
licenseMIT
keywords jose jws jwe jwt json web token security signing
VCS
bugtrack_url
requirements pycryptodome rsa ecdsa pyasn1
Travis-CI No Travis.
coveralls test coverage No coveralls.
            python-jose
===========

A JOSE implementation in Python

|pypi| |Github Actions CI Status| |Coverage Status| |Docs| |style|

Docs are available on ReadTheDocs_.

The JavaScript Object Signing and Encryption (JOSE) technologies - JSON
Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and
JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or
sign content using a variety of algorithms. While the full set of
permutations is extremely large, and might be daunting to some, it is
expected that most applications will only use a small set of algorithms
to meet their needs.


Installation
------------

::

    $ pip install python-jose[cryptography]


Cryptographic Backends
----------------------

As of 3.3.0, python-jose implements three different cryptographic backends.
The backend must be selected as an extra when installing python-jose.
If you do not select a backend, the native-python backend will be installed.

Unless otherwise noted, all backends support all operations.

Due to complexities with setuptools, the native-python backend is always installed,
even if you select a different backend on install.
We recommend that you remove unnecessary dependencies in production.

#. cryptography

   * This backend uses `pyca/cryptography`_ for all cryptographic operations.
     This is the recommended backend and is selected over all other backends if any others are present.
   * Installation: ``pip install python-jose[cryptography]``
   * Unused dependencies:

     * ``rsa``
     * ``ecdsa``
     * ``pyasn1``

#. pycryptodome

   * This backend uses `pycryptodome`_ for all cryptographic operations.
   * Installation: ``pip install python-jose[pycryptodome]``
   * Unused dependencies:

     * ``rsa``

#. native-python

   * This backend uses `python-rsa`_ and `python-ecdsa`_ for all cryptographic operations.
     This backend is always installed but any other backend will take precedence if one is installed.
   * Installation: ``pip install python-jose``

   .. note::

       The native-python backend cannot process certificates.

Usage
-----

.. code-block:: python

    >>> from jose import jwt
    >>> token = jwt.encode({'key': 'value'}, 'secret', algorithm='HS256')
    u'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ2YWx1ZSJ9.FG-8UppwHaFp1LgRYQQeS6EDQF7_6-bMFegNucHjmWg'

    >>> jwt.decode(token, 'secret', algorithms=['HS256'])
    {u'key': u'value'}


Thanks
------

This library was originally based heavily on the work of the folks over at PyJWT_.

.. |pypi| image:: https://img.shields.io/pypi/v/python-jose?style=flat-square
   :target: https://pypi.org/project/python-jose/
   :alt: PyPI
.. |Github Actions CI Status| image:: https://github.com/mpdavis/python-jose/workflows/main/badge.svg?branch=master
   :target: https://github.com/mpdavis/python-jose/actions?workflow=main
   :alt: Github Actions CI Status
.. |Coverage Status| image:: http://codecov.io/github/mpdavis/python-jose/coverage.svg?branch=master
   :target: http://codecov.io/github/mpdavis/python-jose?branch=master
.. |Docs| image:: https://readthedocs.org/projects/python-jose/badge/
   :target: https://python-jose.readthedocs.org/en/latest/
.. _ReadTheDocs: https://python-jose.readthedocs.org/en/latest/
.. _PyJWT: https://github.com/jpadilla/pyjwt
.. _pyca/cryptography: http://cryptography.io/
.. _pycryptodome: https://pycryptodome.readthedocs.io/en/latest/
.. _pycrypto: https://www.dlitz.net/software/pycrypto/
.. _python-ecdsa: https://github.com/warner/python-ecdsa
.. _python-rsa: https://stuvel.eu/rsa
.. |style| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black
   :alt: Code style: black



            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/mpdavis/python-jose",
    "name": "python-jose",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "jose jws jwe jwt json web token security signing",
    "author": "Michael Davis",
    "author_email": "mike.philip.davis@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e4/19/b2c86504116dc5f0635d29f802da858404d77d930a25633d2e86a64a35b3/python-jose-3.3.0.tar.gz",
    "platform": "",
    "description": "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    >>> from jose import jwt\n    >>> token = jwt.encode({'key': 'value'}, 'secret', algorithm='HS256')\n    u'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ2YWx1ZSJ9.FG-8UppwHaFp1LgRYQQeS6EDQF7_6-bMFegNucHjmWg'\n\n    >>> 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\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "JOSE implementation in Python",
    "version": "3.3.0",
    "project_urls": {
        "Changelog": "https://github.com/mpdavis/python-jose/blob/master/CHANGELOG.md",
        "Documentation": "https://python-jose.readthedocs.io/en/latest/",
        "Homepage": "http://github.com/mpdavis/python-jose",
        "Source": "https://github.com/mpdavis/python-jose/",
        "Tracker": "https://github.com/mpdavis/python-jose/issues/"
    },
    "split_keywords": [
        "jose",
        "jws",
        "jwe",
        "jwt",
        "json",
        "web",
        "token",
        "security",
        "signing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd2de94b2f7bab6773c70efc70a61d66e312e1febccd9e0db6b9e0adf58cbad1",
                "md5": "ba988940fcc426a9277f55329985f5c7",
                "sha256": "9b1376b023f8b298536eedd47ae1089bcdb848f1535ab30555cd92002d78923a"
            },
            "downloads": -1,
            "filename": "python_jose-3.3.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ba988940fcc426a9277f55329985f5c7",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 33530,
            "upload_time": "2021-06-05T03:30:38",
            "upload_time_iso_8601": "2021-06-05T03:30:38.099013Z",
            "url": "https://files.pythonhosted.org/packages/bd/2d/e94b2f7bab6773c70efc70a61d66e312e1febccd9e0db6b9e0adf58cbad1/python_jose-3.3.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e419b2c86504116dc5f0635d29f802da858404d77d930a25633d2e86a64a35b3",
                "md5": "60aaf59164e95a6ab160305b13a57d9a",
                "sha256": "55779b5e6ad599c6336191246e95eb2293a9ddebd555f796a65f838f07e5d78a"
            },
            "downloads": -1,
            "filename": "python-jose-3.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "60aaf59164e95a6ab160305b13a57d9a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 129068,
            "upload_time": "2021-06-05T03:30:40",
            "upload_time_iso_8601": "2021-06-05T03:30:40.895025Z",
            "url": "https://files.pythonhosted.org/packages/e4/19/b2c86504116dc5f0635d29f802da858404d77d930a25633d2e86a64a35b3/python-jose-3.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-06-05 03:30:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mpdavis",
    "github_project": "python-jose",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pycryptodome",
            "specs": []
        },
        {
            "name": "rsa",
            "specs": []
        },
        {
            "name": "ecdsa",
            "specs": [
                [
                    "!=",
                    "0.15"
                ]
            ]
        },
        {
            "name": "pyasn1",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "python-jose"
}
        
Elapsed time: 0.25206s