Skip to main content

Config parser with the ability to obfuscate keys with rotated bits in base64

Project description

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")

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

configparser_rb-1.1.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

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

configparser_rb-1.1.0-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file configparser_rb-1.1.0.tar.gz.

File metadata

  • Download URL: configparser_rb-1.1.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.13.13 Linux/7.0.0-gentoo

File hashes

Hashes for configparser_rb-1.1.0.tar.gz
Algorithm Hash digest
SHA256 03933f7e88a7f3a377464ef4c6f2597ddad46aeb651ef5899e53be5353197cca
MD5 4dade92627daf081eaea825d6f836968
BLAKE2b-256 ad2409613df2071ac4800db433c30f1d8a4904d06fa463cb1ec8c78fb4d2bcc0

See more details on using hashes here.

File details

Details for the file configparser_rb-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: configparser_rb-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.13.13 Linux/7.0.0-gentoo

File hashes

Hashes for configparser_rb-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1dbce91979fa4fd7dfc9003154626af6a0bacae27c4c0aada62e95a3bb64be6
MD5 cfc650331349ed55ce6a74e39e60cd52
BLAKE2b-256 3931285f2ed592f72566276267d2025f245cf0cb4923161e5a209b74d7cff0b6

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