SitrTech — Python Code Encryption CLI
Protect Odoo, Django, Flask, FastAPI and Tornado projects with AES-256 encryption, licensing controls, and anti-reverse-engineering in one command.
Quick start
# Recommended for CLI tools (no venv needed)
pipx install sitrtech
# Or with pip
pip install sitrtech
Get your API secret key from sitrtech.com/api-keys, then:
# Encrypt an Odoo addon
sitr encrypt my_module.zip --framework odoo --secret sk-...
# Encrypt a Django project
sitr encrypt my_project.zip --framework django --secret sk-...
# Check your token balance
sitr balance --secret sk-...
Installation
# pipx — best for CLI tools, works on Ubuntu/Debian/macOS without issues
pipx install sitrtech
pipx upgrade sitrtech # upgrade later
# pip — standard Python package manager
pip install sitrtech # latest stable
pip install --upgrade sitrtech # upgrade
pip install sitrtech==1.0.1 # pin a specific version
Ubuntu / Debian users: If you see
externally-managed-environment, usepipx install sitrtechinstead.
Python 3.8 → 3.14 · Windows, macOS, Linux
Usage
sitr encrypt
sitr encrypt <FILE.zip> [OPTIONS]
Arguments:
FILE.zip Zipped project folder
Options:
-f, --framework TEXT odoo | django | flask | fastapi | tornado [default: odoo]
-v, --version TEXT Framework version (e.g. 16.0 for Odoo)
-e, --expiry DATE Expiry: 2026-12-31 or 2026-12-31T23:59:00Z
-n, --network CIDR Allowed IP/CIDR (repeatable)
-o, --output PATH Output file (default: <input>_encrypted.zip)
-s, --secret TEXT API secret key [env: SITR_SECRET]
-b, --base URL API base URL [env: SITR_BASE]
Examples
# Odoo (default)
sitr encrypt my_addon.zip --framework odoo
# Django with expiry and IP restriction
sitr encrypt backend.zip --framework django \
--expiry 2026-12-31 \
--network 10.0.0.0/24
# FastAPI project
sitr encrypt api.zip --framework fastapi
# Flask with multiple IP ranges
sitr encrypt webapp.zip --framework flask \
--network 192.168.1.10 \
--network 10.0.0.0/8
sitr balance
sitr balance --secret sk-...
# ┌─────────────────────────────┐
# │ SitrTech Account │
# │ Tokens │ 5,000 │
# │ Plan │ Pro │
# │ Rate │ 0.3 tokens/line │
# └─────────────────────────────┘
sitr info
sitr info
# Shows all supported frameworks and required project structure
Environment variables
| Variable | Description |
|---|---|
SITR_SECRET |
API secret key (avoids typing it) |
SITR_BASE |
Override API URL (default: sitrtech.com) |
export SITR_SECRET=sk-your-key-here
sitr encrypt my_project.zip --framework django
Project structure requirements
| Framework | Required entry-point file |
|---|---|
| Odoo | __manifest__.py |
| Django | manage.py |
| Flask | app.py or wsgi.py |
| FastAPI | main.py or asgi.py |
| Tornado | main.py or server.py |
Always zip the root folder — not its contents:
# Correct ✓
zip -r my_addon.zip my_addon/
# Wrong ✗
cd my_addon && zip -r ../my_addon.zip .
Local mode — your source never leaves your machine
Use --local to encrypt on your own server. Only line counts and license metadata
are sent to the platform (to authorize and meter tokens); your source code is never
uploaded. The master secret is never present in this package.
sitr encrypt my_addon.zip --framework odoo --local
Flow: authorize (reserve tokens + receive a signed one-time key) → encrypt locally →
commit (charge the actual line count). No valid authorization → nothing is encrypted.
Binding / protection options
Lock encrypted code to a place, machine, or time window. Options combine with AND
(every rule present must pass at runtime). Available in both normal and --local modes:
| Option | Binds the code to… |
|---|---|
-e, --expiry DATE |
stops working after this date/time |
--start DATE |
not valid before this date/time |
-n, --network CIDR |
allowed IPs / CIDR / ranges (repeatable) |
--mac MAC |
allowed MAC address(es) (repeatable) |
--machine-id ID |
machine fingerprint (Linux machine-id / Windows MachineGuid) |
--hostname HOST |
allowed hostname(s) |
--disk-serial SERIAL |
allowed disk/volume serial(s) |
--odoo-db DB |
allowed Odoo database name(s) |
--domain DOMAIN |
allowed domain / base URL(s) |
# Bind to one machine + network, expiring end of 2026
sitr encrypt hr_module.zip -f odoo --local \
--expiry 2026-12-31 \
--network 10.0.0.0/24 \
--mac 00:1a:2b:3c:4d:5e \
--machine-id $(cat /etc/machine-id)
Runtime performance is unaffected: files are decrypted once at import time and then run at native Python speed — there is no per-call cost.
Automated encryption for many modules — sitr encrypt-dir
Built for teams that ship dozens of modules across many projects, daily. No
manual zipping, source never leaves your machine, and only changed modules are
re-encrypted on each run (state tracked in <output>/.sitr_state.json).
# Encrypt every Odoo module under ./addons — locally, in parallel, incrementally
sitr encrypt-dir ./addons --framework odoo
# With binding + expiry, into a custom output dir
sitr encrypt-dir ./addons -f odoo -o ./dist \
--expiry 2026-12-31 --network 10.0.0.0/24 --mac 00:1a:2b:3c:4d:5e
sitr encrypt-dir ./addons --full # force full re-encryption
| Option | Meaning |
|---|---|
-o, --output DIR |
output directory (default <source>_encrypted) |
-j, --jobs N |
parallel workers (default: CPU count) |
--full |
ignore the incremental state and re-encrypt everything |
| all binding flags | --expiry --start --network --mac --machine-id --hostname --disk-serial --odoo-db --domain |
Why it's fast + secure: one authorization for the whole batch, encryption runs on your machine (only line counts are sent), and a daily run re-encrypts only what changed.
CI/CD integration
GitHub Actions (daily encryption of all modules)
name: Encrypt & deploy addons
on:
schedule: [{ cron: "0 2 * * *" }] # daily at 02:00
workflow_dispatch:
jobs:
encrypt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: "3.12" }
# cache the incremental state so only changed modules re-encrypt
- uses: actions/cache@v4
with: { path: dist/.sitr_state.json, key: sitr-state-${{ github.ref }} }
- run: pip install sitrtech
- name: Encrypt all modules (source never leaves the runner)
env: { SITR_SECRET: ${{ secrets.SITR_SECRET }} }
run: sitr encrypt-dir ./addons -f odoo -o ./dist --expiry 2026-12-31
- name: Deploy encrypted modules
run: rsync -az ./dist/ user@server:/opt/odoo/addons/
GitLab CI
encrypt:
image: python:3.12
cache: { paths: [dist/.sitr_state.json] }
script:
- pip install sitrtech
- sitr encrypt-dir ./addons -f odoo -o ./dist
variables: { SITR_SECRET: $SITR_SECRET }
Docker one-liner
docker run --rm -e SITR_SECRET -v "$PWD/addons:/src:ro" -v "$PWD/dist:/out" \
python:3.12-slim sh -c "pip install -q sitrtech && sitr encrypt-dir /src -f odoo -o /out"
Links
- Documentation: https://sitrtech.com/docs
- API Keys: https://sitrtech.com/api-keys
- Support: support@sitrtech.com
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sitrtech-1.2.4.tar.gz.
File metadata
- Download URL: sitrtech-1.2.4.tar.gz
- Upload date:
- Size: 32.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d43754278f40d41caabf6c4e45aa6c29541859c871db2f5108757c42aef6988
|
|
| MD5 |
990a576cb094cdd24f835107333081a0
|
|
| BLAKE2b-256 |
c46550b12290215ab5bbe8cc5030a20f120f955c5d409bc080d1473142de2149
|
File details
Details for the file sitrtech-1.2.4-py3-none-any.whl.
File metadata
- Download URL: sitrtech-1.2.4-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
394b434e0a461ffa59405f33c151f83899da4b768174eb1661d4b133baf41665
|
|
| MD5 |
40a7f28144be97bdebaa3323daebdc0d
|
|
| BLAKE2b-256 |
36451dec69a4cfb95fb995673a0750399ddca86207bc27129d36eef34b85bbba
|