This is a simple webAPI for the Riegrova webpage cms
http://www.skolka-riegrova.cz/
It is written in Python.
It is licensed under the MIT license.
It requires the following python modules:
- beautifulsoup4
- MechanicalSoup
install the package with pip:
pip install dg_riegrova_webapi
you need to create a file called dg_riegrova_webapi.config.json
in the same directory as your script.
{
"baseurl": "http://www.skolka-riegrova.cz",
"adminlogin": "/prihlaseni/",
"admindashboard": "/admin/webstructadmin/show/"
}
I suggest you create .env file in the same directory as your script and store your admin credentials there.
ADMIN_USER="username"
ADMIN_PASS="password"
from dg_riegrova_webapi import RiegrovaWebAPI as api
api.init()
api.login(os.getenv('ADMIN_USER'), os.getenv('ADMIN_PASS'))
result = api.example_get_function()
api.example_post_function(data)