semvec/pypi-packages huggingface dataset:
pyquetmsMS 0.1.1
Memory-efficient mzML to Parquet converter for mass spectrometry files
License: MIT
Requires Python: >=3.8
Keywords: mass spectrometry, mzML, parquet, proteomics, metabolomics

# pyquetms

Memory-efficient mzML to Parquet converter for mass spectrometry files.

## Overview

pyquetms provides streaming conversion of mzML files to Parquet format with minimal memory usage, making it suitable for processing large mass spectrometry datasets without running out of memory. This project was originally developed as a side project inspired by GSoC 25' with OpenMS, with the goal of providing a simple CLI for converting .mzML to .parquet files, which is especially important in big data projects (e.g., machine learning).

## Installation

### From PyPI

```bash
pip install pyquetms
```

### From source

```bash
git clone https://github.com/Avni2000/pyquetms.git
cd pyquetms
pip install .
```

### Development installation

```bash
git clone https://github.com/Avni2000/pyquetms.git
cd pyquetms
pip install -e ".[dev]"
```

## Usage

### CLI

Basic conversion:
```bash
pyquetms input.mzML
```
or
```bash
pyquetms ~/Downloads/input.mzML
```

Specify output file (defaults to working directory):
```bash
pyquetms input.mzML -o output.parquet
```

Customize batch size and compression. I recommend :
```bash
pyquetms input.mzML --batch-size 5000 --compression gzip
```

Get file information without converting:
```bash
pyquetms input.mzML --info
```

## Output Format

The converted Parquet files contain the following columns:

Depending on the type of mzml file, we have slightly different columns. 
Some columns may be blank, which is perfectly okay! It doesn't mean your mzml is wrong. 
The main expected values are time, m/z, and intensity

## Contributions

It's quite a small project, feel free to make a PR or open an issue!
llhttp 9.3.0.0
llhttp in python
License: MIT
Keywords: www http parser

# pyllhttp
Python wrapper for llhttp
======

A simple Python wrapper around [llhttp](https://github.com/nodejs/llhttp),
the HTTP parser for [Node.js](https://nodejs.org/).

## Install

[llhttp](https://pypi.org/project/llhttp/) via PyPI, or `pip install llhttp`

## Usage

```python
import llhttp
from pprint import pprint

pprint({"version": llhttp.version})

class request_parser(llhttp.Request):
    headers = {}

    url = b''
    current_header_field = None
    current_header_value = None

    def on_message_begin(self):
        print(f"MESSAGE BEGIN")

    def on_url(self, url):
        self.url += url
        self.pause()

    def on_url_complete(self):
        print(f"URL {self.url}")

    def on_header_field(self, field):
        assert self.current_header_value is None
        if self.current_header_field is None:
            self.current_header_field = bytearray(field)
        else:
            self.current_header_field += field

    def on_header_field_complete(self):
        self.current_header_field = self.current_header_field.decode('iso-8859-1').lower()
        assert self.current_header_field not in self.headers

    def on_header_value(self, value):
        assert self.current_header_field is not None
        if self.current_header_value is None:
            self.current_header_value = bytearray(value)
        else:
            self.current_header_value += value

    def on_header_value_complete(self):
        assert self.current_header_field is not None
        self.current_header_value = bytes(self.current_header_value)
        print(f"HEADER {self.current_header_field}: {self.current_header_value}")
        self.headers[self.current_header_field] = self.current_header_value
        self.current_header_field = None
        self.current_header_value = None

    def on_headers_complete(self):
        assert self.current_header_field is None
        assert self.current_header_value is None

    def on_message_complete(self):
        print("MESSAGE COMPLETE")

parser = request_parser()

assert parser.lenient_headers is not True
parser.lenient_headers = True
parser.reset()
assert parser.lenient_headers is True

buffer = b"GET /test HTTP/1.1\r\nlOl:wut\r\nOH: hai\r\n\r\n"
while buffer:
    consumed = parser.execute(buffer[:2])
    buffer = buffer[consumed:]
    if parser.is_paused:
        print("UNPAUSING")
        parser.unpause()

parser.finish()
pprint({
    "method": parser.method,
    "url": parser.url,
    "version": f"{parser.major}.{parser.minor}",
    "headers": parser.headers,
})
```

```
{'version': '9.3.0'}
MESSAGE BEGIN
UNPAUSING
UNPAUSING
UNPAUSING
URL b'/test'
HEADER lol: b'wut'
HEADER oh: b'hai'
MESSAGE COMPLETE
{'headers': {'lol': b'wut', 'oh': b'hai'},
 'method': 'GET',
 'url': b'/test',
 'version': '1.1'}
```

## Extra

This project is a toy, started to reacquaint myself with Python
[c-api](https://docs.python.org/3/c-api/) modules.  If you find it useful,
please let me know.

The version number tracks the version of the incorporated llhttp.

License: [MIT](https://opensource.org/licenses/MIT)
PyquetMS 0.1.0
Memory-efficient mzML to Parquet converter for mass spectrometry files
License: MIT
Requires Python: >=3.8
Keywords: mass spectrometry, mzML, parquet, proteomics, metabolomics

# Pyquet

Memory-efficient mzML to Parquet converter for mass spectrometry files.

## Overview

Pyquet provides streaming conversion of mzML files to Parquet format with minimal memory usage, making it suitable for processing large mass spectrometry datasets without running out of memory. This project was originally developed as a side project inspired by GSoC 25' with OpenMS, with the goal of providing a simple CLI for converting .mzML to .parquet files, which is especially important in big data projects (e.g., machine learning).

## Installation

### From PyPI

```bash
pip install pyquet
```

### From source

```bash
git clone https://github.com/Avni2000/pyquet.git
cd pyquet
pip install .
```

### Development installation

```bash
git clone https://github.com/Avni2000/pyquet.git
cd pyquet
pip install -e ".[dev]"
```

## Usage

### CLI

Basic conversion:
```bash
pyquet input.mzML
```
or
```bash
pyquet ~/Downloads/input.mzML
```

Specify output file (defaults to working directory):
```bash
pyquet input.mzML -o output.parquet
```

Customize batch size and compression. I recommend :
```bash
pyquet input.mzML --batch-size 5000 --compression gzip
```

Get file information without converting:
```bash
pyquet input.mzML --info
```

## Output Format

The converted Parquet files contain the following columns:

Depending on the type of mzml file, we have slightly different columns. 
Some columns may be blank, which is perfectly okay! It doesn't mean your mzml is wrong. 
The main expected values are time, m/z, and intensity

## Contributions

It's quite a small project, feel free to make a PR or open an issue!