# quizque/shakepy architecture

> Architecture diagram of the GitHub repository quizque/shakepy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/quizque/shakepy
- Repository: https://github.com/quizque/shakepy

## Overview

##### Project type and purpose
- This is an open-source Python client library (wrapper) for the Shakepay API.
- Purpose: expose endpoints for authentication, rates, “shaking sats” rewards, transactions, waitlist info, and wallet data in a Pythonic way.
- Examples demonstrate usage and guide authors on implementing custom auth flows.

##### File structure
- Top-level files:
- .gitignore, LICENSE, README.md – repository metadata
- example_*.py – sample scripts showing typical usage
- shakepay_api/ – core package directory
- authentication.py – auth token management and login flows
- rates.py – currency rates endpoints
- shaking_sats.py – rewards retrieval
- transactions.py – send/receive transactions
- waitlist.py – waitlist status checks
- wallet.py – wallet balances and addresses
- test.py – sample/test harness for custom auth
- No separate frontend/backend or DB layer – it’s purely a client-side wrapper.

##### README for additional insights
- Emphasis on simplicity and raw returns
- Notes on future pip packaging and Python standards compliance
- Directs users to sample files for auth system customization
- No built-in persistence or UI components

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Example Scripts / Client Application"
        EG["example_get_authentication.py"]:::example
        ES["example_send_cad.py"]:::example
        ET["example_trigger_shackingsats.py"]:::example
    end

    subgraph "shakepay_api Package"
        INIT["__init__.py"]:::internal
        AUTH["authentication.py"]:::internal
        RATES["rates.py"]:::internal
        SS["shaking_sats.py"]:::internal
        TX["transactions.py"]:::internal
        WL["waitlist.py"]:::internal
        WLT["wallet.py"]:::internal
        TEST["test.py"]:::internal
    end

    EXT[(External Shakepay REST API)]:::external

    %% Data Flow
    EG --> INIT
    ES --> INIT
    ET --> INIT

    INIT --> AUTH
    INIT --> RATES
    INIT --> SS
    INIT --> TX
    INIT --> WL
    INIT --> WLT
    INIT --> TEST

    AUTH -->|"HTTPS Request/Response"| EXT
    RATES -->|"HTTPS Request/Response"| EXT
    SS -->|"HTTPS Request/Response"| EXT
    TX -->|"HTTPS Request/Response"| EXT
    WL -->|"HTTPS Request/Response"| EXT
    WLT -->|"HTTPS Request/Response"| EXT

    %% Click Events
    click EG "https://github.com/quizque/shakepy/blob/main/example_get_authentication.py"
    click ES "https://github.com/quizque/shakepy/blob/main/example_send_cad.py"
    click ET "https://github.com/quizque/shakepy/blob/main/example_trigger_shackingsats.py"
    click INIT "https://github.com/quizque/shakepy/blob/main/shakepay_api/__init__.py"
    click AUTH "https://github.com/quizque/shakepy/blob/main/shakepay_api/authentication.py"
    click RATES "https://github.com/quizque/shakepy/blob/main/shakepay_api/rates.py"
    click SS "https://github.com/quizque/shakepy/blob/main/shakepay_api/shaking_sats.py"
    click TX "https://github.com/quizque/shakepy/blob/main/shakepay_api/transactions.py"
    click WL "https://github.com/quizque/shakepy/blob/main/shakepay_api/waitlist.py"
    click WLT "https://github.com/quizque/shakepy/blob/main/shakepay_api/wallet.py"
    click TEST "https://github.com/quizque/shakepy/blob/main/shakepay_api/test.py"

    %% Styles
    classDef example fill:#9f6,stroke:#333,stroke-width:1px
    classDef internal fill:#6cf,stroke:#333,stroke-width:1px
    classDef external fill:#f96,stroke:#333,stroke-width:1px
```
