Skip to main content

A Rust library and Python extension for reading and converting configuration files (TOML, YAML, JSON, XML) into Python dictionaries or vice versa. Powered by PyO3.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

config_lang_serder

A Rust library and Python extension for reading and converting configuration files (TOML, YAML, JSON, XML) into Python dictionaries and vice versa. Powered by PyO3, this project enables seamless integration of Rust's performance with Python's usability for configuration management.

Features

  • Read and parse TOML, YAML, JSON, and XML (not fully supported yet) files
  • Unified API: Returns configuration as a Python dict regardless of format
  • High performance: Leverages Rust for fast parsing
  • Python bindings: Easily callable from Python via PyO3
  • Write Python dict to TOML, YAML, or JSON file

Installation

by PyPI

uv pip install config-lang-serder
# or
pip install config-lang-serder

from source (via maturin or setuptools-rust)

Build and install with maturin:

maturin develop

Or build a wheel:

maturin build
pip install target/wheels/config_lang_serder-*.whl

Usage

Python

import config_lang_serder

# Read: Automatically detects file type by extension
config = config_lang_serder.read('config.yaml')
print(config)

# Write: Automatically detects file type by extension
config_lang_serder.write({'foo': 123, 'bar': True}, 'config.yaml')

Current supported extensions: .toml, .yaml, .json, .xml (read), .toml, .yaml, .json (write)

API

  • read(path: str) -> dict: Reads a config file and returns its contents as a Python dict. Supported extensions: toml, yaml, json, xml.
  • write(dict: dict, path: str) -> None: Writes a Python dict to a file. The format is determined by the file extension (supports: toml, yaml, json).

Development

  • Rust code in src/
  • Python bindings via PyO3
  • Tests in test.py and tests/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

config_lang_serder-0.1.1.tar.gz (20.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

config_lang_serder-0.1.1-cp310-abi3-win_amd64.whl (490.8 kB view details)

Uploaded CPython 3.10+Windows x86-64

config_lang_serder-0.1.1-cp310-abi3-win32.whl (472.2 kB view details)

Uploaded CPython 3.10+Windows x86

config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl (861.7 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_i686.whl (899.1 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_armv7l.whl (949.0 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl (859.1 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (691.5 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (767.2 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ s390x

config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (857.2 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64le

config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (686.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (679.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

config_lang_serder-0.1.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl (742.7 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.5+ i686

config_lang_serder-0.1.1-cp310-abi3-macosx_11_0_arm64.whl (624.4 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

config_lang_serder-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl (643.3 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file config_lang_serder-0.1.1.tar.gz.

File metadata

  • Download URL: config_lang_serder-0.1.1.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.6

File hashes

Hashes for config_lang_serder-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9e796d169e910ae04439495c3881502d096e16764fe423e9091ccd88be33c2d6
MD5 0c05f2360315cae1246903921d0999cf
BLAKE2b-256 6ad994e134ce16453fb72c95a69c4ff9e5c3a40bddf5d37199a61f9bf96d9296

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 46f4389ec7738ba53f87ae8823aba89017af82969cc027077dd05bf7586b1ff8
MD5 830f6f906a478b107aa30c43bf2ebc2a
BLAKE2b-256 40a692d944590757515a87da60103c68c894fd2793e2f656a4d7b2bccd4e0937

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-win32.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 f07c5f4160a4c0a75e734e5a0d44d9c658a76bdc188deb8dc960ed876ed96002
MD5 82a2d02e0dafa93e751ce5c500cfac8c
BLAKE2b-256 d6754c891121aa4fa0bcd1e5643a82908967057614fd43bd0d6848f21527f5cc

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 197acfbb8c4f9d9a10b3e439b2eb1891637ff49d63a0d8ba58f8ae277c47c4d0
MD5 553428fd7129f88adcceb95bdbf30cd8
BLAKE2b-256 34dc090c2b881f3645dfbe158267bed8334f4b647d14a3a2082be6fbd9fa1cd4

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 278dc6626553b4fa33d51f2673448e3f7969436a8eb46b508ddc49f98a326263
MD5 30e8d155960502244ffa17e2e8801b19
BLAKE2b-256 276b4f00a8b51d3bbc85dfd5e07930e06fb0084109f8e2eab323acbd0f8e562f

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 2dcbfc1a00422615a29b760ed7ff9ea11fef9bd680724904fea88b88af75387b
MD5 ba70c5ccc950c2b8eff8281208d79d57
BLAKE2b-256 bbff00e71c47daf9274a3087dac5127b3f3156d6e28c5d6691e29bd380c7d824

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e810ac11479e586eba0b2a4d8c03e3fddcce72df9c640c0d88f8df3c8c852104
MD5 7c7c04f9af285179ae3de5651d6177c3
BLAKE2b-256 5ffc9b415e87f7d673abd6d272b77a7b8d48cd8a73c7d4a3d125242b8a01c243

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 535876efe414c7a69225425834c3d90026f50bac37f7cb48b15cf75f5ff231c9
MD5 eeb4d4e99fcd0b8e2cf750a34f22b026
BLAKE2b-256 65c47846f53ffca2db63447f453e427f5e2b62ffa89eadd335a890c7502bfe3a

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 6913147fe35eb567bee988da33cd14821731028194aa6c911cee5545f7e24051
MD5 6c8e3f7e0b6aa3b71a6e20a3e94418da
BLAKE2b-256 71dbfdc28553997af311dd8eb1d31b56d0664e5770b568ee4be5aa01f22ee99f

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 4b3ec013ca457da272f2a090417491fa23af278ee19f1b20c666f9f6b716eeb7
MD5 cbf7985f327eaadaaee84079ef739020
BLAKE2b-256 267ee43487a2f994c3dbc99a63992444720e808bcdb4f5b2ec39a7dffa6d023f

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 94ec8eafa1bf268240326949de00514b4893683061a3cd1732d061b63f10cae3
MD5 536f333da16ee9c1e733c0bcc7fcaef0
BLAKE2b-256 f84e6a46b130be81c64323d7749cf4c5117ed817dc3ffc47ccfe599bced3c567

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a9621bbab3ab19ff08e46341fb822f56b0b74559e81ed397183bbb47375f9e5a
MD5 841473ce108d43c7658cd3e0e68aa2d2
BLAKE2b-256 f4c2c58a38edaf290930bb07954b8bc3aafd335dd1bfbdd55d9444470cf14013

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 3071c4849ce6404509968d54dbb8d37fdee5323f59a26fdbc79c0781e6e32654
MD5 225aade118d829a4eea846906109b20e
BLAKE2b-256 d183e5770d268c38cf46cdf3c1b34e8fcf00e5b468e6c7b0dc14f3aa3aaf0e90

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 351b7d3489d26e22a9dd1ce544217e6471075f5c83d8bdaca381127e81a348d0
MD5 7c59c7137b8d27fb6ef425578aa72201
BLAKE2b-256 6aca07caac73dd5e57920ef8d64168d38f23a05b951fb186b02eb7de02befdfb

See more details on using hashes here.

File details

Details for the file config_lang_serder-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for config_lang_serder-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 437ec8cf2cd98e156e5cff860f071a4cbdc75cace3134cf9fde3e38a86f29f86
MD5 c742791606435b3d4a75e15aae68c9c5
BLAKE2b-256 d160f61c03e73d6774a9a0858a4b5ab819c8bb824ee168e3eefb81e45e7b9483

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page