WolframResearch / WolframWebEngineForPython

Integrates the Wolfram Language seamlessly with Python AIOHTTP
MIT License
91 stars 14 forks source link

Load resources at web engine startup #2

Closed jcromwell closed 4 years ago

jcromwell commented 4 years ago

I'm enjoying using the Wolfram Web Engine. I'd like to load some resources (specifically a classifier object) from Wolfram Cloud into memory when the server starts up, rather than at the time of an API call. Is there a way to specify this into an "initialization" file that is consumed at server startup? Many thanks! John

arnoudbuzing commented 4 years ago

You mean something like this: https://reference.wolfram.com/language/ref/file/init.m.html ?

jcromwell commented 4 years ago

This is terrific. I wasn't aware of the flexible init options. Many thanks for this suggestion! I'll give it a try. John

riccardodivirgilio commented 4 years ago

Yes, for this project we don't rely on anything custom. Let me know if you need anything else.

Riccardo.

arnoudbuzing commented 4 years ago

Additionally there are a number of Wolfram Language functions which help with persistence and initialization of values:

Good luck with your project!