Skip to main content

Ilum job python API

Project description

Ilum Job API Python Package

PyPI - Python Version License

This package provides an interface for interacting with Ilum's Job API using Python. With this package, you can create your own interactive spark job.

Installation

Use pip to install the ilum-job-api package:

pip install ilum-job-api

Usage

Here's a simple example of how to use it:

from ilum.api import IlumJob
from random import random
from operator import add


class SparkPiInteractiveExample(IlumJob):

    def run(self, spark, config):
        partitions = int(config.get('partitions', '5'))
        n = 100000 * partitions

        def f(_: int) -> float:
            x = random() * 2 - 1
            y = random() * 2 - 1
            return 1 if x ** 2 + y ** 2 <= 1 else 0

        count = spark.sparkContext.parallelize(range(1, n + 1), partitions).map(f).reduce(add)

        return "Pi is roughly %f" % (4.0 * count / n)

For more detailed usage instructions, see our Documentation and API Reference.

License

This project is licensed under the terms of the Apache License 2.0.

Contact

If you have any issues or feature requests, please create an idea on our board. For general questions or discussions, post a question here.

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

ilum_job_api-6.7.2rc3.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ilum_job_api-6.7.2rc3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file ilum_job_api-6.7.2rc3.tar.gz.

File metadata

  • Download URL: ilum_job_api-6.7.2rc3.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ilum_job_api-6.7.2rc3.tar.gz
Algorithm Hash digest
SHA256 a03ee2785fc154e8683414525ebee77654e252a7c317ec30dcdcfb06b2f00ee5
MD5 38d9736b9734302a3b09b760e5e5406a
BLAKE2b-256 1b775d01713f7954492bb3e5c8a8b8b560bc1bc7625beb5d9e62a2d72b5649e5

See more details on using hashes here.

File details

Details for the file ilum_job_api-6.7.2rc3-py3-none-any.whl.

File metadata

  • Download URL: ilum_job_api-6.7.2rc3-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ilum_job_api-6.7.2rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 c6938e6eb4cf19eae24c211120517157dfab333956eb57ff84c25516e3c9aa3f
MD5 f0771eb03f665727e5873fa1ca346bb3
BLAKE2b-256 257fc31c7b31ae831d0d11cb8de3171f33a9166c47b16fb66f2bef0c5c6300e5

See more details on using hashes here.

Supported by

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