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

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-6.6.0.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-6.6.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file ilum-6.6.0.tar.gz.

File metadata

  • Download URL: ilum-6.6.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for ilum-6.6.0.tar.gz
Algorithm Hash digest
SHA256 2c1833de577ec7721e73e0084d7498cce989125728d26ec26ca218c7016ea461
MD5 c67ba6742a0ade1b4f04c0ccd1ad1416
BLAKE2b-256 6b343d28b3c8f320bb869461702562f473819a6d1a1c96d061dfc8f070fca90b

See more details on using hashes here.

File details

Details for the file ilum-6.6.0-py3-none-any.whl.

File metadata

  • Download URL: ilum-6.6.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for ilum-6.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d99a0cad93cd5ccdbeb482fc09359aa44cb8b223b88893b1b88e2a307e16aca1
MD5 ea64b302c60dbd1882f41083e7ed719f
BLAKE2b-256 c094f1d383f0001db2f02bd31b87d63f5bcc62f8e2f1c2c6393e7b694e38cded

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