Skip to content

Instantly share code, notes, and snippets.

View arpit1997's full-sized avatar
💭
What's happening

Arpit Solanki arpit1997

💭
What's happening
View GitHub Profile
@arpit1997
arpit1997 / airflow_setup.sh
Last active July 25, 2019 16:52
Airflow setup
# 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
@arpit1997
arpit1997 / __init__.py
Last active July 25, 2019 16:24
__init__.py
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,
@arpit1997
arpit1997 / tasks.py
Last active July 25, 2019 15:22
tasks.py
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
@arpit1997
arpit1997 / spam.txt
Created September 9, 2016 15:32
answer this
hello world