Marketplaces Scripts
Marketplaces Documentation
7min
this section of the documentation explains how data is transferred from us to various marketplaces there are two distinct methods for listing data ftp and api for marketplaces that utilize the ftp file upload method, their code has been consolidated to avoid code duplication on the other hand, for marketplaces that employ the api method, their code remains separate because it is primarily used to interact with the marketplace’s api marketplaces that use the ftp method are fruugo kaufland secret sales api method onbuy spartoo given that the code is consolidated into a single repository for all marketplaces, we'll address the installation and prerequisites in this section any new marketplace should be added to this repository however, each client should maintain their own repository installation clone the repository and install the dependencies git clone https //github com/e mps co uk/tower marketplaces cd tower marketplaces python3 m venv venv source venv/bin/activate pip install r requirements txt create a env file and add the get the keys from the various marketplaces needed, ftp credentials, and remote database credentials \# database db = usernamedb = password = server ip = host = \# ftp ftpusername = ftphost = ftppassword = port = \# marketplaces running the script the script accommodates various marketplaces, and the execution process varies accordingly for marketplaces where files are uploaded to an ftp location, a single script manages them due to a similar process conversely, marketplaces that use api based listing have distinct script files to handle their unique operations code structure ├── license ├── readme md ├── init py ├── config ini ├── main py ├── marketplaces │ ├── init py │ ├── config py │ ├── ftp marketplaces py │ ├── logger py │ ├── main scripts │ │ ├── init py │ │ ├── ftp config py │ │ └── get data py │ ├── onbuy │ │ ├── init py │ │ ├── auth │ │ │ ├── init py │ │ │ └── auth py │ │ ├── get onbuy data py │ │ ├── list products py │ │ └── payload generate py │ ├── onbuy main py │ ├── spartoo │ │ ├── enums │ │ │ ├── init py │ │ │ └── spartoocodes py │ │ └── spartoo api py │ ├── spartoo main py │ └── sql scripts │ ├── init py │ ├── fruugo sql py │ ├── kaufland offerssql py │ ├── kaufland productssql py │ ├── onbuy sql py │ ├── secretsales offerssql py │ ├── secretsales productssql py │ └── spartoo sql py ├── pyproject toml ├── requirements txt ├── tests │ ├── init py │ ├── test ftpconfig py │ ├── test getdata py │ └── test spartoo py └── tox ini sql scripts to obtain the necessary data, we rely on sql scripts to extract information from the database these scripts are intricate and require substantial disk space for optimal performance proficiency in postgresql is essential for writing and executing these scripts effectively now, let's explore the code structure and the common functions used across this codebase for a detailed explanation of how the code functions, please refer to the following documentation handling marketplaces data and ftp operations docid 5kvrxzan8gdvckqv4pl lspartoo web service integration docid\ qjp97eajgt1ryz1jctg5donbuy api docid 64p2vz 2u gde5gcyam o