Giter Site home page Giter Site logo

Comments (6)

catchthemonster avatar catchthemonster commented on June 29, 2024 1

Thanks, Fabio,
much appreciated ...

from python-benedict.

fabiocaccamo avatar fabiocaccamo commented on June 29, 2024

@catchthemonster thank you for reporting this, I will fix it as soon as possible.

from python-benedict.

catchthemonster avatar catchthemonster commented on June 29, 2024

Thanks, @fabiocaccamo !
It looks like that only thing that needs to be done in the wrapper should be something like this:

self.a = RawConfigParser()

def confMe(**kwargs):
for key, value in kwargs.items():
if key == 'optionxform':
setattr(a, key, value)

Regards,

from python-benedict.

fabiocaccamo avatar fabiocaccamo commented on June 29, 2024

@catchthemonster I'm wondering if keys should be case sensitive by default when reading .ini files, what do you think?

from python-benedict.

catchthemonster avatar catchthemonster commented on June 29, 2024

@fabiocaccamo I think both ways, red and write in my opinion. INI is a simple but powerful template engine. Your projects are perfectly suited to be used to actually manipulate INI templates for requirements like change INI template across different working cloud environments.
I use configObj (nested sections) library to create modifications in templates ...
confObj allows me do something like this:
[iniTempalte1]
[[sec1]]
keySerer = abc
on original template, iniTemplate as:
[[sec1]]
keySerer = abc

with Benedict this becomes a piece of cake exercise of three to four line of code. The only missing part is keySensitivity and most senior devs like me, love camel case instead of Pep thing with _.

I think that overloading wrapper for configParser and allowing **kwargs to be used a vehicle to pass optionxform=str key = vaule pair and then setup by default on read and write would be a way to go and enhance this perfect work ...

btw. thank you for writing this lib...

from python-benedict.

fabiocaccamo avatar fabiocaccamo commented on June 29, 2024

You can upgrade to 0.30.0 version:

  • ini serializer is case-sensitive by default
  • you can now pass an optionxform option via kwargs.

from python-benedict.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.