Skip to main content

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, use pipx install sitrtech instead.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sitrtech-1.2.3.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sitrtech-1.2.3-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file sitrtech-1.2.3.tar.gz.

File metadata

  • Download URL: sitrtech-1.2.3.tar.gz
  • Upload date:
  • Size: 32.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sitrtech-1.2.3.tar.gz
Algorithm Hash digest
SHA256 35f49bea1c4b19f3c619242ccfe5f86ac1e9cb2668c20ce68f7a963000f3c324
MD5 32173ac918407489ed6b6058fca46ffb
BLAKE2b-256 2880ae11249f324a3fab215f09ceb9a4eb3b2136fe66c8d3711ee61d10fab99d

See more details on using hashes here.

File details

Details for the file sitrtech-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: sitrtech-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sitrtech-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e1ad17dce22f456860bf0a9070d4419812a838de7ae14f42f5e9c8acb45cda86
MD5 bfa1f2ad675f9656b8cab6ac15287802
BLAKE2b-256 43cd0be8dcb2d34bd589d5c635cb29cd610a47c307f66f5964ef0c952f5a044f

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.0

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.5

2 files

1.2.4

2 files

This release

1.2.3 This release

2 files

1.2.0

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page