r/Python • • Oct 20 '26

Discussion Compiling django with Nuitka or Cython ?

Hey, I am working on django development
my client would prefer to slef host the app instead of hosting it on our servers, we dont mind however we would like to make sure we give them a build rather than plain code so we dont expose our code base

I came across compiling with Cython or Nuitka, I cant decide which to use?

Second ask, I heard that I should not compile my whole django apps and rather than that I better do that carefully not to mess up our different imports, how correct is that ?

Thanks in advance

12 Upvotes

19 comments sorted by

View all comments

Show parent comment

8

u/the_hoser Oct 20 '26

Um... you haven't? Really? Binaries are pirated all the time.

Maybe you haven't seen them at work because corporations are usually fairly risk averse when it comes to copyright infringement. Usually, not always.

2

u/PaluMacil Oct 20 '26

Yes, I'm not saying I don't think people pirate binaries. I'm saying average software engineers grab Python code from proprietary files they don't own but they don't try to creak licensing on a binary so often. At least not where I've worked. How many times have you heard someone say something like, "just copy something off the internet"? That's stealing and a license violation 9 times out of 10. But in a work environment, when have you seen a coworker use a cracked Adobe Pro? Even if it's once or twice, I'm guessing you've seen or heard someone Google something and copy paste some Python code many many times.

4

u/the_hoser Oct 20 '26

Corporations using binaries in violation of the license is the core of Oracle's business model with Java.

1

u/PaluMacil Oct 20 '26

If you’re suggesting that is a good business model, then I’m not interested in doing any business with you 😆 there is a good reason why most engineers hate Oracle. Honestly, a lot of what they catch is companies having no honest clue where are things might be installed, and Oracle being able to scan for it better than they have an idea of their own infrastructure

If someone is going to try to reverse engineer your binary, they’re gonna figure it out. Adding things to try to stop that is a cat and mouse game and rarely worth it.

2

u/the_hoser Oct 20 '26

No, of course not. I'm just saying that binary piracy at a corporate level is a lot more common than you'd think.

0

u/_khi4 Oct 20 '26

yeah I know and I know its gonna be easier than before to decrypt or reverse engineer projects, but I just wanna make it bit harder for them and we have a lawyer yes

3

u/the_hoser Oct 20 '26

I say you stand to lose more money on the time and frustration involved in complicating your build pipeline than you stand to save or make "protecting" your code.

1

u/gdchinacat Oct 20 '26

Not to mention the difficulty with supporting it.

1

u/_khi4 Oct 20 '26

uhmm , not sure mate, but will consider your point for sure