semvec/pypi-packages huggingface dataset:
redis-rate-limiter 0.2.0
A Redis based rate limiter implementation for Python
License: MIT
Requires Python: >=3.8,<4.0

# redis-rate-limiter

[![CI](https://github.com/duyixian1234/redis-rate-limiter/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/duyixian1234/redis-rate-limiter/actions/workflows/CI.yml)

## Install

```bash
pip install -U redis-rate-limiter
```

## Use

```python
from redis_rate_limiter.config import basic_config
from redis_rate_limiter.rate_limiter import RateLimiter

basic_config(redis_url='redis://localhost:6379/0')

@RateLimiter(10, period=1)
def greet():
    print('Hello')

for _ in range(100):
    greet()

# Raise RateLimitExceeded after print('Hello') 10 times
```
flake8-for-pycharm 0.4.1
Add flake8 support to pycharm. See README for how to use.
License: MIT
Requires Python: >=3.4

Flake8-For-Pycharm
==================

This is a plugin for Flake8 that will emulate pylint json output.

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

.. code-block:: bash

    pip install flake8-for-pycharm

flake8 will be automaitcally installed in the same enviroment.
To validate installation run `flake8_pycharm.py --help-msg=E1101`.
Output should look like that:

.. code-block::

    :no-member (E1101): *%s %r has no %r member%s*
    Used when a variable is accessed for an unexistent member. This message
    belongs to the typecheck checker.

pylint will also be installed because pycharm plugin refuses to work if it's not installed.

Usage
-----
1. Locate the file `flake8_pycharm.py` in your python environment (in linux use command `which flake8_pycharm.py`)
2. In Pycharm go to File -> Settings -> Pylint (If you can't find it, go to Settings -> Plugins and install pylint plugin)
3. In "Path to Pylint executable", provide path to "flake8_pycharm.py" script
4. [ *Optional* ] In path to pylintrc, provide path to your flake8 configuration file
5. Do not put anything in the "Arguments" field or script won't work.
6. This is it, youa re basically done.

Pylint support
--------------
If you want support for both pylint and flake8, you'll need to add `--with-pylint` parameter.
In PyCharm, add this value in the `Arguments` field in pylint settings page.

How does it work?
-----------------

Initially Pycharm call pylint with the following arguments

.. code-block:: bash

    pylint --help-msg=E1101

Once this command has succeeded, it assumes that pylint is installed and starts using it with command like that.

.. code-block:: bash

    pylint --rcfile=pylintrc -f json my_file.py

The `flake8_pycharm.py` script understand those pylint arguments,
query flake8 accordingly and return result in same format that pylint produces.

Troubleshooting
---------------

If you did everything correctly but pycharm kept complaining about pylint being not installed, you might have to install it anyway.
It's a bug reported by a colleague but I wasn't able to reproduce it locallay.

If you received errors from pycharm, you can try to run the command manually to see if it's producing errors.

.. code-block:: bash

    flake8_pycharm.py --rcfile=<your flake8 configuration> -f json my_file.py