Skip to main content

Hkube Python Api

Project description

HKUBE local python api

api implementation for running and debugging Hkube`s pipeline without installing Hkube

prerequisite

  • install hkubectl
# Check release page for latest version
os = "linux/macos/windows"
curl -Lo hkubectl https://github.com/kube-HPC/hkubectl/releases/download/$(curl -s https://api.github.com/repos/kube-HPC/hkubectl/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')/hkubectl-{linux/macos/windows} \
&& chmod +x hkubectl \
&& sudo mv hkubectl /usr/local/bin/
  • run hkubectl dry-run start

usage

import asyncio
from lib.builder import Builder


def test1(data):
    print(data['input'])
    return data['input']


class runBuilder():

    async def run():
        build = Builder()
        pipe = await build.createPipeline("test")
        pipe.algorithm("test").input(5).add(test1).algorithm(
            'test2').input("@test").add(test1).execute()


bla = asyncio.run(runBuilder.run())
print('finish')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hkube.debbuging-python-api-0.0.3.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page