This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import json | |
import slack | |
from xplenty import XplentyClient | |
ACCOUNT_ID = os.getenv('ACCOUNT_ID') # Your account ID | |
API_KEY = os.getenv('API_KEY') # Your account's API Key | |
SLACK_TOKEN = os.getenv('SLACK_TOKEN') # Slack Token for sending alerts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow import DAG | |
from airflow.operators.python_operator import PythonOperator | |
from datetime import datetime | |
from .tasks import run_package, send_slack_alert | |
default_args = { | |
'owner': 'airflow', | |
'depends_on_past': False, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a virtual environment and activate it | |
virtualenv -p python3 xplenty_venv | |
source xplenty_venv/bin/activate | |
# Install Airflow and XPlenty Python Client | |
pip install apache-airflow==1.10.3 xplenty requests slackclient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello world |