Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prelude-parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prelude-parser

Parses XML files exported from Prelude EDC into formats usable by Python.

  • 0.12.0
  • PyPI
  • Socket score

Maintainers
1

Prelude Parser

Tests Status pre-commit.ci status Coverage PyPI version PyPI - Python Version

Parses XML files exported from Prelude EDC into formats Python can use.

Installation

pip install prelude-parser

Optionally the pandas extra can be installed to parse to a Pandas DataFrame

pip install prelude-parser[pandas]

Optionally the polars extra can be installed to parse to a Polars DataFrame

pip install prelude-parser[polars]

All extras can be install with

pip install prelude-parser[all]

Usage

Parse a Prelude flat XML file to a Python dictionary.

from prelude_parser import parse_to_dict
data = parse_to_dict("physical_examination.xml")

Parse a Prelude flat XML file into a list of Python class. The name of the class is taken from the form name node in the XML file converted to pascal case. For example a <physical_examination> node will result in a PhysicalExamination class being created.

from prelude_parser import parse_to_classes
data = parse_to_classes("physical_examination.xml")

Parse a Prelude flat XML file into a Pandas DataFrame. This works for Prelude flat XML files that were exported with the "write tables to seperate files" option. In order to use this option prelude-parser either needs to be installed with the pandas extra or the all extras.

from prelude_parser.pandas import to_dataframe
df = to_dataframe("physical_examination.xml")

Parse a Prelude flat XML file into a Polars DataFrame. This works for Prelude flat XML files that were exported with the "write tables to seperate files" option. In order to use this option prelude-parser either needs to be installed with the polars extra or the all extras.

from prelude_parser.polars import to_dataframe
df = to_dataframe("physical_examination.xml")

Contributing

Contributions to this project are welcome. If you are interesting in contributing please see our contributing guide

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc