I also use python to process automatic posts to WordPress. from my experience, the Basic-Auth-master plugin must be installed on the wordpress section.
Here's my code example:
def WP_Poster(self, w, u, p, t, c, d):
url = w+'/wp-json/wp/v2/posts/'
aut =...