semvec/pypi-packages huggingface dataset:
aiohttp-jwt 0.6.1
aiohttp middleware for working with JWT
License: MIT
Keywords: asyncio,aiohttp,jwt

## aiohttp-jwt 
[![Downloads](https://pepy.tech/badge/aiohttp-jwt/month)](https://pepy.tech/project/aiohttp-jwt/month)
[![Build Status](https://travis-ci.org/hzlmn/aiohttp-jwt.svg?branch=master)](https://travis-ci.org/hzlmn/aiohttp-jwt)
[![codecov](https://codecov.io/gh/hzlmn/aiohttp-jwt/branch/master/graph/badge.svg)](https://codecov.io/gh/hzlmn/aiohttp-jwt)

The library provides `aiohttp` middleware and helper utils for working with JSON web tokens.

  * Works on Python3.5+
  * MIT License
  * Latest docs [TBD]()
  * Contributions are highly welcome!


## Requirements
 - [Aiohttp >= 2.3.5](https://github.com/aio-libs/aiohttp)
 - [PyJWT](https://github.com/jpadilla/pyjwt)


## Install
```bash
$ pip install aiohttp_jwt
```

## Simple Usage
`server.py`
```python
import jwt
from aiohttp import web

from aiohttp_jwt import JWTMiddleware

sharable_secret = 'secret'


async def protected_handler(request):
    return web.json_response({'user': request['payload']})


app = web.Application(
    middlewares=[
        JWTMiddleware(sharable_secret),
    ]
)

app.router.add_get('/protected', protected_handler)

if __name__ == '__main__':
    web.run_app(app)

```

`client.py`
```python
import asyncio

import aiohttp
import async_timeout


async def fetch(session, url, headers=None):
    async with async_timeout.timeout(10):
        async with session.get(url, headers=headers) as response:
            return await response.json()


async def main():
    async with aiohttp.ClientSession() as session:
        response = await fetch(
            session,
            'http://localhost:8080/protected',
            headers={'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRlc3QifQ.pyNsXX_vNsUvdt6xu13F1Gs1zGELT4Va8a38eG5svBA'})
        print(response)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

```

## Examples
- [Basic Example](/example/basic.py)
- [Permissions control](/example/permissions.py)



## Credits

This module inspired by official [auth0/express-jwt](https://github.com/auth0/express-jwt) middleware and
[express-jwt-permissions](https://github.com/MichielDeMey/express-jwt-permissions) extension.


## Related packages
  For advanced security facilities check [aio-libs/aiohttp_security](https://github.com/aio-libs/aiohttp-security)

### License
MIT License
pylint-requests 0.1.1
A pylint plugin to check for common issues with usage of requests
License: MIT
Requires Python: >=3.6,<4.0
Keywords: pylint,requests,timeout

# pylint-requests

[![pypi](https://badge.fury.io/py/pylint-requests.svg)](https://pypi.org/project/pylint-requests)
[![Python: 3.6+](https://img.shields.io/badge/Python-3.6+-blue.svg)](https://pypi.org/project/pylint-requests)
[![Downloads](https://img.shields.io/pypi/dm/pylint-requests.svg)](https://pypistats.org/packages/pylint-requests)
[![Build Status](https://travis-ci.com/m-burst/pylint-requests.svg?branch=master)](https://travis-ci.com/m-burst/pylint-requests)
[![Code coverage](https://codecov.io/gh/m-burst/pylint-requests/branch/master/graph/badge.svg)](https://codecov.io/gh/m-burst/pylint-requests)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://en.wikipedia.org/wiki/MIT_License)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

## Description

A `pylint` plugin to check for common issues with usage of `requests`.

Currently the following errors are reported:

* `F7801 (requests-not-available)`  
Reported if this plugin failed to import `requests`.
This means that: (a) you are running `pylint` with incorrect `PYTHONPATH`,
(b) you forgot to install `requests`, or (c) you aren't using `requests` and don't
need the plugin.
* `E7801 (request-without-timeout)`  
Reported if a HTTP call (e.g. `requests.get`) without a timeout is detected.

## Installation

    pip install pylint-requests

## Usage

Use pylint's `--load-plugins` option to enable the plugin:

    pylint --load-plugins=pylint_requests <your_code>

## For developers

### Install deps and setup pre-commit hook

    make init

### Run linters, autoformat, tests etc.

    make format lint test

### Bump new version

    make bump_major
    make bump_minor
    make bump_patch

## License

MIT

## Change Log

**Unreleased**

...

**0.1.1 - 2020-05-07**

* fix crash with `AttributeInferenceError` on optional function parameters

**0.1.0 - 2019-04-14**

* initial