Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

This page's audience our own tag's counts — open to see them
–Visits
–Page views
–Clicks to vendors
–Time on page
–Reading now
Clicks to vendors, by tool
  • –
Top countries
  • –
Devices
  • –

– · visits, page views and clicks counted by our own tag, which counts more than our checked analytics; every figure rounded down · how we count

pytm

Free#21 of 24 in Threat Modeling Software

pytm: A free, code-first framework for generating models, diagrams, reports, and findings. Ranked #21 of 24 in Threat Modeling Software by our editors (7.3/10); pricing: Open source; best for developers who prefer code-defined threat models.

7.3/10Editor score
pytm7.3 Visit OWASP pytm

At a glance

  • Editor score
    7.3 / 10
  • Pricing
    Open source
  • Best for
    Developers who prefer code-defined threat models
  • Paid from
    Free
  • Facts checked
    22 Sep 2026
pytm screenshot
  • Where it wins

    • Defines threat models in Python for development-focused workflows
    • Generates data-flow diagrams, sequence diagrams, reports, and findings
    • Supports custom threats, rules, templates, and JSON exchange
  • Where it doesn't

    • Self-hosted deployment requires teams to manage the local environment
    • Does not provide verified collaboration or attack-path analysis
    • Broader integrations are limited compared with wider platform offerings

Our verdict on pytm

pytm is an open-source threat-modeling framework from OWASP for developers and security practitioners who want to define system architecture in Python. Instead of working through a hosted visual workspace, users describe model elements and properties in code, then generate data-flow diagrams, sequence diagrams, reports, and threats relevant to the modeled system. It runs on Windows, macOS, and Linux, making it a fit for teams that want threat modeling close to development workflows and source-controlled artifacts.

The main strength is depth within a code-defined approach. pytm can automatically generate threats and findings, produce risk-colored diagrams, and use templates for threat-model reports. Custom threat files and threat rules allow teams to shape the output around their own modeling needs, while JSON import and export supports exchange between workflows. These capabilities make pytm more adaptable than a fixed checklist, particularly for developers who prefer repeatable definitions and generated documentation over manual diagram editing.

Its trade-off is focus. pytm is distributed as open-source code and uses self-hosted deployment, so it is better suited to teams comfortable managing a local or containerized runtime than to organizations seeking a hosted collaborative application. The published feature set also does not include verified collaboration, attack-path analysis, or broad integrations. Choose pytm when Python-defined models, generated diagrams, custom rules, and local control are priorities. Consider an alternative when nontechnical stakeholders need built-in collaboration or when attack-path analysis and a wider integration ecosystem are central requirements.

Your product? Our editors can test pytm in depth and publish a review, labelled as paid · from $149/mo →

pytm pricing

Plans Open sourceFree Free to use — no paid tier required for the core job.
See plans on github.com

pytm fact sheet

Free planNot verified
Paid fromFree
Project limitNot verified
Attack-path analysisNot verified
Risk prioritizationYes
Collaborative reviewNot verified
Templates and frameworksYes
Modeling methodsCustom
DeploymentSelf_hosted
DeploymentSelf-hosted
PlatformsWindows, macOS, Linux
SupportCommunity, Docs
Built forSolo, Small business (editorial estimate)
PricingOpen source
Websitegithub.com
Facts checked22 Sep 2026

Alternatives to pytm

See all pytm alternatives →

Used pytm? Be the first to review it

The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used pytm for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.

Write a reviewTwo minutes · verified accounts only · read by an editor before it appears

Reviews come only from verified accounts. Sign in or create an account first — your e-mail is never shown.

Your rating

0 characters · at least 80, up to 3,000

Posted from your verified account. Reviews appear after an editor reads them, usually within two working days.

Featured on iTechGuides

Featured on iTechGuides — pytm 7.3/10

pytm is listed in our Threat Modeling Software directory. Add the badge to your site — it links back to this page.

<a href="https://www.itechguides.com/products/pytm/"><img src="https://www.itechguides.com/best/badge/pytm.svg" alt="Featured on iTechGuides" width="230" height="46"></a>

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.

Last updated · How we research and update