Skip to content

Releases: keithasaurus/koda-validate

4.2.0

19 Aug 16:00
777f3d9
Compare
Choose a tag to compare

What's Changed

Full Changelog: 4.1.1...4.2.0

4.1.1

09 Apr 17:32
e87258a
Compare
Choose a tag to compare

What's Changed

Full Changelog: 4.1.0...4.1.1

4.1.0

01 Mar 06:16
6c9d48b
Compare
Choose a tag to compare

What's Changed

Full Changelog: 4.0.0...4.1.0

4.0.0

28 Sep 05:51
d1cf8d8
Compare
Choose a tag to compare

Breaking Changes

to_serializable_errs produces different text, removing assumption that validation input was deserialized from json

Improvements

Allow to_serializable_errs to accept callable for next level

Maintenance

Update dev dependencies

3.1.2

05 May 06:41
093edea
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.1.1...3.1.2

3.1.1

28 Jan 18:25
d1666ce
Compare
Choose a tag to compare

Bug Fixes

  • UnionValidator.typed's @overloads specify that arguments should be positional-only

Docs

  • extend docs for UnionValidator and NTupleValidator

Full Changelog: 3.1.0...3.1.1

3.1.0

26 Jan 17:19
12a5121
Compare
Choose a tag to compare

3.1.0 (Jan. 26, 2023)
Features

  • Runtime type checking via koda_validate.signature.validate_signature
  • Coercion customizable via Coercer (and helper decorator coercer)

Maintenance

  • Minor bug fixes in examples/

Full Changelog: 3.0.0...3.1.0

3.0.0

06 Jan 07:34
a18dab6
Compare
Choose a tag to compare

Headlines

  • Valid / Invalid has been revised an decoupled from serialization
  • Automatic typehint-derived validators
  • New docs site
  • Lots of New Validators
  • Performance ticks up

3.0.0 (Jan. 5, 2023)
Features

  • Derived Validators: TypedDictValidator, DataclassValidator, NamedTupleValidator
  • UnionValidator replaces OneOf2, OneOf3
  • NTupleValidator replaces Tuple2Validator, Tuple2Validator
  • UniformTupleValidator
  • SetValidator
  • BytesValidator
  • New Valid/Invalid types
  • MaybeValidator
  • CacheValidatorBase
  • Errors decoupled from Serialization
  • Fewer Generic Arguments needed for Validators, Predicates and PrediateAsyncs
  • koda_validate.serialization.to_json_schema

Removals

  • OneOf2
  • OneOf3
  • Tuple2Validator
  • Tuple3Validator

Breaking Changes

  • UnionValidator replaces OneOf2, OneOf3
  • NTupleValidator replaces Tuple2Validator, Tuple2Validator
  • New Valid/Invalid types -- need koda_validate.to_serializable_errs to produce serializable errors

Performance

  • Various optimizations in dictionary Validators
  • Optimizations in scalar validators (StringValidator, IntValidator, etc.) for common use cases
  • Overall speedups of around 30% for common validation cases
  • More benchmarks

Maintenance

  • New Docs Site
  • Restructure project layout
    • _internal.py
    • move serialization to koda_validate.serialization
  • More benchmarks

2.1.0

10 Nov 06:51
20cca87
Compare
Choose a tag to compare

2.1.0 (Nov. 9, 2022)
Features

  • UUIDValidator

Bug Fixes

  • RecordValidator allows up-to-16 keys as intended

Performance

  • Small optimizations for RecordValidator, DictValidatorAny, ListValidator and DecimalValidator

2.0.0

09 Nov 05:55
e3afc45
Compare
Choose a tag to compare

Asyncio Validation / Faster synchronous validation / More Flexible Dictionary Validation

All built-in validators now fully compatible with asyncio. See the docs for more.

Significantly faster than v1.0 -- and 1.5x - 12x faster than Pydantic in (synchronous) benchmarks

RecordValidator and DictValidatorAny can now handle any kind of dict key, and whether it's required or not.

Features

  • asyncio is supported with .validate_async method
  • PredicateAsync is added
  • RecordValidator (and DictValidatorAny) can now handle any kind of dict key.
  • AlwaysValid is added
  • Predicates and Processors are allowed more extensively across built-in validators.

Performance

  • speed has improved as much as 60x (Koda Validate is now significantly faster than Pydantic)

Breaking Changes

  • Ok / Err / Result (from koda) -> Valid / Invalid / Result (from koda_validate)
  • dict_validator -> RecordValidator
  • DictNKeysValidators are removed. Instead, RecordValidator is used.
  • RecordValidator requires all arguments as keyword-only
  • RecordValidator accepts up-to 16 keys
  • key helper is removed
  • maybe_key helper is replaced by KeyNotRequired
  • MapValidator requires all arguments as keyword-only
  • ListValidator requires Predicates to be specified as a keyword argument
  • the order and number of some __match_args__ has changed
  • most validators are no longer dataclasses; __repr__s may differ
  • validate_and_map is deprecated and removed from koda_validate imports.
  • file structure has changed
    • typedefs.py -> base.py
    • utils.py -> _internals.py

Maintenance

  • bench folder is added for benchmarks
  • python3.11 added to CI
  • pypy3.9 added to CI
  • min coverage bumped to 95%
  • lots of tests added