Skip to main content

configparser_rb

Config parser with the ability to obfuscate keys

Write config file

    from configparser_rb import ConfigParserRB

    config=ConfigParserRB("config.ini")
    config.set("Features", "string", "Hi")
    config.set("Features", "boolean", True)
    config.set("Features", "integer", 1)
    config.set("Features", "float", 1.1)
    config.set("Features", "list of strings", ["a", "b"])
    config.set("Features", "list of integers", [1, 2])
    config.set("Features", "decimal", "12.234")
    config.cset("Features", "cstring", "Hi")
    config.save()
    

You get

[Features]
string = Hi
boolean = True
integer = 1
float = 1.1
list of strings = 'a', 'b'
list of integers = 1, 2
decimal = 12.234
cstring = kNI=

Read config file

    config=ConfigParserRB("config.ini")
    assert config.cget("Features", "cstring") == "Hi"
    assert config.get("Features", "string") == "Hi"
    assert config.getBoolean("Features", "boolean") == True
    assert config.getInteger("Features", "integer") == 1
    assert config.getFloat("Features", "float") == 1.1
    assert config.getListOfIntegers("Features", "list of integers") == [1, 2]
    assert config.getList("Features", "list of strings") == ["a", "b"]
    assert config.getDecimal("Features", "decimal") == Decimal("12.234")

Metadata

Release files for configparser_rb 1.1.0

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

Source distribution (sdist)

Source distribution for configparser_rb 1.1.0
File Size Uploaded
configparser_rb-1.1.0.tar.gz 20.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for configparser_rb 1.1.0
File Interpreter ABI Platform
configparser_rb-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.9 kB

Release files / configparser_rb-1.1.0.tar.gz

Download URL configparser_rb-1.1.0.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
03933f7e88a7f3a377464ef4c6f2597ddad46aeb651ef5899e53be5353197cca
BLAKE2b-256 checksum
How to use checksums
ad2409613df2071ac4800db433c30f1d8a4904d06fa463cb1ec8c78fb4d2bcc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.3 CPython/3.13.13 Linux/7.0.0-gentoo

Release files / configparser_rb-1.1.0-py3-none-any.whl

Download URL configparser_rb-1.1.0-py3-none-any.whl
Size 25.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1dbce91979fa4fd7dfc9003154626af6a0bacae27c4c0aada62e95a3bb64be6
BLAKE2b-256 checksum
How to use checksums
3931285f2ed592f72566276267d2025f245cf0cb4923161e5a209b74d7cff0b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.3 CPython/3.13.13 Linux/7.0.0-gentoo

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

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