Skip to main content

Utilities to work with Scala/Java code with py4j

Project description

Version_Status Travis Conda_Forge Docs

A set of compatibility routines for making it easier to interact with Scala from Python.

Occasionally Python-focused data shops need to use JVM languages for performance reasons. Generally this necessitates throwing away whole repositories of Python code and starting over or resorting to service architectures (e.g., Apache thrift) which increase system complexity.

You don’t have to.

Using py4j and Spylon you can readily interact with Scala code for more performance critical sections of your code whilst leaving the rest unmodified.

Alternatively you can use it as a bridge to allow building wrappers for a Scala/Java codebase.

Installation

Spylon can be installed either from pip or conda-forge.

When installing from pip and the desire is to use it with Apache Spark, you should run

` pip install spylon[spark] `

Usage

The simplest way to use spylon is to use it to help with writing PySpark jobs. If you want to supply your own jars to load for usage as Spark user defined functions, you’d want to supply the jar with the udf implementation to spark via spark-submit.

For an easier interactive experience you can make use of the supplied Apache Spark launcher to make it simpler to instantiate a PySpark application from inside a python Jupyter notebook.

Extensions

Spylon is designed as an easy to extend toolkit. Since Apache Spark is a major user or Py4J, some special use cases have been implemented for that and its an example of some use cases for Spylon.

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

spylon-0.2.10.tar.gz (91.9 kB view details)

Uploaded Source

File details

Details for the file spylon-0.2.10.tar.gz.

File metadata

  • Download URL: spylon-0.2.10.tar.gz
  • Upload date:
  • Size: 91.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for spylon-0.2.10.tar.gz
Algorithm Hash digest
SHA256 776643a622b85f6cca65f7e67c8517b8d1e39d540079c17c2a575c9df3dbdf58
MD5 4602c66d52248f35fec05371ed04659d
BLAKE2b-256 f9c7e23c9d32ac187b8721ee9e3e795848b039c9b13114cfe2dd4e931d36eda0

See more details on using hashes here.

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