Skip to main content

MOdule LOader for SPark

Project description

molosp

MOdule LOader for SPark - A utility package for dynamically loading Python modules from S3 into AWS Glue/Spark jobs.

Installation

pip install molosp

Usage

from molosp.loader import load_external_module

# Load a module from S3 into your Spark job
module = load_external_module(
    spark_context=sc,
    helper_module_s3_url="s3://my-bucket/path/to/module.py",
    module_name="my_module"
)

# Use the loaded module
module.some_function()

Features

  • Dynamic Module Loading: Download and import Python modules from S3 at runtime
  • Spark Integration: Automatically adds modules to SparkContext PyFiles
  • Automatic Path Management: Handles sys.path configuration for imported modules

Development

# Install with dev dependencies
pip install -e .[dev]

# Run tests
PYTHONPATH=src python -m unittest discover tests

License

MIT License - See LICENSE file for details.

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

molosp-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

molosp-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file molosp-0.1.1.tar.gz.

File metadata

  • Download URL: molosp-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for molosp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 547997c65fa89f5f70441331636ca50046b6ce8fec80b087b3c153bba80af2b0
MD5 75b4db0a8bbd3e26958d623c2548f76a
BLAKE2b-256 ec2a1c1bbf7ce2cb6f04b28b8bd8dea8fac91cb6fdc9e30a0ff7b6db72123b32

See more details on using hashes here.

File details

Details for the file molosp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: molosp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for molosp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13acebc7f16a6e93c9b5a02d82c4c743ace93b0741f9c81cd8c4b5c751d275be
MD5 8e898225a63e8c336275801dc7a86c77
BLAKE2b-256 afe34d230d793f8db57a56f7a24b5469443da82524aedbb64e62e92bde4e5e68

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