Skip to content

Commit 13fc47a

Browse files
author
Michael Davis
committed
Update README
1 parent a6fd173 commit 13fc47a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,27 @@ This is a JOSE implementation that is fully compatible with Google App Engine
2323
which requires the use of the PyCrypto library.
2424

2525

26+
Installation
27+
------------
28+
29+
::
30+
31+
$ pip install python-jose
32+
33+
34+
Usage
35+
-----
36+
37+
.. code-block:: python
38+
39+
>>> from jose import jwt
40+
>>> token = jwt.encode({'key': 'value'}, 'secret', algorithm='HS256')
41+
u'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ2YWx1ZSJ9.FG-8UppwHaFp1LgRYQQeS6EDQF7_6-bMFegNucHjmWg'
42+
43+
>>> jwt.decode(token, 'secret', algorithms=['HS256'])
44+
{u'key': u'value'}
45+
46+
2647
Thanks
2748
------
2849

0 commit comments

Comments
 (0)