{"id":26707,"library":"akismet","title":"Akismet","description":"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.","status":"active","version":"25.10.1","language":"python","source_language":"en","source_url":"https://github.com/ahupp/akismet","tags":["akismet","spam","api","anti-spam","comment-spam"],"install":[{"cmd":"pip install akismet","lang":"bash","label":"Install latest"}],"dependencies":[{"reason":"HTTP client for API calls","package":"httpx","optional":false}],"imports":[{"note":"Old name 'AkismetClient' was renamed to 'Akismet' in v1.0","wrong":"from akismet import AkismetClient","symbol":"Akismet","correct":"from akismet import Akismet"},{"note":"Async variant","wrong":"","symbol":"AkismetAsync","correct":"from akismet import AkismetAsync"}],"quickstart":{"code":"import os\nfrom akismet import Akismet\n\napi_key = os.environ.get('AKISMET_API_KEY', '')\nblog_url = 'https://your-blog.example.com'\n\nakismet = Akismet(api_key=api_key, blog_url=blog_url)\n\n# Check comment\nis_spam = akismet.check(\n    user_ip='127.0.0.1',\n    user_agent='Mozilla/5.0',\n    comment_author='viagra-test',\n    comment_content='Spam message here'\n)\nprint(f'Spam: {is_spam}')","lang":"python","description":"Initialize with API key and blog URL, then call check() to test a comment."},"warnings":[{"fix":"Use Python 3.10+ or pip install 'akismet<25'","message":"Akismet v25 drops support for Python <3.10. Upgrade Python or pin to older version (e.g., akismet==24.12.1).","severity":"breaking","affected_versions":">=25.0.0"},{"fix":"Replace 'from akismet import AkismetClient' with 'from akismet import Akismet' and ensure httpx is installed.","message":"The 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.","severity":"breaking","affected_versions":">=25.0.0"},{"fix":"Always pass user_ip and user_agent to check().","message":"The check() method requires user_ip and user_agent to be provided; omitting them will raise a ValueError.","severity":"gotcha","affected_versions":"all"},{"fix":"Switch to the new Akismet class. See quickstart.","message":"The old synchronous API using requests library is deprecated since v25. Use the new httpx-based client.","severity":"deprecated","affected_versions":">=25.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install akismet' in the correct Python environment (check Python version >=3.10).","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'akismet'"},{"fix":"Add user_ip='<IP>' to the call, e.g., akismet.check(user_ip='127.0.0.1', ...)","cause":"The check() method needs keyword argument 'user_ip'.","error":"ValueError: user_ip is required"},{"fix":"Use 'from akismet import Akismet' (note: no 'Client').","cause":"The class was renamed; 'AkismetClient' does not exist in akismet v25.","error":"AttributeError: module 'akismet' has no attribute 'AkismetClient'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}