Skip to main content

A Python package for TRIZ (Theory of Inventive Problem Solving) tools and techniques.

Project description

PyTRIZ

A Python library for applying TRIZ (Theory of Inventive Problem Solving) — look up parameters, principles, and contradiction matrix results, or use LLM-powered agents to analyze engineering trade-offs.

Installation

pip install pytriz

Requires Python 3.12+. LLM features require an API key for your chosen provider (OpenAI, Anthropic, Mistral, or OpenRouter).

Quick start

Data lookups (no API key needed)

from pytriz import contradictions

# Find TRIZ principles for a contradiction
principles = contradictions.get_principles_from_matrix(
    improving_parameters=[1, 3],
    preserving_parameters=[17, 23],
)

# Search parameters and principles by description
params = contradictions.search_parameters("improves durability", top_k=5)
principles = contradictions.search_principles("segmentation", top_k=5)

LLM-powered analysis

import asyncio
from pytriz import contradictions

result = asyncio.run(
    contradictions.analyze_contradiction(
        "Increasing blade thickness improves durability but increases weight.",
        provider="openai",   # or "anthropic", "mistral", "openrouter"
        model="gpt-4.1",
    )
)

print(result.contradiction)
print(result.improving_parameter)
print(result.preserving_parameter)

Set your API key in a .env file or as an environment variable:

OPENAI_API_KEY=your-key-here

Project details


Download files

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

Source Distribution

pytriz-0.1.0.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

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

pytriz-0.1.0-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file pytriz-0.1.0.tar.gz.

File metadata

  • Download URL: pytriz-0.1.0.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pytriz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5ec26f67ce44be9e8747eb2580495fa1daa834db005f5a29f5544f817d200069
MD5 1e87b08801c738edc369c28206d15fd1
BLAKE2b-256 33458e8389aee656f10ca2ed7d1ca27b38a7633aaa0d6e87bf217f4872080175

See more details on using hashes here.

File details

Details for the file pytriz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pytriz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pytriz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b516ddbebf4b4652a309e76967bf7a0bea2b9f0dfb95bd868503be138cc2415
MD5 b4c260402fc6a44415a8c72ecf0baa38
BLAKE2b-256 13b2ac4d2fb82d00673c6a8d2df8ee5dba2bb5904ddca26b3ead2b4af0a5c203

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page