Python API - JSON?

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

Python API - JSON?

Post by Linux » Tue Dec 04, 2018 9:26 pm

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: 387
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Python API - JSON?

Post by timurhai » Wed Dec 05, 2018 9:14 am

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 2.3.0 Debian 9, Ubuntu 18.04LTS, MS Windows 7,10 (client only).

Linux
Posts: 10
Joined: Thu Mar 01, 2018 12:29 pm
Location: Germany

Re: Python API - JSON?

Post by Linux » Wed Dec 05, 2018 7:02 pm

Hi Timur,

that helps me.
Thank you very much!

Best regards,
Laurence

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest