Skip to content
← Publications

Navaja Negra

Protecting Python Source Code

Albacete, Spain

Techniques to protect Python source code, from the obvious to the most advanced.

What it’s about

Python code is normally published as plain text. But sometimes the source code needs protecting.

I start with the basics, obfuscation and bytecode. Then packaging and encryption, and I end with compiling a custom, modified Python interpreter. For each approach I give the pros and cons, with real use cases.

Why it’s relevant

There are situations where protecting source code is a must: commercial products, proprietary algorithms, internal tools.

The talk covers all the options, from the simple to the complicated.

The audio on why AI turns dumb

I send one email a day. Everyone who signs up gets, right then, a ten minute audio on what almost nobody knows about ChatGPT and Claude.

Daniel Alfocea