Skip to Content
Hands-On RESTful Python Web Services - Second Edition
book

Hands-On RESTful Python Web Services - Second Edition

by Gastón C. Hillar
December 2018
Intermediate to advanced
500 pages
12h 33m
English
Packt Publishing
Content preview from Hands-On RESTful Python Web Services - Second Edition

Configuring throttling policies

We will use a combination of the three throttling classes to achieve our previously explained goals. Make sure you quit the Django development server. Remember that you just need to press Ctrl + C in the Terminal or Command Prompt window in which it is running.

Open the settings.py file in the games_service/games_service folder. Add the following highlighted lines after the first line that declares the dictionary named REST_FRAMEWORK to add the new 'DEFAULT_THROTTLE_CLASSES' and 'DEFAULT_THROTTLE_RATES' setting keys. Don't remove the lines that will appear after the new highlighted lines. We don't show them to avoid repeating code. The code file for the sample is included in the restful_python_2_08_02 folder, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building RESTful Python Web Services

Building RESTful Python Web Services

Gastón C. Hillar
Python Command Line Tools

Python Command Line Tools

Alfredo Deza, Noah Gift

Publisher Resources

ISBN: 9781789532227Supplemental Content