Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Python API for Pathling

This is the Python API for Pathling. It currently supports encoding of FHIR JSON bundles and NDJSON into Apache Spark dataframes.

Installation

Prerequisites:

  • Python 3.8+ with pip
  • PySpark 3.1+

To install, run this command:

pip install pathling  

Usage

The code below shows an example of using the Pathling API to encode Patient resources from FHIR JSON bundles:

from pyspark.sql import SparkSession
from pathling.r4 import bundles
from pathling.etc import find_jar

spark = SparkSession.builder \
    .appName('pathling-test') \
    .master('local[*]') \
    .config('spark.jars', find_jar()) \
    .getOrCreate()
        
json_bundles = bundles.load_from_directory(spark, 'examples/data/bundles/')
patients = bundles.extract_entry(spark, json_bundles, 'Patient')
patients.show()

More usage examples can be found in the examples directory.

Development setup

Create an isolated python environment with Miniconda, e.g:

conda create -n pathling-dev python=3.8
conda activate pathling-dev

Prerequisites:

  • maven (Ubuntu 20.04: apt install maven)
  • java (Ubuntu 20.04: apt install default-jdk)
  • make (Ubuntu 20.04: apt install make)

To run the tests and install the package, run this command from the project root:

mvn install -pl lib/python -am

Pathling is copyright © 2018-2022, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. Licensed under the CSIRO Open Source Software Licence Agreement.

Release files for pathling 5.0.2.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pathling 5.0.2.dev1
File Size Uploaded
pathling-5.0.2.dev1.tar.gz 19.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pathling 5.0.2.dev1
File Interpreter ABI Platform
pathling-5.0.2.dev1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 39.1 MB

Release files / pathling-5.0.2.dev1.tar.gz

Download URL pathling-5.0.2.dev1.tar.gz
Size 19.6 MB
Tags Source
SHA-256 checksum
How to use checksums
e21e384913fc506cb3515d4e9903a85653a27a56bbf282cab4acd6845ee9a824
BLAKE2b-256 checksum
How to use checksums
079dd965192ca3466521f81bde8f2295b87ab6b7f61184fe9bac5ba1a0357383
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.13

Release files / pathling-5.0.2.dev1-py2.py3-none-any.whl

Download URL pathling-5.0.2.dev1-py2.py3-none-any.whl
Size 19.6 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
134e11f74baf682f0c450672616f2de2fd307779453ae0cbc17fd60cb9650d33
BLAKE2b-256 checksum
How to use checksums
12ae955d66af4450bc9a3623e25c5c7baff58f7116223e827d39fc20df40a555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.13

Release history Release notifications | RSS feed

9.9.0

2 release files

9.8.0

2 release files

9.7.1

2 release files

9.7.0

2 release files

9.6.0

2 release files

9.5.0

2 release files

9.4.0

2 release files

9.3.1

2 release files

9.3.0

2 release files

9.2.0

2 release files

9.1.0

2 release files

9.0.0

2 release files

8.1.0

2 release files

8.0.2

2 release files

8.0.1

2 release files

8.0.0

2 release files

7.2.0

2 release files

7.1.0

2 release files

7.0.1

2 release files

7.0.0

2 release files

6.4.2

2 release files

6.4.1

2 release files

6.4.0

2 release files

6.3.1

2 release files

6.3.0

2 release files

6.2.3

2 release files

6.2.2

2 release files

6.2.1

2 release files

6.2.0

2 release files

6.1.4

2 release files

6.1.3

2 release files

6.1.2

2 release files

6.1.1

2 release files

6.1.0

2 release files

6.0.4

2 release files

6.0.3

2 release files

6.0.2

2 release files

6.0.1

2 release files

6.0.0

2 release files

5.4.0

2 release files

5.3.2

2 release files

5.3.1

2 release files

5.3.0

2 release files

5.2.0

2 release files

5.1.1

2 release files

5.1.0

2 release files

This release

5.0.2.dev1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page