Good day
Is there away to comfile my DRF to packaged and install offline?
anyone have a idea? thanks
Good day
Is there away to comfile my DRF to packaged and install offline?
anyone have a idea? thanks
What do you mean “Compile” and “install offline”? You can download the DRF package and install that later without an internet connection (assuming you get all its dependencies too).
You can install a projects dependencies online, and then run it offline without issue.
i want to compile my backend like exe or packaged … not the DRF package…
I’m not sure how well that’ll work, but the most popular way of achieving that is pyinstaller
. Django uses a lot of dynamic imports, which may not play nice with pyinstaller
. You might also need to write a small wrapper script to start gunicorn
, and point pyinstaller
at that.
The “bin/gunicorn” program is a python script. It can be copied into your project and run directly. (How well that works with pyinstaller is a completely different question. That is likely to take some work.)
It is, true. Although it depends how it’s being configured. If using the default config file location, it might “just work”. Otherwise, wrapping it in a script to pre-configure it might be easier.
thank you… ill try this one.