def main():
    mitto = Mitto(
        base_url=BASE_URL,
        api_key=API_KEY
    )
    job_schedule = mitto.update_job_schedule(job_id=JOB_ID, job_schedule=SCHEDULE)
    print(job_schedule)
Example #2
0
def main():
    mitto = Mitto(
        base_url=BASE_URL,
        api_key=API_KEY
    )
    job_webhook = mitto.create_job_webhook(job_id=JOB_ID, job_hook=WEBHOOK)
    print(job_webhook)
Example #3
0
def main():
    # set up Jinja
    template_env = Environment(loader=FileSystemLoader(INPUT_DIRECTORY))
    template = template_env.get_template(TEMPLATE_FILE)

    # set up Mitto
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)

    # create a Mitto job for each Jinja job template
    for job in MITTO_JOBS:
        jinja_template = template.render(job_name=job["name"],
                                         job_title=job["title"],
                                         sql=job["sql"])
        job_template = json.loads(jinja_template)
        job = mitto.create_job(job=job_template)
        print(job)
Example #4
0
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)

    job = mitto.create_job(job=JOB)
    print(job)
Example #5
0
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)
    jobs = mitto.get_jobs()
    for job in jobs:
        print(job["id"], job["name"])
Example #6
0
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)
    about = mitto.get_about()
    version = about["version"]
    print(version)
Example #7
0
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)

    updated_job = mitto.update_job_conf(job_id=JOB_ID, job_conf=JOB_CONF)
    print(updated_job)
def main():
    mitto = Mitto(base_url=BASE_URL, api_key=API_KEY)
    job_schedule = mitto.get_job_schedule(job_id=JOB_ID)
    print(job_schedule)