# milekhinav/createmodifyusers architecture

> Architecture diagram of the GitHub repository milekhinav/createmodifyusers, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/milekhinav/createmodifyusers
- Repository: https://github.com/milekhinav/createmodifyusers

## Overview

This is a command-line Yandex 360 organization-management tool. An operator selects a task, the script reads and validates CSV input, then creates or updates directory records, or runs searches, exports, department operations, and shared-mailbox imports. Password generation and validation, email notifications, and dry-run behavior support those workflows. The sampled source is partial and concentrated in one large file; the README documents additional capabilities, so subsystem boundaries below are conceptual rather than separate modules. Arrows reflect documented behavior, not inspected implementations for every operation.

Main entry points: [`add_users.py`](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py) (Create users), [`users.csv`](https://github.com/milekhinav/createmodifyusers/blob/main/users.csv) (User CSV), [`search_aliases.txt`](https://github.com/milekhinav/createmodifyusers/blob/main/search_aliases.txt) (Search aliases), [`shared.csv`](https://github.com/milekhinav/createmodifyusers/blob/main/shared.csv) (Mailbox CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["CLI and input"]
  node_menu["Task menu<br/>[add_users.py]"]
  node_user_csv["User CSV<br/>[users.csv]"]
  node_analyze["File analysis<br/>[add_users.py]"]
end

subgraph group_directory["Directory management"]
  node_user_create["Create users<br/>[add_users.py]"]
  node_user_update["Update users<br/>[add_users.py]"]
  node_user_search["User search<br/>[add_users.py]"]
  node_user_view["View attributes<br/>[add_users.py]"]
  node_user_export["Export users<br/>[add_users.py]"]
  node_department_ops["Departments<br/>[add_users.py]"]
  node_department_csv["Department data"]
  node_search_aliases["Search aliases<br/>[search_aliases.txt]"]
end

subgraph group_mailboxes["Shared mailboxes"]
  node_mailbox_import["Mailbox import<br/>[add_users.py]"]
  node_mailbox_csv["Mailbox CSV<br/>[shared.csv]"]
end

subgraph group_support["Validation and notifications"]
  node_validate["CSV validation<br/>[add_users.py]"]
  node_password_tools["Password tools<br/>[add_users.py]"]
  node_email_notify["Email notifications<br/>[add_users.py]"]
  node_email_template["Email templates"]
  node_password_template["Password email template"]
end

node_operator(("Operator"))
node_yandex{{"Yandex 360 API"}}
node_smtp{{"SMTP server"}}
node_export_file["Export file"]

node_operator -->|"selects task"| node_menu
node_menu -->|"reads users"| node_user_csv
node_menu -->|"processes input"| node_validate
node_validate -->|"reports errors"| node_analyze
node_validate -->|"valid rows"| node_user_create
node_validate -->|"valid rows"| node_user_update
node_user_create -->|"creates users"| node_yandex
node_user_update -->|"patches users"| node_yandex
node_user_search -->|"queries users"| node_yandex
node_user_view -->|"gets attributes"| node_yandex
node_user_export -->|"fetches users"| node_yandex
node_user_export -->|"writes export"| node_export_file
node_department_ops -->|"reads data"| node_department_csv
node_department_ops -->|"manages departments"| node_yandex
node_user_create -->|"creates as needed"| node_department_ops
node_mailbox_import -->|"reads mailboxes"| node_mailbox_csv
node_mailbox_import -->|"creates mailboxes"| node_yandex
node_user_search -->|"uses aliases"| node_search_aliases
node_user_create -->|"generates or validates"| node_password_tools
node_user_update -->|"generates or validates"| node_password_tools
node_user_create -.->|"sends welcome"| node_email_notify
node_user_update -.->|"sends password notice"| node_email_notify
node_email_notify -.->|"renders welcome"| node_email_template
node_email_notify -.->|"renders notice"| node_password_template
node_email_notify -.->|"sends email"| node_smtp

click node_menu "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_user_csv "https://github.com/milekhinav/createmodifyusers/blob/main/users.csv"
click node_validate "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_analyze "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_user_create "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_user_update "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_user_search "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_user_view "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_user_export "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_department_ops "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_search_aliases "https://github.com/milekhinav/createmodifyusers/blob/main/search_aliases.txt"
click node_mailbox_import "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_mailbox_csv "https://github.com/milekhinav/createmodifyusers/blob/main/shared.csv"
click node_password_tools "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_email_notify "https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py"
click node_email_template "https://github.com/milekhinav/createmodifyusers/blob/main/email_template.html"
click node_password_template "https://github.com/milekhinav/createmodifyusers/blob/main/password_change_template.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_menu,node_user_csv,node_analyze toneBlue
class node_user_create,node_user_update,node_user_search,node_user_view,node_user_export,node_department_ops,node_department_csv,node_search_aliases toneAmber
class node_mailbox_import,node_mailbox_csv,node_yandex,node_smtp toneMint
class node_validate,node_password_tools,node_email_notify,node_email_template,node_password_template toneRose
class node_operator,node_export_file toneIndigo
```

## Components

### CLI and input

- [Task menu](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [User CSV](https://github.com/milekhinav/createmodifyusers/blob/main/users.csv): `users.csv`
- [File analysis](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`

### Directory management

- [Create users](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [Update users](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [User search](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [View attributes](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [Export users](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [Departments](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- **Department data**
- [Search aliases](https://github.com/milekhinav/createmodifyusers/blob/main/search_aliases.txt): `search_aliases.txt`

### Shared mailboxes

- [Mailbox import](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [Mailbox CSV](https://github.com/milekhinav/createmodifyusers/blob/main/shared.csv): `shared.csv`

### Validation and notifications

- [CSV validation](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [Password tools](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [Email notifications](https://github.com/milekhinav/createmodifyusers/blob/main/add_users.py): `add_users.py`
- [Email templates](https://github.com/milekhinav/createmodifyusers/blob/main/email_template.html): `email_template.html`
- [Password email template](https://github.com/milekhinav/createmodifyusers/blob/main/password_change_template.html): `password_change_template.html`

### Other components

- **Operator**
- **Yandex 360 API**
- **SMTP server**
- **Export file**

## Connections

- Operator → Task menu: selects task
- Task menu → User CSV: reads users
- Task menu → CSV validation: processes input
- CSV validation → File analysis: reports errors
- CSV validation → Create users: valid rows
- CSV validation → Update users: valid rows
- Create users → Yandex 360 API: creates users
- Update users → Yandex 360 API: patches users
- User search → Yandex 360 API: queries users
- View attributes → Yandex 360 API: gets attributes
- Export users → Yandex 360 API: fetches users
- Export users → Export file: writes export
- Departments → Department data: reads data
- Departments → Yandex 360 API: manages departments
- Create users → Departments: creates as needed
- Mailbox import → Mailbox CSV: reads mailboxes
- Mailbox import → Yandex 360 API: creates mailboxes
- User search → Search aliases: uses aliases
- Create users → Password tools: generates or validates
- Update users → Password tools: generates or validates
- Create users → Email notifications: sends welcome
- Update users → Email notifications: sends password notice
- Email notifications → Email templates: renders welcome
- Email notifications → Password email template: renders notice
- Email notifications → SMTP server: sends email
