We are working on a platform that gets news from various sources and runs some NLP analysis on it.
We have the backbone of the backend down, we're now trying to output our results on a feed. Since articles are gathered using our automated engine, WP posts containing the articles and NLP analysis will be generated programmatically, not manually by users. We picked Wordpress as our CMS.
So far, I've had success with creating posts using this library (https://pypi.org/project/python-wordpress-xmlrpc/), which I could use to post data to Wordpress at the end of my data pipeline.
client = Client(url, username, password)
post = WordPressPost()
post.title = 'Elon Musk discovers a new element'
post.content = 'Lets look at how Elon Musk is actually Tony Stark.'
post.terms_names = {
'post_tag': ['AI', 'musk'],
'category': ['Technology', 'Chemistry']
post.post_status = 'publish'
post.id = client.call(posts.NewPost(post))
I read however that XML-RPC was outdated, and may lead to issues down the line. In my research, I found this also (https://pypi.org/project/wordpress-api/), but it's much less documented.
What are some options here? What else can I use to post data from Python to WP databases.