nbase-converter
nbase-converter is a native Rust/Arrow Python package for reading, writing, and converting
SAS7BDAT, SAS XPORT v5/v8, and Parquet datasets.
This is an alpha release. Final Windows SAS 9.4 validation of the production SAS7BDAT writer
remains required before stable 1.0.0 compatibility is declared.
Install
python -m pip install nbase-converter==0.0.3
Python 3.11 through 3.14 is supported on 64-bit Linux, macOS, and Windows.
Example
from nbase_converter import convert_dataset, filter_field, read_dataset, write_dataset
result = read_dataset(
"input.xpt",
columns=["USUBJID", "AGE"],
filter=filter_field("AGE") >= 18,
output="pandas",
)
write_dataset(
result.data,
"output.parquet",
target_format="parquet",
overwrite=True,
)
convert_dataset(
"source.parquet",
"submission.xpt",
target_format="xpt8",
metadata={
"dataset_label": "Adverse Events",
"columns": {
"ASTDT": {
"label": "Analysis Start Date",
"sas": {"format": "IS8601DA", "length": 8},
}
},
},
)
The public dataset operations are:
read_dataset: materialized, streaming, or metadata-only reads with projection, row bounds, encoding selection, and structured filters.write_dataset: Arrow-compatible writes to Parquet, XPT v5/v8, or SAS7BDAT.convert_dataset: bounded-memory full-file conversion with optional supplemental metadata.
For writes and conversions, explicit metadata overrides recognized input metadata while omitted
attributes remain preserved. Supported supplemental attributes are the dataset label and each
column's label, SAS format, informat, and storage length. For string attributes, "" explicitly
clears an inherited value; whitespace-only labels remain literal labels.
Structured filters are created with filter_field, combined with filter_all, filter_any,
or filter_not, and evaluated by these leaf helpers:
- comparisons:
filter_equal,filter_not_equal,filter_less_than,filter_less_than_or_equal,filter_greater_than, andfilter_greater_than_or_equal; - collections and text:
filter_in,filter_between,filter_contains,filter_starts_with, andfilter_ends_with; - missing values:
filter_is_missing,filter_is_not_missing,filter_is_null, andfilter_is_not_null.
Python comparison operators are also available on filter_field(...). Public result and metadata
contracts ship as TypedDict definitions, and the wheel is marked as a typed package.
The default cross-format type policy accepts Float64 and UTF-8 text. Non-null IEEE NaNs are written as standard SAS numeric missing values and reported as coercions. Local filesystem paths are the only supported storage interface in this release.
Source, issues, release notes, and the full contract are available from the Bitbucket repository.
Metadata
Release files for nbase-converter 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nbase_converter-0.0.3.tar.gz | 361.5 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nbase_converter-0.0.3-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| nbase_converter-0.0.3-cp311-abi3-manylinux_2_34_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.34+ x86-64 | Details |
| nbase_converter-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 10.0 MB
Release files / nbase_converter-0.0.3.tar.gz
| Download URL | nbase_converter-0.0.3.tar.gz |
|---|---|
| Size | 361.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd94dedf803471e33118016bc6b68aabe9d9610c99ccebf36412e94d658e06b3
|
|
BLAKE2b-256 checksum How to use checksums |
8aaafd0435c92d34935f0cf85ec701d1a3ffa9a157f1ae29f70f83fe7152796e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / nbase_converter-0.0.3-cp311-abi3-win_amd64.whl
| Download URL | nbase_converter-0.0.3-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4f9b6814821a33c40171fae0eff06a7a5828dd793a6782a4f62de7e0ba9e6d1e
|
|
BLAKE2b-256 checksum How to use checksums |
9e58e4547489709fc3e727c5dcedc6d98e371874e2dd3a5c3c3910e1690479dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / nbase_converter-0.0.3-cp311-abi3-manylinux_2_34_x86_64.whl
| Download URL | nbase_converter-0.0.3-cp311-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0ac31bb8beb1c2994e0618bfa6ceccc152b6bf01c508c1a526ce12a6fe941fee
|
|
BLAKE2b-256 checksum How to use checksums |
5cca206bb9b314f628352b3e803d0c0b2e6a87c71de1d8dcd6cb4422b0f9bc01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / nbase_converter-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | nbase_converter-0.0.3-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
b3a54ddb2b0586d3bc71ab71ccbfa62ef480e84f9e5999539be71adef3e69cba
|
|
BLAKE2b-256 checksum How to use checksums |
3aba74dc73bd07605018cfe1281c2a0ee67df09851512ce2369c19957575c1d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|