This Python project automates the extraction of orders with status 2 from the eMAG Marketplace API. For each order, it generates an AWB (shipping label) and uploads it to a specified SFTP server.
- Python
- requests
- dotenv
- paramiko
- datetime
main.pyβ the main script for processing and uploading AWBs.env.exampleβ sample environment variables fileREADME.mdβ project documentation
- Clone this repository:
git clone https://github.com/YOUR_USERNAME/emag-awb-generator.git
cd emag-awb-generator- Create a
.envfile based on.env.exampleand fill in your credentials:
EMAG_USERNAME=[email protected]
EMAG_PASSWORD=your_password
SFTP_HOST=ftp.example.com
SFTP_PORT=8573
SFTP_USERNAME=username
SFTP_PASSWORD=password
SFTP_UPLOAD_DIR=AWB_EMAG- Install dependencies:
pip install requests python-dotenv paramiko- Run the script:
python main.py- Do not commit your
.envfile to version control. - Make sure
.gitignorecontains.env
Personal project, not for commercial use.