Skip to content

Commit 5dc6384

Browse files
committed
Consolidate and reorganize examples directory
- Reorganize examples into basic/ and advanced/ folders for progressive learning - Move quickstart.py -> examples/advanced/complete_walkthrough.py (renamed for clarity) - Create examples/basic/functional_testing.py from test_dataverse_functionality.py - Enhance examples/basic/installation_example.py with comprehensive validation - Update examples/README.md with detailed learning progression and usage guide - Eliminate duplication between examples while preserving all functionality - Create logical Install → Test → Master learning path for new users
1 parent eae3e99 commit 5dc6384

4 files changed

Lines changed: 680 additions & 105 deletions

File tree

examples/README.md

Lines changed: 61 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PowerPlatform Dataverse Client Examples
22

3-
This directory contains comprehensive examples demonstrating how to use the **PowerPlatform-Dataverse-Client** SDK for Python.
3+
This directory contains comprehensive examples demonstrating how to use the **PowerPlatform-Dataverse-Client** SDK for Python. The examples are organized in a progressive learning path: **Install → Learn → Test**.
44

55
## 📦 Installation
66

@@ -13,36 +13,72 @@ pip install PowerPlatform-Dataverse-Client
1313
## 📁 Directory Structure
1414

1515
### 🌱 Basic Examples (`basic/`)
16-
Get started quickly with fundamental Dataverse operations:
17-
- **`quickstart.py`** - Basic client setup, authentication, and simple CRUD operations
18-
- Authentication setup with Azure Identity
19-
- Creating, reading, updating, and deleting records
20-
- Basic error handling
21-
22-
### 🚀 Advanced Examples (`advanced/`)
23-
Explore powerful features for complex scenarios:
24-
- **`file_upload.py`** - File upload to Dataverse file columns with chunking
25-
- **`pandas_integration.py`** - DataFrame-based operations for data analysis
16+
Start here for getting up and running with the SDK:
17+
18+
- **`installation_example.py`** - **START HERE** 🎯
19+
- Package installation validation and import verification
20+
- Method availability checking and troubleshooting
21+
- Basic usage examples and code patterns
22+
- Optional interactive testing with real environment
23+
- Perfect for first-run validation after installation
24+
25+
- **`functional_testing.py`** - **TEST BASIC FUNCTIONALITY** 🧪
26+
- Simple functional testing in real Dataverse environments
27+
- Basic CRUD operations validation with clean patterns
28+
- Table creation and basic querying tests
29+
- Interactive cleanup and straightforward validation
30+
- Perfect for verifying SDK works in your environment
31+
32+
### 🔬 Advanced Examples (`advanced/`)
33+
Deep-dive into production-ready patterns and specialized functionality:
34+
35+
- **`complete_walkthrough.py`** - **COMPREHENSIVE DEMO** 🚀
36+
- Full SDK feature demonstration with production-ready patterns
37+
- Table creation with custom schemas and enums
38+
- Single and bulk CRUD operations with error handling
39+
- Advanced querying (SQL and OData) with paging
40+
- Column metadata management and multi-language support
41+
- Interactive cleanup and best practices
42+
43+
- **`file_upload.py`** - **FILE OPERATIONS** 📎
44+
- File upload to Dataverse file columns with chunking
45+
- Advanced file handling patterns
46+
47+
- **`pandas_integration.py`** - **DATA ANALYSIS** 📊
48+
- DataFrame-based operations for data analysis
49+
- Pandas integration patterns
2650

2751
## 🚀 Getting Started
2852

29-
1. **Install the SDK**:
30-
```bash
31-
pip install PowerPlatform-Dataverse-Client
32-
```
53+
Follow this recommended progression for the best learning experience:
54+
55+
### 📋 Step 1: Validate Installation
56+
```bash
57+
# Install the SDK and dependencies
58+
pip install PowerPlatform-Dataverse-Client azure-identity
59+
60+
# Validate installation and imports
61+
python examples/basic/installation_example.py
62+
```
63+
64+
### 🧪 Step 2: Test Basic Functionality (Optional)
65+
```bash
66+
# Basic functional testing in your environment
67+
python examples/basic/functional_testing.py
68+
```
3369

34-
2. **Install Additional Dependencies** (for examples):
35-
```bash
36-
pip install azure-identity pandas
37-
```
70+
### 🚀 Step 3: Master Advanced Features
71+
```bash
72+
# Comprehensive walkthrough with production patterns
73+
python examples/advanced/complete_walkthrough.py
74+
```
3875

39-
2. **Set Up Authentication**:
40-
Configure Azure Identity credentials (see individual examples for details)
76+
## 🎯 Quick Start Recommendations
4177

42-
3. **Run Basic Example**:
43-
```bash
44-
python examples/basic/quickstart.py
45-
```
78+
- **New to the SDK?** → Start with `examples/basic/installation_example.py`
79+
- **Need to test/validate?** → Use `examples/basic/functional_testing.py`
80+
- **Want to see all features?** → Run `examples/advanced/complete_walkthrough.py`
81+
- **Building production apps?** → Study patterns in `examples/advanced/complete_walkthrough.py`
4682

4783
## 📋 Prerequisites
4884

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,30 @@
22
# Licensed under the MIT license.
33

44
"""
5-
PowerPlatform Dataverse Client - Basic Quickstart Example
6-
7-
This example demonstrates basic usage of the PowerPlatform-Dataverse-Client SDK.
5+
PowerPlatform Dataverse Client - Complete SDK Walkthrough
6+
7+
This comprehensive example demonstrates advanced usage of the PowerPlatform-Dataverse-Client SDK
8+
including all major features and production-ready patterns.
9+
10+
Features Demonstrated:
11+
- Authentication setup and connection management
12+
- Table creation with custom schemas and enums
13+
- Single and bulk record operations (CRUD)
14+
- Advanced querying with SQL and OData
15+
- Paging and batch processing
16+
- Column metadata management
17+
- Multi-language label support
18+
- Error handling and retry patterns
19+
- Interactive cleanup options
820
921
Prerequisites:
1022
pip install PowerPlatform-Dataverse-Client
1123
pip install azure-identity
1224
1325
For local development, you can also run from source by uncommenting the sys.path line below.
26+
27+
Note: This is a comprehensive demonstration. For basic installation validation,
28+
use examples/basic/installation_example.py first.
1429
"""
1530

1631
import sys

0 commit comments

Comments
 (0)