Airbyte source connector that enables data extraction from Mailchimp's API for email marketing analytics and audience management
npx @tessl/cli install tessl/pypi-airbyte-source-mailchimp@2.0.00
# Airbyte Source Mailchimp
1
2
Airbyte source connector that enables data extraction from Mailchimp's API for email marketing analytics and audience management. This declarative low-code connector provides access to campaigns, lists, segments, email activity, and detailed reports from Mailchimp's marketing platform.
3
4
## Package Information
5
6
- **Package Name**: airbyte-source-mailchimp
7
- **Language**: Python
8
- **Installation**: `pip install airbyte-source-mailchimp`
9
- **CLI Command**: `source-mailchimp`
10
11
## Core Imports
12
13
```python
14
from source_mailchimp import SourceMailchimp
15
```
16
17
Entry point function:
18
19
```python
20
from source_mailchimp.run import run
21
```
22
23
Configuration migration utilities:
24
25
```python
26
from source_mailchimp.config_migrations import MigrateDataCenter
27
```
28
29
## Basic Usage
30
31
### Command Line Interface
32
33
```bash
34
# Get connector specification
35
source-mailchimp spec
36
37
# Test connection with config
38
source-mailchimp check --config config.json
39
40
# Discover available streams
41
source-mailchimp discover --config config.json
42
43
# Extract data
44
source-mailchimp read --config config.json --catalog catalog.json
45
```
46
47
### Programmatic Usage
48
49
```python
50
from source_mailchimp import SourceMailchimp
51
from source_mailchimp.run import run
52
53
# Create connector instance
54
source = SourceMailchimp()
55
56
# Run connector (typically used by Airbyte framework)
57
run()
58
```
59
60
### Configuration Examples
61
62
API Key authentication:
63
```json
64
{
65
"credentials": {
66
"auth_type": "apikey",
67
"apikey": "your-api-key-us10"
68
},
69
"start_date": "2023-01-01T00:00:00.000Z"
70
}
71
```
72
73
OAuth authentication:
74
```json
75
{
76
"credentials": {
77
"auth_type": "oauth2.0",
78
"client_id": "your-client-id",
79
"client_secret": "your-client-secret",
80
"access_token": "your-access-token"
81
},
82
"start_date": "2023-01-01T00:00:00.000Z"
83
}
84
```
85
86
## Architecture
87
88
The connector is built using Airbyte's declarative framework with these key components:
89
90
- **SourceMailchimp**: Main connector class extending YamlDeclarativeSource
91
- **Manifest Configuration**: YAML-based stream definitions with authentication, pagination, and incremental sync
92
- **Configuration Migration**: Automatic data center detection and config updates
93
- **Custom Extractors**: Specialized data processing for complex API responses
94
95
The connector uses Mailchimp's REST API v3.0 with automatic data center routing, rate limiting, and comprehensive error handling.
96
97
## Capabilities
98
99
### Core Connector Functions
100
101
Main connector functionality for initializing and running the Mailchimp source connector within the Airbyte framework.
102
103
```python { .api }
104
class SourceMailchimp(YamlDeclarativeSource):
105
def __init__(self): ...
106
107
def run(): ...
108
```
109
110
[Core Connector](./core-connector.md)
111
112
### Configuration Management
113
114
Runtime configuration migration and data center detection for both API key and OAuth authentication methods.
115
116
```python { .api }
117
class MigrateDataCenter:
118
@classmethod
119
def get_data_center_location(cls, config: Mapping[str, Any]) -> Mapping[str, Any]: ...
120
121
@staticmethod
122
def get_oauth_data_center(access_token: str) -> str: ...
123
124
@classmethod
125
def migrate(cls, args: List[str], source: Source) -> None: ...
126
```
127
128
[Configuration Management](./configuration.md)
129
130
### Data Streams
131
132
Access to 12 Mailchimp data streams including campaigns, lists, segments, email activity, and detailed analytics reports.
133
134
**Available Streams:**
135
- automations, campaigns, email_activity, lists, list_members
136
- tags, interest_categories, interests, reports, segments
137
- segment_members, unsubscribes
138
139
[Data Streams](./data-streams.md)
140
141
### Custom Data Processing
142
143
Specialized record extraction and transformation for complex Mailchimp API responses, particularly email activity data.
144
145
```python { .api }
146
class MailChimpRecordExtractorEmailActivity(DpathExtractor):
147
def extract_records(self, response: requests.Response) -> Iterable[Mapping[str, Any]]: ...
148
```
149
150
[Custom Processing](./custom-processing.md)