Share variables between python & php -


i have script in python receiving continuously data sensors.

i need publish last data @ request on webpage using php.

apache, php , python on same linux install (actually on raspberry).

i'm not interested in storing previous data , i'm bit concerned data corruption on writing on sd. prefer reduce complexity , increase speed refresh (avoid sql).

could text file written in ramfs / tmpfs solve problem? or there method share memory memcache share global variables?

enter image description here

any practical example or howto well-accepted.

you can use interoperable format json or msgpack. whenever generate data in python, add caching layer memcache/redis using json format ( , preferably gzip compressed version), php script can unserialize json data , display in app.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -