Skip to main content

GitHub release; latest by date GitHub Release Date Test Status Documentation Status Code coverage
PyPI - Version PyPI - Format PyPI - Downloads PyPI - Python Version
GitHub commits since latest release GitHub commit activity GitHub last commit
Number of GitHub open issues Number of GitHub closed issues Number of GitHub open pull requests Number of GitHub closed pull requests
GitHub License Number of GitHub stars GitHub forks

Introduction

pdstable contains a class, PdsTable, that can read PDS3 or PDS4 labels and their associated tables.

pdstable is a product of the PDS Ring-Moon Systems Node.

Installation

The pdstable module is available via the rms-pdstable package on PyPI and can be installed with:

pip install rms-pdstable

Getting Started

The pdstable module provides the PdsTable class, which can be used to read both PDS3 (.lbl) and PDS4 (.lblx or .xml) labels and their associated tables. A PdsTable object can be created easily:

from pdstable import PdsTable
p3 = PdsTable('label_filename.lbl')  # PDS3 label and table
p4 = PdsTable('label_filename.xml')  # PDS4 label and table

Once created, the PdsTable object has properties that can be used to access the contents of the table. Columns of values are represented by NumPy arrays.

rows = p3.rows  # The number of rows
columns = p3.columns # The number of columns
col_vals = p3.get_column("FILE_SPEC")  # All values in the FILE_SPEC column
col_mask = p3.get_column_mask("FILE_SPEC")  # The mask of invalid values

The entire table can be returned as a series of dictionaries, one per row. The dictionary keys are the names of the columns:

as_dicts = p3.dicts_by_row()

PDS3 labels can only point to a single table. However, PDS4 labels can point to multiple tables. If multiple tables are present in the label, you must specify which table you want to read. This can be done using an integer index or specifying a filename or regular expression:

p4 = PdsTable('multi_table_label.xml', table_file=3)  # Load the 3rd table
p4 = PdsTable('multi_table_label.xml', table_file='.*summary_index.*')

A wide variety of other features are available, many of which are designed to increase performance. These include:

  • Specifying a subset of columns to parse.
  • Reading only a subset of rows.
  • Using a faster but less rigorous label parser for PDS3 labels.
  • Searching for rows with a specific volume or bundle name and/or file specification.

Full details can be found in the module documentation.

Contributing

Information on contributing to this package can be found in the Contributing Guide.

Links

Licensing

This code is licensed under the Apache License v2.0.

Metadata

Release files for rms-pdstable 1.0.3

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

Source distribution (sdist)

Source distribution for rms-pdstable 1.0.3
File Size Uploaded
rms_pdstable-1.0.3.tar.gz 1.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for rms-pdstable 1.0.3
File Interpreter ABI Platform
rms_pdstable-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / rms_pdstable-1.0.3.tar.gz

Download URL rms_pdstable-1.0.3.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
5cfc8275464fac986829bdd87b9904157d0d1a0b732b0bb923048113d91cdf9d
BLAKE2b-256 checksum
How to use checksums
b46f2446dc9f416fa5e377970a58226072bfb3699aeb828347fcdd4c499cb982
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / rms_pdstable-1.0.3-py3-none-any.whl

Download URL rms_pdstable-1.0.3-py3-none-any.whl
Size 29.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57180dfba8adeeebca8a28fab68056780cc290e77ff3b4ea7b8d13326420a05e
BLAKE2b-256 checksum
How to use checksums
50c1d787e63fd7aa8286a4a79ab0579424cf7bcbba5c0bf07a6212fec3b3a0a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

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