Other code and data¶
The following additional items are part of the publicly-exported API of this module:
A
TypedDictrepresenting the optional keyword arguments accepted by the comment-check, submit-ham, and submit-spam Akismet API operations.The names and types of these optional arguments are:
blog_charset:strblog_lang:strcomment_author:strcomment_author_email:strcomment_author_url:strcomment_content:strcomment_context:strcomment_date_gmt:strcomment_post_modified_gmt:strcomment_type:strhoneypot_field_name:stris_test:boolpermalink:strrecheck_reason:strreferrer:struser_agent:struser_role:str
For the meanings of these arguments, see the Akismet web service documentation.
Possible response values from an Akismet content check, including the possibility of the “discard” response, modeled as an
enum.IntEnum. SeeSyncClient.comment_check()andAsyncClient.comment_check()for details.Has the following members:
Indicates Akismet classified a piece of content as ham (i.e., not spam). Has integer value
0.
Indicates Akismet classified a piece of content as spam. Has integer value
1.
Indicates Akismet classified a piece of content as “blatant” spam, suggesting that it be discarded without further review. Has integer value
2.
A
namedtuple()representing Akismet configuration, consisting of a key and a URL.You only need to use this if you’re manually configuring an Akismet API client rather than letting the configuration be read automatically from environment variables.
A
strcontaining the defaultUser-Agentheader value which will be sent with all requests to the Akismet web service. This is automatically derived from theakismetmodule version and Python version in use.You generally will not need to use this value, but if you are passing a custom HTTP client to either
SyncClientorAsyncClient, it can be useful to set this as the client’sUser-Agentheader, for consistency.