Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 21, 2018 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/43cb021119ef475353bfe4c106c1af28 to your computer and use it in GitHub Desktop.
Save parzibyte/43cb021119ef475353bfe4c106c1af28 to your computer and use it in GitHub Desktop.
Hola mundo con api de wp y python
from wordpress_xmlrpc import Client
from wordpress_xmlrpc.methods.users import GetUserInfo
usuario = "tu_usuario"
contraseña = "tu_contraseña"
sitio = "tusitiodewordpress.com/xmlrpc.php" #Recuerda que debes llamar al archivo xmlrpc.php
cliente = Client(sitio, usuario, contraseña)
datos_usuario = cliente.call(GetUserInfo())
print("Tu nombre de usuario es {}".format(datos_usuario))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment