Skip to content

Commit 0515f59

Browse files
authored
Merge pull request #7 from franccesco/docs/improve-claude-md
docs: enhance CLAUDE.md with development commands and architecture details
2 parents fe0a174 + 1b1e1d2 commit 0515f59

1 file changed

Lines changed: 39 additions & 4 deletions

File tree

CLAUDE.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44

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+
533
## Architecture Overview
634

735
### SDK Structure
@@ -22,10 +50,17 @@ The Bloomy Python SDK is organized as a client-based architecture where all API
2250

2351
3. **Operations Pattern**:
2452
- 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
2656
- Operations are accessed via client attributes: `client.user`, `client.meeting`, etc.
2757

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**:
2964
- Base URL: `https://app.bloomgrowth.com/api/v1`
3065
- Authentication: Bearer token in Authorization header
3166
- All responses are JSON
@@ -41,9 +76,9 @@ The Bloomy Python SDK is organized as a client-based architecture where all API
4176
- `APIError` includes status code
4277
- HTTP errors are raised via `response.raise_for_status()`
4378

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.
4580

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.
4782

4883
### API Operations Reference
4984

0 commit comments

Comments
 (0)