I am a Full Stack Developer from Brazil.
-
๐ญ I'm contributing to frontend and backend projects and building web apps.
-
๐ฑ Exploring Technical Content Writing.
-
โก In my free time, I solve programming challenges and read tech articles.
A powerfull schema validator
Home Page: https://pypi.org/project/kohi/
License: MIT License
I am a Full Stack Developer from Brazil.
๐ญ I'm contributing to frontend and backend projects and building web apps.
๐ฑ Exploring Technical Content Writing.
โก In my free time, I solve programming challenges and read tech articles.
A custom error message is best when I'm returning from an API or when I want translated messages
Is your feature request related to a problem? Please describe.
A scheme for validating enums
Kohi doesn't have an easy way for when I need to validate if the value is in a list of possible options like enum.Enum
Describe the solution you'd like
e = EnumSchema().one_of([1, 2, 3])
print(e.validate(1)) # True
e = EnumSchema().not_one_of([1, 2, 3])
print(e.validate(1)) # False
Is your feature request related to a problem? Please describe.
It's often so confusing, even if I have multiple uses of a schema, they always throw the same error and I don't know which one it's coming from.
Is your feature request related to a problem? Please describe.
Methods to validate non-positive and non-negative numbers to make the process more concise and standardized
Describe the solution you'd like
from kohi import NumberSchema
NumberSchema().nonnegative().validate(-1) # False
NumberSchema().nonnegative().validate(0) # True
NumberSchema().nonnegative().throw().validate(-1) # ValidationError: number must be greater than or equal to 0
NumberSchema().nonpositive().validate(1) # False
NumberSchema().nonpositive().validate(0) # True
NumberSchema().nonpositive().throw().validate(1) # ValidationError: number must be less than or equal to 0
Is your feature request related to a problem? Please describe.
Currently there is no way to validate complex data as a dict, and this is a downside
Describe the solution you'd like
d = DictSchema().props(
name=StringSchema().min(3),
age=NumberSchema().min(18)
).label('user_data')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.