Registry / http-networking / akismet

akismet

JSON →
library25.10.1pypypi✓ verified 80d ago

A Python interface to the Akismet spam-filtering service. Current version 25.10.1 requires Python >=3.10 and uses httpx for async HTTP. Releases follow a calendar versioning scheme with monthly updates.

pip install akismet
INSTALL
IMPORT
SIG · AKISMET
A
akismet
http-networkingpythonv25.10.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SyncClient
from akismet import SyncClient
from akismet import Akismet
AsyncClient
from akismet import AsyncClient
CheckResponse
from akismet import CheckResponse

Initialize with API key and blog URL, then call check() to test a comment.

import os from akismet import Akismet api_key = os.environ.get('AKISMET_API_KEY', '') blog_url = 'https://your-blog.example.com' akismet = Akismet(api_key=api_key, blog_url=blog_url) # Check comment is_spam = akismet.check( user_ip='127.0.0.1', user_agent='Mozilla/5.0', comment_author='viagra-test', comment_content='Spam message here' ) print(f'Spam: {is_spam}')
Debug
Known issues
breakingAkismet v25 drops support for Python <3.10. Upgrade Python or pin to older version (e.g., akismet==24.12.1).
fix
Use Python 3.10+ or pip install 'akismet<25'
affects: >=25.0.0
breakingThe synchronous client is now async-free but uses httpx under the hood. If you were using the old 'requests'-based interface, you must update imports and calls.
fix
Replace 'from akismet import AkismetClient' with 'from akismet import Akismet' and ensure httpx is installed.
affects: >=25.0.0
gotchaThe check() method requires user_ip and user_agent to be provided; omitting them will raise a ValueError.
fix
Always pass user_ip and user_agent to check().
affects: all
deprecatedThe old synchronous API using requests library is deprecated since v25. Use the new httpx-based client.
fix
Switch to the new Akismet class. See quickstart.
affects: >=25.0.0
Upgrade
Version history
25.10.1latest on PyPI · released Oct 21, 2025
Audit
Dependencies
httpxrequiredHTTP client for API calls
Agent activity
44 hits · last 30 days
node
38
OpenAI (training)
1
Resources
akismet — pip install akismet · libregistry