b2-sdk-python icon indicating copy to clipboard operation
b2-sdk-python copied to clipboard

Add models for corsRules and lifecycleRules instead of dicts

Open mlech-reef opened this issue 4 years ago • 4 comments

The models should have client-side data validation - https://github.com/samuelcolvin/pydantic can be simply used for that

mlech-reef avatar Feb 11 '21 17:02 mlech-reef

After some discussion, this should be moved to https://github.com/Backblaze/b2-sdk-python/milestone/2

mpnowacki-reef avatar Apr 22 '21 23:04 mpnowacki-reef

LifecycleRules are now annotated as typed dicts. Runtime validation of this is available in CLI when optional dependencies are installed, namely, pydantic v2.

We are open to PRs adding similar type annotation for corsRules.

mjurbanski-reef avatar Nov 08 '23 21:11 mjurbanski-reef