Record Convertor
A rule-based record transformation library for Python. Converts input dicts into desired output formats using YAML or dict-based rule configurations. Designed to normalize records of the same data type from different sources into a single validated structure.
Features
Map fields using simple dot-separated string paths for nested access (literal keys, no quoting needed)
Transform field values in-place with 25+ built-in conversion actions (string ops, math, URL cleanup, phone parsing, etc.)
Compute output values with command processors (GeoJSON points, joins, splits, list transforms)
Convert between date formats (Unix timestamps, DD-MM-YYYY, YYYY_MM_DD, etc.)
Run records through Pydantic models or dataclasses with optional method invocation
Conditionally execute rules or skip entire records
Extend with custom field convertors, date formatters, and command classes via protocols
Installation
pip install record-convertor
Quick Start
from record_convertor import RecordConvertorWithRulesDict
rules = {
"name": "item.name",
"brand": "item.brand.name",
"price": "item.price",
}
convertor = RecordConvertorWithRulesDict(rule_dict=rules)
result = convertor.convert({
"item": {
"name": "Widget",
"brand": {"name": "Acme"},
"price": 9.99,
}
})
# {"name": "Widget", "brand": "Acme", "price": 9.99}
Documentation
Full documentation is available at https://record-convertor.readthedocs.io/
License
LGPL-3.0-or-later
Metadata
Release files for record-convertor 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| record_convertor-1.3.0.tar.gz | 28.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| record_convertor-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 77.3 kB
Release files / record_convertor-1.3.0.tar.gz
| Download URL | record_convertor-1.3.0.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adc9bb237f950962e99c547b50126bdcf78f7a32e00ef72e9696f3a4d65a9317
|
|
BLAKE2b-256 checksum How to use checksums |
646c80d80a5332487a63dc5a5a9b81d0b4ef4b2c4792f4108cf3adaeadd89da3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"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":null}
|
Release files / record_convertor-1.3.0-py3-none-any.whl
| Download URL | record_convertor-1.3.0-py3-none-any.whl |
|---|---|
| Size | 48.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d2a33f18bfff2884754d72baf36759121a4b8bc6a3056afdfc4229acd1f9961
|
|
BLAKE2b-256 checksum How to use checksums |
f5d60f9aa82f34f0fbc932b618381c82d5687110538a78d21f21f8f22bbc52e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"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":null}
|