Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Django REST Framework's Request.data #302

Closed
wants to merge 3 commits into from

Conversation

ronanboiteau
Copy link

Support rate limiting on the key data for use with Django REST Framework's Request.data

@muhammedattif
Copy link

I think we need this change as soon as possible, because most of developers use this package with DRF @jsocol

@Tom5421
Copy link

Tom5421 commented Apr 16, 2024

Hey, do we have an ETA on when this will be available?

@Tom5421
Copy link

Tom5421 commented May 19, 2024

Hey @muhammedattif @ronanboiteau would either of you like to fork this repo and add this feature?

It looks like the owner has no intention to merge any of these requests.

I would do it myself, but I am not that confident with Git.

@ronanboiteau
Copy link
Author

ronanboiteau commented May 19, 2024

UPDATE: Fork published to PyPi: djangorestframework-ratelimit

Original comment:


Hey @muhammedattif @ronanboiteau would either of you like to fork this repo and add this feature?

It looks like the owner has no intention to merge any of these requests.

I would do it myself, but I am not that confident with Git.

Hey @Tom5421!

As a temporary solution you could use the branch v4.1.0-with-drf-support on @guestready's fork. It's basically the changes from this pull request on a branch with no other commits beyond the tag v4.1.0. From our requirements.txt:

git+https://github.com/guestready/django-ratelimit.git@v4.1.0-with-drf-support#egg=django-ratelimit

As a more permanent solution we could publish the fork to PyPi as something like djangorestframework-ratelimit, if @jsocol doesn't think we should merge this into the original package.

@Tom5421
Copy link

Tom5421 commented May 25, 2024

Thanks for that @ronanboiteau.

I agree, a more permeant solution would be great.

@ronanboiteau
Copy link
Author

Hey @Tom5421 @muhammedattif!

I created the fork djangorestframework-ratelimit and published v1.0.0 to PyPi: https://pypi.org/project/djangorestframework-ratelimit/

It's based on django-ratelimit v4.1.0 and it contains the changes suggested in this pull request + the changes from #301 + various changes related to the package management / documentation. You can check the exact diff here.

@Tom5421
Copy link

Tom5421 commented Jun 4, 2024

Perfect, thank you for doing this!

@ronanboiteau
Copy link
Author

Moved to fork djangorestframework-ratelimit

Can be installed from PyPi: https://pypi.org/project/djangorestframework-ratelimit/

@DmytroLitvinov
Copy link

Maybe we can add support in the package like checking if djangorestframework is installed, then we add support for data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants