Python API - JSON?

General discussions and questions.
Post Reply
Linux
Posts: 17
Joined: Thu Mar 01, 2018 12:29 pm
Location: Germany

Python API - JSON?

Post by Linux »

Hi timur,

is it possible to execute this JSON command via the Python API?

{
"get."
{
"type" : "renders",
"mask": "farmhost.*"
}
}

Or is this only possible via afcmd?

Best regards,
Laurence
User avatar
timurhai
Site Admin
Posts: 921
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Python API - JSON?

Post by timurhai »

By "Python API" we call af.py module.
There is no method to send JSON data in it.
But it uses
https://github.com/CGRU/cgru/blob/maste ... af.py#L692
function
https://github.com/CGRU/cgru/blob/maste ... ork.py#L22
to send JSON data.
You can use it too.
(afnetwork.py can be called undocumented Python API)
Timur Hairulin
CGRU 3.4.0, Ubuntu 24.04, MS Windows 10 (clients only).
Linux
Posts: 17
Joined: Thu Mar 01, 2018 12:29 pm
Location: Germany

Re: Python API - JSON?

Post by Linux »

Hi Timur,

that helps me.
Thank you very much!

Best regards,
Laurence
Post Reply