DEV Community

Keramot UL Islam
Keramot UL Islam

Posted on • Originally published at Medium on

3

Hey, WordPress devs. Try Python

WordPress plus Python

The strongest side of WordPress is The Rest-API. We can fetch WordPress data with any programming language and print it wherever we want.

Calling Rest-API with JavaScript is kind of okay. But Calling Rest-API with Python can be the starting point of the next big thing.

Here are two things about Python:

1) Python is the present trend.

2) Python is a sustainable future.

If you want to make money from product,

you have to go through the trend;

towards the future.

Now let’s see how Python works with WordPress Rest-API…

import requests
from urllib.request import urlopen

endpoint = "https://abmsourav.com/wp-json/wp/v2/posts/"
rqst = requests.get(endpoint)

if rqst.status\_code == 200:
    with urlopen(endpoint) as url:
    data = url.read()

print(data)

You can make a deep analyzation of your e-commerce, blog, business website data with python. Then you can print the output on a web app, website, google sheet… wherever you want.

The world of data analyzation, deep learning are just in front of the door.

Are we ready for it?

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay