Skip to content

Commit 614a4c8

Browse files
committed
[docs] Added project directory structure
1 parent b70af1e commit 614a4c8

File tree

2 files changed

+94
-2
lines changed

2 files changed

+94
-2
lines changed

HISTORY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
#### Full `async/await` support
66

7-
- Added async/await support to the SDK. All existing `clients` and `caches` now have async variants, plus new models (mainly search result models that require async iteration). Following `aio` directory convention for all async components.
7+
- Added `async/await` support to the SDK. All existing `clients` and `caches` now have async variants, plus new models (mainly search result models that require `async` iteration). Following `aio` directory convention for all async components.
88
- Implemented `AsyncAtlanClient` for all async operations (extends `AtlanClient` for reusability).
99
- For methods that accept client parameters, we've added corresponding `*_async()` variants:
1010

11-
| Sync Method | Async Method |
11+
| sync method | async method |
1212
|------------|--------------|
1313
| `Connection.creator()` | `Connection.creator_async()` |
1414
| `Badge.creator()` | `Badge.creator_async()` |

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,98 @@ This will:
206206
- 🎨 Format code automatically
207207
- ⚡ Support incremental updates
208208

209+
## 📁 Project Structure
210+
211+
Understanding the codebase layout will help you navigate and contribute effectively:
212+
213+
```
214+
atlan-python/
215+
├── pyatlan/ # 🐍 Main Python package
216+
│ ├── __init__.py # Package initialization
217+
│ ├── cache/ # 💾 Caching mechanisms
218+
│ │ ├── atlan_tag_cache.py # Tag name ↔ GUID mapping
219+
│ │ ├── custom_metadata_cache.py # Custom metadata definitions
220+
│ │ ├── enum_cache.py # Enum value caching
221+
│ │ └── aio/ # Async versions of caches
222+
│ ├── client/ # 🌐 HTTP client implementations
223+
│ │ ├── atlan.py # Main synchronous client
224+
│ │ ├── asset.py # Asset operations (CRUD, search)
225+
│ │ ├── admin.py # Administrative operations
226+
│ │ ├── audit.py # Audit log operations
227+
│ │ ├── common/ # Shared client logic
228+
│ │ └── aio/ # Async client implementations
229+
│ ├── model/ # 📊 Data models and assets
230+
│ │ ├── assets/ # Asset type definitions
231+
│ │ │ ├── core/ # Core asset types (Table, Database, etc.)
232+
│ │ │ └── relations/ # Relationship models
233+
│ │ ├── fields/ # Search field definitions
234+
│ │ ├── open_lineage/ # OpenLineage specification models
235+
│ │ ├── packages/ # Package/workflow models
236+
│ │ └── aio/ # Async model variants
237+
│ ├── generator/ # 🏗️ Code generation tools
238+
│ │ ├── templates/ # Jinja2 templates for generation
239+
│ │ └── class_generator.py # Main generation logic
240+
│ ├── pkg/ # 📦 Package creation utilities
241+
│ ├── events/ # 🔔 Event handling (webhooks, lambdas)
242+
│ ├── samples/ # 💡 Example code and scripts
243+
│ └── test_utils/ # 🧪 Testing utilities
244+
├── tests/ # 🧪 Test suite
245+
│ ├── unit/ # Unit tests (fast, no external deps)
246+
│ ├── integration/ # Integration tests (require Atlan instance)
247+
│ └── data/ # Test fixtures and mock data
248+
├── docs/ # 📚 Sphinx documentation
249+
│ ├── conf.py # Sphinx configuration
250+
│ └── *.rst # Documentation source files
251+
├── pyproject.toml # 📋 Project configuration (deps, tools)
252+
├── uv.lock # 🔒 Locked dependencies
253+
├── qa-checks # ✅ Quality assurance script
254+
├── formatter # 🎨 Code formatting script
255+
└── generator # 🏗️ Model generation script
256+
```
257+
258+
### Key Components
259+
260+
#### 🌐 **Client Layer** (`pyatlan/client/`)
261+
- **Synchronous**: Direct HTTP operations using `httpx`
262+
- **Asynchronous**: Async/await operations using `httpx.AsyncClient`
263+
- **Common**: Shared business logic between sync/async clients
264+
- **Specialized**: Domain-specific clients (admin, audit, lineage, etc.)
265+
266+
#### 📊 **Model Layer** (`pyatlan/model/`)
267+
- **Assets**: 400+ asset types (tables, dashboards, pipelines, etc.)
268+
- **Core Models**: Base classes, requests, responses
269+
- **Fields**: Search and filtering field definitions
270+
- **OpenLineage**: Data lineage specification compliance
271+
272+
#### 💾 **Cache Layer** (`pyatlan/cache/`)
273+
- **Tag Cache**: Maps human-readable tag names to internal GUIDs
274+
- **Custom Metadata**: Caches custom attribute definitions
275+
- **Connection Cache**: Stores connector and connection metadata
276+
- **Async Variants**: Full async implementations for all caches
277+
278+
#### 🏗️ **Generation System** (`pyatlan/generator/`)
279+
- **Templates**: Jinja2 templates for assets, enums, documentation
280+
- **Generator**: Retrieves typedefs and generates Python models
281+
- **Incremental**: Only regenerates changed models for efficiency
282+
283+
#### 🧪 **Testing Strategy**
284+
- **Unit Tests**: Fast, isolated tests with mocks/fixtures
285+
- **Integration Tests**: Real API calls (requires credentials)
286+
- **VCR Cassettes**: Record/replay HTTP interactions for consistent testing
287+
288+
#### 📦 **Package System** (`pyatlan/pkg/`)
289+
- **Custom Packages**: Framework for building Atlan-deployable packages
290+
- **Templates**: Pre-built package structures and configurations
291+
- **Utilities**: Helper functions for package development
292+
293+
### Development Workflow
294+
295+
1. **Models**: Generated from your Atlan instance's typedefs
296+
2. **Clients**: Hand-crafted for optimal developer experience
297+
3. **Tests**: Mix of unit (fast iteration) and integration (real validation)
298+
4. **Quality**: Automated formatting, linting, and type checking
299+
5. **Documentation**: Auto-generated from docstrings and examples
300+
209301
## 📄 License
210302

211303
This project is licensed under the **Apache License 2.0** - see the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)