{"id":28797693,"url":"https://github.com/clouddev777/shopify_product_migration","last_synced_at":"2025-06-29T09:39:54.996Z","repository":{"id":298786631,"uuid":"1001142447","full_name":"CloudDev777/Shopify_Product_Migration","owner":"CloudDev777","description":"A Python tool for migrating products between Shopify stores, including variants, images, and collections. Built with async support for better performance.","archived":false,"fork":false,"pushed_at":"2025-06-12T22:30:45.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T23:34:39.414Z","etag":null,"topics":["migration","migration-tool","shopify","shopify-admin","shopify-private-app","shopify-products","shopify-storefront"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CloudDev777.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-12T22:25:53.000Z","updated_at":"2025-06-12T22:30:48.000Z","dependencies_parsed_at":"2025-06-12T23:34:55.085Z","dependency_job_id":"1d1f8196-f613-40f4-a67e-a5a7a7083b41","html_url":"https://github.com/CloudDev777/Shopify_Product_Migration","commit_stats":null,"previous_names":["clouddev777/shopify_product_migration"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CloudDev777/Shopify_Product_Migration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudDev777%2FShopify_Product_Migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudDev777%2FShopify_Product_Migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudDev777%2FShopify_Product_Migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudDev777%2FShopify_Product_Migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CloudDev777","download_url":"https://codeload.github.com/CloudDev777/Shopify_Product_Migration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudDev777%2FShopify_Product_Migration/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260491158,"owners_count":23017184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["migration","migration-tool","shopify","shopify-admin","shopify-private-app","shopify-products","shopify-storefront"],"created_at":"2025-06-18T05:00:37.239Z","updated_at":"2025-06-29T09:39:54.962Z","avatar_url":"https://github.com/CloudDev777.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shopify Product Migration Tool\n\nA Python tool for migrating products between Shopify stores, including variants, images, and collections. Built with async support for better performance.\n\n## Features\n\n- Full product data migration including variants, images, and metadata\n- Preserves SKUs and intelligently updates existing products\n- Handles image alt text and collection associations\n- Asynchronous operations for improved performance\n- Progress tracking and detailed logging\n- Validation of store credentials and data integrity\n\n## Requirements\n\n- Python 3.12 or higher\n- [uv](https://github.com/astral-sh/uv) - Fast Python package installer and resolver\n- Shopify Admin API access for both source and destination stores\n- Source products must have valid and unique SKU values\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/CloudDev777/Shopify_Product_Migration.git\ncd shopify-product-migration\n```\n\n2. Install uv if you haven't already:\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n3. Copy `.env.sample` to `.env` and configure your Shopify credentials:\n```bash\ncp .env.sample .env\n```\n\n4. Install dependencies:\n```bash\nmake install\n```\n\n## Configuration\n\n### Prerequisites\n\n1. **SKU Requirements**:\n   - Every product in the source store MUST have a valid and unique SKU\n   - SKUs are used as the primary identifier to match products between stores\n   - Products without SKUs or with duplicate SKUs will be skipped during migration\n   - Ensure all your products have SKUs assigned before starting the migration\n\n### Shopify API Setup\n\n1. Create private apps for both source and destination stores:\n   - Go to your Shopify admin panel\n   - Navigate to Settings \u003e Apps and sales channels \u003e Develop apps\n   - Click \"Create an app\"\n   - Set up the required permissions:\n     - Products: Read and write\n     - Collections: Read and write\n     - Inventory: Read and write\n\n2. Configure your `.env` file with the following credentials:\n```env\nSOURCE_SHOPIFY_STORE=source-store.myshopify.com\nDESTINATION_SHOPIFY_STORE=destination-store.myshopify.com\nSOURCE_ADMIN_KEY=your_source_admin_api_access_token\nDESTINATION_ADMIN_KEY=your_destination_admin_api_access_token\n```\n\n## Usage\n\n### Basic Usage\n\n1. Run tests to ensure everything is set up correctly:\n```bash\nmake test\n```\n\n2. Start the migration:\n```bash\nmake migrate\n```\n\n### Advanced Usage\n\nYou can also use the package programmatically in your Python code:\n\n```python\nimport asyncio\nfrom shopify_migration import ShopifyClient, migrate_products\n\nasync def main():\n    # Initialize clients\n    source_client = ShopifyClient(\n        store_url=\"source-store.myshopify.com\",\n        admin_key=\"your_source_admin_key\"\n    )\n    \n    dest_client = ShopifyClient(\n        store_url=\"destination-store.myshopify.com\",\n        admin_key=\"your_destination_admin_key\"\n    )\n    \n    # Start migration\n    await migrate_products(source_client, dest_client)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n## Migration Process\n\n1. **Validation**: The tool first validates the credentials for both stores.\n2. **Product Retrieval**: Fetches all products from the source store.\n3. **SKU Matching**: For each product:\n   - Checks if a product with the same SKU exists in the destination store\n   - Updates existing products or creates new ones as needed\n4. **Collection Migration**: After products are migrated:\n   - Retrieves collection associations from the source store\n   - Creates missing collections in the destination store\n   - Associates products with their collections\n\n## Error Handling\n\n- The tool includes comprehensive error handling and logging\n- Failed operations are logged with detailed error messages\n- Progress is tracked and displayed in real-time\n- The migration can be safely interrupted and resumed\n\n## Development\n\n### Running Tests\n\n```bash\nmake test\n```\n\n### Clean Build Files\n\n```bash\nmake clean\n```\n\n## Dependencies\n\nKey dependencies used in this project:\n\n- [httpx](https://www.python-httpx.org/) - Async HTTP client\n- [python-dotenv](https://github.com/theskumar/python-dotenv) - Environment variable management\n- [rich](https://rich.readthedocs.io/) - Terminal formatting and progress display\n\n## Documentation References\n\n- [Shopify Admin API Reference](https://shopify.dev/api/admin-rest)\n- [Shopify Admin API: Products](https://shopify.dev/api/admin-rest/2024-01/resources/product)\n- [Shopify Admin API: Collections](https://shopify.dev/api/admin-rest/2024-01/resources/collection)\n- [uv Documentation](https://github.com/astral-sh/uv)\n- [httpx Documentation](https://www.python-httpx.org/)\n- [rich Documentation](https://rich.readthedocs.io/)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclouddev777%2Fshopify_product_migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclouddev777%2Fshopify_product_migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclouddev777%2Fshopify_product_migration/lists"}