I use a php library where something similar does not exist for python / django. So I wrote a php script using the library and now I would like to use the resulting data in Django.
I can think of two approaches to get the php data into Django:
Is there a commonly accepted way of doing such things?
If you want to use Django ORM ( means you are using a Django in somewhere in the app), then the approaches you are given is ok and acceptable. But if all you want is an ORM, then why not try a PHP one like this ?
Betterway for two tech
s can communicate is using any IPC mechanisms like Process/TCP/Http direct (or RPC).
or
$command = "python manage.py storedata" // custom manage command
$output = shell_exec($command); // or $output = `python manage.py storedata`
But keeping two codebases, in future will become unmaintainable, so use any PHP native solution.