Open LukasKrocek opened 1 year ago
This is not currently possible. I had been resistant to adding extra msgspec-specific configuration to dataclasses/attrs support in favor of asking users to use msgspec.Struct
types instead. Struct types should support all the same use cases as attrs/dataclasses, but have all the extra config options, and are generally measurably faster to use. Is there a reason you can't use struct types here instead?
Our entire code base already uses attrs, we discovered your library only recently and we switched from attrs where performance is crucial.
There is also some functionality in attrs that is not yet available in msgspec that we need - generics, good integration with mypy and pycharm, maybe some more I cannot think of right now.
There is also some functionality in attrs that is not yet available in msgspec that we need - generics, good integration with mypy and pycharm, maybe some more I cannot think of right now.
Apologies for letting this sit. Since I last responded msgspec now has:
dataclass_transform
(I don't use pycharm, so I'm not sure how well that works out there)Given this support, do you still have need for this feature with attrs
? And if so, do you have a suggestion for how you'd spell this configuration?
Description
Hello, I have tried new support of attrs and speed is amazing.
However for me to be able to use it in production, I need to be able to decode/encode messages with camelized fields.
Would it make sense to add such functionality or is it already somehow possible?