# edraj/pydmart architecture

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

- Interactive diagram: https://gitdiagram.com/edraj/pydmart
- Repository: https://github.com/edraj/pydmart

## Overview

Pydmart is an asynchronous Python client for a Dmart instance. A caller uses DmartService to authenticate, manage users, query spaces and records, and perform resource, payload, and ticket operations; the service sends HTTP requests to the Dmart API and returns parsed responses. The models and enums define the request/response shapes and protocol values used by that client. The README documents the broader API surface; the service excerpt is partial, so individual operations are grouped by capability rather than inferring unshown internal call paths.

Main entry points: [`src/pydmart/service.py`](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py) (HTTP Transport), [`src/pydmart/models.py`](https://github.com/edraj/pydmart/blob/main/src/pydmart/models.py) (Request and Response Models), [`src/pydmart/enums.py`](https://github.com/edraj/pydmart/blob/main/src/pydmart/enums.py) (Protocol Enums)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and Users"]
  node_auth["Authentication<br/>[service.py]"]
  node_user_ops["User Operations<br/>[service.py]"]
end

subgraph group_records["Queries and Records"]
  node_query["Query and Export<br/>[service.py]"]
  node_space_ops["Space Operations<br/>[service.py]"]
  node_entry_reads["Entry and Child Reads<br/>[service.py]"]
end

subgraph group_resources["Resource Operations"]
  node_resource_actions["Resource Actions<br/>[service.py]"]
  node_asset_ops["Assets and Uploads<br/>[service.py]"]
  node_payload_ops["Payloads and Attachments<br/>[service.py]"]
  node_ticket_ops["Ticket and Record Submit<br/>[service.py]"]
  node_manifest_ops["Manifest and Settings<br/>[service.py]"]
end

subgraph group_protocol["Client Protocol"]
  node_transport["HTTP Transport<br/>[service.py]"]
  node_models["Request and Response Models<br/>[models.py]"]
  node_enums["Protocol Enums<br/>[enums.py]"]
  node_constants["Name Patterns<br/>[consts.py]"]
end

node_caller(("Application Caller"))
node_dmart_api["Dmart API"]

node_caller -->|"invokes"| node_auth
node_caller -->|"invokes"| node_user_ops
node_caller -->|"invokes"| node_query
node_caller -->|"invokes"| node_space_ops
node_caller -->|"invokes"| node_entry_reads
node_caller -->|"invokes"| node_resource_actions
node_caller -->|"invokes"| node_asset_ops
node_caller -->|"invokes"| node_payload_ops
node_caller -->|"invokes"| node_ticket_ops
node_caller -->|"invokes"| node_manifest_ops
node_auth -->|"requests via"| node_transport
node_user_ops -->|"requests via"| node_transport
node_query -->|"requests via"| node_transport
node_space_ops -->|"requests via"| node_transport
node_entry_reads -->|"requests via"| node_transport
node_resource_actions -->|"requests via"| node_transport
node_asset_ops -->|"requests via"| node_transport
node_payload_ops -->|"requests via"| node_transport
node_ticket_ops -->|"requests via"| node_transport
node_manifest_ops -.->|"requests via"| node_transport
node_transport -->|"sends HTTP"| node_dmart_api
node_transport -->|"parses responses"| node_models
node_query -->|"accepts requests"| node_models
node_resource_actions -->|"accepts requests"| node_models
node_models -->|"uses values"| node_enums

click node_auth "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_user_ops "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_query "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_space_ops "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_entry_reads "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_resource_actions "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_asset_ops "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_payload_ops "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_ticket_ops "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_manifest_ops "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_transport "https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py"
click node_models "https://github.com/edraj/pydmart/blob/main/src/pydmart/models.py"
click node_enums "https://github.com/edraj/pydmart/blob/main/src/pydmart/enums.py"
click node_constants "https://github.com/edraj/pydmart/blob/main/src/pydmart/consts.py"

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_auth,node_user_ops toneBlue
class node_query,node_space_ops,node_entry_reads toneAmber
class node_resource_actions,node_asset_ops,node_payload_ops,node_ticket_ops,node_manifest_ops,node_dmart_api toneMint
class node_transport,node_models,node_enums,node_constants toneRose
class node_caller toneIndigo
```

## Components

### Identity and Users

- [Authentication](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`
- [User Operations](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`

### Queries and Records

- [Query and Export](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`
- [Space Operations](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`
- [Entry and Child Reads](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`

### Resource Operations

- [Resource Actions](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`
- [Assets and Uploads](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`
- [Payloads and Attachments](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`
- [Ticket and Record Submit](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`
- [Manifest and Settings](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`

### Client Protocol

- [HTTP Transport](https://github.com/edraj/pydmart/blob/main/src/pydmart/service.py): `src/pydmart/service.py`
- [Request and Response Models](https://github.com/edraj/pydmart/blob/main/src/pydmart/models.py): `src/pydmart/models.py`
- [Protocol Enums](https://github.com/edraj/pydmart/blob/main/src/pydmart/enums.py): `src/pydmart/enums.py`
- [Name Patterns](https://github.com/edraj/pydmart/blob/main/src/pydmart/consts.py): `src/pydmart/consts.py`

### Other components

- **Application Caller**
- **Dmart API**

## Connections

- Application Caller → Authentication: invokes (evidence: `README.md`)
- Application Caller → User Operations: invokes (evidence: `README.md`)
- Application Caller → Query and Export: invokes (evidence: `README.md`)
- Application Caller → Space Operations: invokes (evidence: `README.md`)
- Application Caller → Entry and Child Reads: invokes (evidence: `README.md`)
- Application Caller → Resource Actions: invokes (evidence: `README.md`)
- Application Caller → Assets and Uploads: invokes (evidence: `README.md`)
- Application Caller → Payloads and Attachments: invokes (evidence: `README.md`)
- Application Caller → Ticket and Record Submit: invokes (evidence: `README.md`)
- Application Caller → Manifest and Settings: invokes (evidence: `README.md`)
- Authentication → HTTP Transport: requests via (evidence: `src/pydmart/service.py`)
- User Operations → HTTP Transport: requests via (evidence: `src/pydmart/service.py`)
- Query and Export → HTTP Transport: requests via (evidence: `src/pydmart/service.py`)
- Space Operations → HTTP Transport: requests via (evidence: `src/pydmart/service.py`)
- Entry and Child Reads → HTTP Transport: requests via (evidence: `src/pydmart/service.py`)
- Resource Actions → HTTP Transport: requests via (evidence: `src/pydmart/service.py`)
- Assets and Uploads → HTTP Transport: requests via (evidence: `src/pydmart/service.py`)
- Payloads and Attachments → HTTP Transport: requests via (evidence: `src/pydmart/service.py`)
- Ticket and Record Submit → HTTP Transport: requests via (evidence: `src/pydmart/service.py`)
- Manifest and Settings → HTTP Transport: requests via (evidence: `README.md`)
- HTTP Transport → Dmart API: sends HTTP (evidence: `src/pydmart/service.py`)
- HTTP Transport → Request and Response Models: parses responses (evidence: `src/pydmart/service.py`)
- Query and Export → Request and Response Models: accepts requests (evidence: `README.md`)
- Resource Actions → Request and Response Models: accepts requests (evidence: `README.md`)
- Request and Response Models → Protocol Enums: uses values (evidence: `src/pydmart/models.py`)
