Observed since 20 Oct, 19:54 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Django app to mitigate ad network ban risk by throttling suspicious ad impressions.
ads_throttle is a Django application that limits how often ads are shown to the same viewer within a configurable time window and allows manual overrides via the Django admin interface.
It is designed to reduce the risk of ad network bans caused by abnormal or suspicious ad impression patterns (for example, bot traffic or third-party abuse).
A viewer fingerprint is computed using:
For each page (or logical page group called a scope), an impression counter is stored in cache.
If the number of impressions exceeds the configured threshold within the time window, ads are temporarily blocked for that viewer.
Ads are automatically unblocked after the configured TTL.
Administrators can force show or force block ads for specific users, IPs, viewer IDs, or page scopes via Django Admin.
Ads are throttled — users and traffic are not blocked.
pip install ads-throttle
Add the app to Django:
# settings.py
INSTALLED_APPS = [
# ...
"ads_throttle",
]
Use this option when ads are rendered on most pages:
TEMPLATES = [
{
"OPTIONS": {
"context_processors": [
# ...
"ads_throttle.context_processors.ads",
],
},
},
]
Run migrations:
python manage.py migrate
Best when ads appear on most pages:
{% if show_ads %}
<!-- ad block -->
{% endif %}
Recommended when ads appear only on some pages:
{% load ads_throttle_tags %}
{% show_ads as show_ads %}
{% if show_ads %}
<!-- ad block -->
{% endif %}
Or:
{% if request|should_show_ads %}
<!-- ad block -->
{% endif %}
When using template tags or filters, the context processor is not required.
from ads_throttle.throttling import should_show_ads
if should_show_ads(request, scope="/landing/"):
...
scope allows multiple URLs (for example, a landing page and its variants) to share the same throttling rules.
Django database (PostgreSQL, MySQL, SQLite for development).
Cache backend supporting add and incr:
It is a preventive throttling mechanism that limits ad impressions before abnormal patterns escalate into enforcement actions.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.3 | 4 Jan 2026 | 1 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Public sponsor counts have not been collected. These signals belong to the repository owner.
github · 1 observations shown. Missing days are unknown.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-21 | 0 | 2026-10-21T18:32:45.7215454Z |
Observed since 20 Oct, 19:54 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d23d6e8434598848728860d2ff7d43d2c43c047a7e938b40bc0806401b4da979