amplify-excel-migrator 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of amplify-excel-migrator might be problematic. Click here for more details.

@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Eyal Politansky
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include tests *.py
@@ -0,0 +1,204 @@
1
+ Metadata-Version: 2.4
2
+ Name: amplify-excel-migrator
3
+ Version: 1.0.0
4
+ Summary: A CLI tool to migrate Excel data to AWS Amplify
5
+ Home-page: https://github.com/EyalPoly/amplify-excel-migrator
6
+ Author: Eyal Politansky
7
+ Author-email: 10eyal10@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: pandas>=1.3.0
15
+ Requires-Dist: requests>=2.26.0
16
+ Requires-Dist: boto3>=1.18.0
17
+ Requires-Dist: pycognito>=2023.5.0
18
+ Requires-Dist: PyJWT>=2.0.0
19
+ Requires-Dist: aiohttp>=3.8.0
20
+ Requires-Dist: openpyxl>=3.0.0
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
23
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
24
+ Requires-Dist: pytest-mock>=3.12.0; extra == "dev"
25
+ Requires-Dist: setuptools>=80.0.0; extra == "dev"
26
+ Requires-Dist: wheel>=0.40.0; extra == "dev"
27
+ Requires-Dist: twine>=4.0.0; extra == "dev"
28
+ Dynamic: author
29
+ Dynamic: author-email
30
+ Dynamic: classifier
31
+ Dynamic: description
32
+ Dynamic: description-content-type
33
+ Dynamic: home-page
34
+ Dynamic: license-file
35
+ Dynamic: provides-extra
36
+ Dynamic: requires-dist
37
+ Dynamic: requires-python
38
+ Dynamic: summary
39
+
40
+ # Amplify Excel Migrator
41
+
42
+ A CLI tool to migrate data from Excel files to AWS Amplify GraphQL API.
43
+ Developed for the MECO project - https://github.com/sworgkh/meco-observations-amplify
44
+
45
+ ## Installation
46
+
47
+ ### From GitHub
48
+
49
+ Install directly from GitHub:
50
+
51
+ ```bash
52
+ pip install git+https://github.com/EyalPoly/amplify-excel-migrator.git
53
+ ```
54
+
55
+ ### From Source
56
+
57
+ Clone the repository and install:
58
+
59
+ ```bash
60
+ git clone https://github.com/EyalPoly/amplify-excel-migrator.git
61
+ cd amplify-excel-migrator
62
+ pip install .
63
+ ```
64
+
65
+ ### For Development
66
+
67
+ Install with development dependencies:
68
+
69
+ ```bash
70
+ pip install -e ".[dev]"
71
+ ```
72
+
73
+ This installs the package in editable mode with pytest and other development tools.
74
+
75
+ ## Usage
76
+
77
+ The tool has three subcommands:
78
+
79
+ ### 1. Configure (First Time Setup)
80
+
81
+ Save your AWS Amplify configuration:
82
+
83
+ ```bash
84
+ amplify-migrator config
85
+ ```
86
+
87
+ This will prompt you for:
88
+ - Excel file path
89
+ - AWS Amplify API endpoint
90
+ - AWS Region
91
+ - Cognito User Pool ID
92
+ - Cognito Client ID
93
+ - Admin username
94
+
95
+ Configuration is saved to `~/.amplify-migrator/config.json` (passwords are never saved).
96
+
97
+ ### 2. Show Configuration
98
+
99
+ View your current saved configuration:
100
+
101
+ ```bash
102
+ amplify-migrator show
103
+ ```
104
+
105
+ ### 3. Run Migration
106
+
107
+ Run the migration using your saved configuration:
108
+
109
+ ```bash
110
+ amplify-migrator migrate
111
+ ```
112
+
113
+ You'll only be prompted for your password (for security, passwords are never cached).
114
+
115
+ ### Quick Start
116
+
117
+ ```bash
118
+ # First time: configure the tool
119
+ amplify-migrator config
120
+
121
+ # View current configuration
122
+ amplify-migrator show
123
+
124
+ # Run migration (uses saved config)
125
+ amplify-migrator migrate
126
+
127
+ # View help
128
+ amplify-migrator --help
129
+ ```
130
+
131
+ ### Example: Configuration
132
+
133
+ ```
134
+ ╔════════════════════════════════════════════════════╗
135
+ ║ Amplify Migrator - Configuration Setup ║
136
+ ╚════════════════════════════════════════════════════╝
137
+
138
+ 📋 Configuration Setup:
139
+ ------------------------------------------------------
140
+ Excel file path [data.xlsx]: my-data.xlsx
141
+ AWS Amplify API endpoint: https://xxx.appsync-api.us-east-1.amazonaws.com/graphql
142
+ AWS Region [us-east-1]:
143
+ Cognito User Pool ID: us-east-1_xxxxx
144
+ Cognito Client ID: your-client-id
145
+ Admin Username: admin@example.com
146
+
147
+ ✅ Configuration saved successfully!
148
+ 💡 You can now run 'amplify-migrator migrate' to start the migration.
149
+ ```
150
+
151
+ ### Example: Migration
152
+
153
+ ```
154
+ ╔════════════════════════════════════════════════════╗
155
+ ║ Migrator Tool for Amplify ║
156
+ ╠════════════════════════════════════════════════════╣
157
+ ║ This tool requires admin privileges to execute ║
158
+ ╚════════════════════════════════════════════════════╝
159
+
160
+ 🔐 Authentication:
161
+ ------------------------------------------------------
162
+ Admin Password: ********
163
+ ```
164
+
165
+ ## Requirements
166
+
167
+ - Python 3.8+
168
+ - AWS Amplify GraphQL API
169
+ - AWS Cognito User Pool
170
+ - Admin access to the Cognito User Pool
171
+
172
+ ## Features
173
+
174
+ - **Configuration caching** - Save your setup, reuse it for multiple migrations
175
+ - **Interactive prompts** - Easy step-by-step configuration
176
+ - **Custom types and enums** - Full support for Amplify custom types
177
+ - **Duplicate detection** - Automatically skips existing records
178
+ - **Async uploads** - Fast parallel uploads for better performance
179
+ - **MFA support** - Works with multi-factor authentication
180
+ - **Automatic type parsing** - Smart field type detection and conversion
181
+
182
+ ## Excel File Format
183
+
184
+ The Excel file should have:
185
+ - One sheet per Amplify model (sheet name must match model name)
186
+ - Column names matching the model field names
187
+ - First row as headers
188
+
189
+ ### Example Excel Structure
190
+
191
+ **Sheet: User**
192
+ | name | email | age |
193
+ |------|-------|-----|
194
+ | John | john@example.com | 30 |
195
+ | Jane | jane@example.com | 25 |
196
+
197
+ **Sheet: Post**
198
+ | title | content | userId |
199
+ |-------|---------|--------|
200
+ | First Post | Hello World | john@example.com |
201
+
202
+ ## License
203
+
204
+ MIT
@@ -0,0 +1,165 @@
1
+ # Amplify Excel Migrator
2
+
3
+ A CLI tool to migrate data from Excel files to AWS Amplify GraphQL API.
4
+ Developed for the MECO project - https://github.com/sworgkh/meco-observations-amplify
5
+
6
+ ## Installation
7
+
8
+ ### From GitHub
9
+
10
+ Install directly from GitHub:
11
+
12
+ ```bash
13
+ pip install git+https://github.com/EyalPoly/amplify-excel-migrator.git
14
+ ```
15
+
16
+ ### From Source
17
+
18
+ Clone the repository and install:
19
+
20
+ ```bash
21
+ git clone https://github.com/EyalPoly/amplify-excel-migrator.git
22
+ cd amplify-excel-migrator
23
+ pip install .
24
+ ```
25
+
26
+ ### For Development
27
+
28
+ Install with development dependencies:
29
+
30
+ ```bash
31
+ pip install -e ".[dev]"
32
+ ```
33
+
34
+ This installs the package in editable mode with pytest and other development tools.
35
+
36
+ ## Usage
37
+
38
+ The tool has three subcommands:
39
+
40
+ ### 1. Configure (First Time Setup)
41
+
42
+ Save your AWS Amplify configuration:
43
+
44
+ ```bash
45
+ amplify-migrator config
46
+ ```
47
+
48
+ This will prompt you for:
49
+ - Excel file path
50
+ - AWS Amplify API endpoint
51
+ - AWS Region
52
+ - Cognito User Pool ID
53
+ - Cognito Client ID
54
+ - Admin username
55
+
56
+ Configuration is saved to `~/.amplify-migrator/config.json` (passwords are never saved).
57
+
58
+ ### 2. Show Configuration
59
+
60
+ View your current saved configuration:
61
+
62
+ ```bash
63
+ amplify-migrator show
64
+ ```
65
+
66
+ ### 3. Run Migration
67
+
68
+ Run the migration using your saved configuration:
69
+
70
+ ```bash
71
+ amplify-migrator migrate
72
+ ```
73
+
74
+ You'll only be prompted for your password (for security, passwords are never cached).
75
+
76
+ ### Quick Start
77
+
78
+ ```bash
79
+ # First time: configure the tool
80
+ amplify-migrator config
81
+
82
+ # View current configuration
83
+ amplify-migrator show
84
+
85
+ # Run migration (uses saved config)
86
+ amplify-migrator migrate
87
+
88
+ # View help
89
+ amplify-migrator --help
90
+ ```
91
+
92
+ ### Example: Configuration
93
+
94
+ ```
95
+ ╔════════════════════════════════════════════════════╗
96
+ ║ Amplify Migrator - Configuration Setup ║
97
+ ╚════════════════════════════════════════════════════╝
98
+
99
+ 📋 Configuration Setup:
100
+ ------------------------------------------------------
101
+ Excel file path [data.xlsx]: my-data.xlsx
102
+ AWS Amplify API endpoint: https://xxx.appsync-api.us-east-1.amazonaws.com/graphql
103
+ AWS Region [us-east-1]:
104
+ Cognito User Pool ID: us-east-1_xxxxx
105
+ Cognito Client ID: your-client-id
106
+ Admin Username: admin@example.com
107
+
108
+ ✅ Configuration saved successfully!
109
+ 💡 You can now run 'amplify-migrator migrate' to start the migration.
110
+ ```
111
+
112
+ ### Example: Migration
113
+
114
+ ```
115
+ ╔════════════════════════════════════════════════════╗
116
+ ║ Migrator Tool for Amplify ║
117
+ ╠════════════════════════════════════════════════════╣
118
+ ║ This tool requires admin privileges to execute ║
119
+ ╚════════════════════════════════════════════════════╝
120
+
121
+ 🔐 Authentication:
122
+ ------------------------------------------------------
123
+ Admin Password: ********
124
+ ```
125
+
126
+ ## Requirements
127
+
128
+ - Python 3.8+
129
+ - AWS Amplify GraphQL API
130
+ - AWS Cognito User Pool
131
+ - Admin access to the Cognito User Pool
132
+
133
+ ## Features
134
+
135
+ - **Configuration caching** - Save your setup, reuse it for multiple migrations
136
+ - **Interactive prompts** - Easy step-by-step configuration
137
+ - **Custom types and enums** - Full support for Amplify custom types
138
+ - **Duplicate detection** - Automatically skips existing records
139
+ - **Async uploads** - Fast parallel uploads for better performance
140
+ - **MFA support** - Works with multi-factor authentication
141
+ - **Automatic type parsing** - Smart field type detection and conversion
142
+
143
+ ## Excel File Format
144
+
145
+ The Excel file should have:
146
+ - One sheet per Amplify model (sheet name must match model name)
147
+ - Column names matching the model field names
148
+ - First row as headers
149
+
150
+ ### Example Excel Structure
151
+
152
+ **Sheet: User**
153
+ | name | email | age |
154
+ |------|-------|-----|
155
+ | John | john@example.com | 30 |
156
+ | Jane | jane@example.com | 25 |
157
+
158
+ **Sheet: Post**
159
+ | title | content | userId |
160
+ |-------|---------|--------|
161
+ | First Post | Hello World | john@example.com |
162
+
163
+ ## License
164
+
165
+ MIT