Skip to main content

PyN2


PyN2 is a Python library (based on OpenMDAO project), designed to easily create dynamic n-squared (N²) charts. N² charts are essential in systems engineering and project management to visualize and manage complex interactions between components, subsystems, or processes. PyN2 provides an intuitive API to generate customizable N² diagrams.

Features

  • Generate n² charts to visualize component interactions
  • Customizable labels for rows and columns
  • Highlight important relationships and dependencies
  • Export charts in various formats (e.g., SVG, HTML)
  • Easy-to-use API with minimal setup

Use Cases

  • Systems engineering: Interface mapping and interaction management
  • Project management: Task dependencies and relationship tracking
  • Complex system design: Visualizing module communications and dependencies

Installation

pip install pyn2

Dependencies

PyN2 relies on the following dependencies, which are managed through Poetry:

[tool.poetry.dependencies]
python = "^3.12"
openmdao = "^3.34.2"

Usage

Run the following code to generate the gen_diag.html file.

from pyn2.chart import Element, Group, N2

n2 = N2('test_chart')
s_dev = Group('Software_development')
e_analyze = Element('Analyze')
e_code = Element('Code')
e_build = Element('Build')
e_deploy = Element('Deploy')

t_vnv = Group('Software_vnv')
e_review = Element('Review')
e_test = Element('Test')

e_analyze.connect_to(e_code)
e_code.connect_to(e_build)
e_code.connect_to(e_review)
e_review.connect_to(e_analyze)
e_build.connect_to(e_test)
e_test.connect_to(e_deploy)
e_test.connect_to(e_analyze)

s_dev.add_element(e_analyze)
s_dev.add_element(e_code)
s_dev.add_element(e_build)
s_dev.add_element(e_deploy)

t_vnv.add_element(e_review)
t_vnv.add_element(e_test)

n2.add_group(s_dev)
n2.add_group(t_vnv)
n2.generate_report()

And produce the following chart:


Contributing is awesome!

See CONTRIBUTING

Contact

Developed with :heart: by the internet

Mainteiner: Leonardo Mariga

Did you like it? Remember to click on :star2: button.

Download files

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

Source Distribution

pyn2-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

pyn2-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyn2-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pyn2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c876f42fe948fc6f95716526b05d3eae8c1e7b50404b705d80219a7552ee45b4
MD5 5cbf9ddf2a1500730628ceae5d7c5381
BLAKE2b-256 b9e210385cfbc6e981f6cafc29de590f0f25dee1bd21b7b593480b892a60678b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyn2-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pyn2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 445e5312a1658d04198a17b2f0b1d7e9eff4eb828ea89e9532ec56bc65578e7b
MD5 4ac55a7719af30a761de37810d4dca4f
BLAKE2b-256 1f966384776eb4b95014a2fa2cc199c3f8c1f5f1c0786136465221ec43f372f2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

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