Skip to content

suvayu/orwellian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orwellian

unittests coverage

Validate all kinds of structured data, with just Python!

How?

Orwellian uses Python dataclass-es and descriptor-s to provide a highly customisable framework for validation.

Example

@dataclass
class choice:
    opt: str = field(default=OneOf(["foo", "bar", "baz"]))

choice(opt="foo")  # valid
choice(opt=3)  # TypeError
choice(opt="fo")  # ValueError

About

A simple data validation library for Python 3 based on type annotated dataclasses

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages