You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+39-4Lines changed: 39 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,34 @@
2
2
3
3
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
4
5
+
## Development Commands
6
+
7
+
```bash
8
+
# Install dependencies
9
+
uv sync --all-extras
10
+
11
+
# Run all tests with coverage
12
+
uv run pytest
13
+
14
+
# Run a single test file
15
+
uv run pytest tests/test_users.py
16
+
17
+
# Run a specific test
18
+
uv run pytest tests/test_users.py::test_user_details -v
19
+
20
+
# Format code
21
+
uv run ruff format .
22
+
23
+
# Lint and auto-fix
24
+
uv run ruff check . --fix
25
+
26
+
# Type checking (strict mode)
27
+
uv run pyright
28
+
29
+
# Build documentation
30
+
uv run mkdocs serve
31
+
```
32
+
5
33
## Architecture Overview
6
34
7
35
### SDK Structure
@@ -22,10 +50,17 @@ The Bloomy Python SDK is organized as a client-based architecture where all API
22
50
23
51
3.**Operations Pattern**:
24
52
- Each API resource has its own operations class (e.g., `UserOperations`, `MeetingOperations`)
25
-
- All operation classes inherit from `BaseOperations` which provides lazy-loaded user ID
53
+
- Sync operations in `src/bloomy/operations/` inherit from `BaseOperations`
54
+
- Async operations in `src/bloomy/operations/async_/` inherit from `AsyncBaseOperations`
55
+
- Both inherit from `AbstractOperations` which provides shared logic
26
56
- Operations are accessed via client attributes: `client.user`, `client.meeting`, etc.
27
57
28
-
4.**API Endpoints**:
58
+
4.**Models (`src/bloomy/models.py`)**:
59
+
- Pydantic models for type-safe API responses
60
+
- All models inherit from `BloomyBaseModel` with common config
61
+
- Field aliases map PascalCase API responses to snake_case Python attributes
62
+
63
+
5.**API Endpoints**:
29
64
- Base URL: `https://app.bloomgrowth.com/api/v1`
30
65
- Authentication: Bearer token in Authorization header
31
66
- All responses are JSON
@@ -41,9 +76,9 @@ The Bloomy Python SDK is organized as a client-based architecture where all API
41
76
-`APIError` includes status code
42
77
- HTTP errors are raised via `response.raise_for_status()`
43
78
44
-
4.**Type Annotations**: Uses Python 3.12+ union syntax (`|`) and TypedDict for structured return types.
79
+
4.**Type Annotations**: Uses Python 3.12+ union syntax (`|`) and Pydantic models for structured return types.
45
80
46
-
5.**Testing**: Mock-based testing with `unittest.mock`. Fixtures defined in `conftest.py` provide sample data and mock HTTP client.
81
+
5.**Testing**: Mock-based testing with `unittest.mock`. Fixtures in `tests/conftest.py` provide sample data and mock HTTP client. Use `pytest-asyncio` for async tests.
0 commit comments