-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More types #3
Comments
Not sure if these are worth adding, but I was looking for them while reading the docs:
These are fresh on my mind from trying to think through some common ways to access "things in strings" https://github.com/jefftriplett/django-fett/blob/main/src/fett.py#L295-L328 |
ye makes sense.
The other types i haven't needed since I've always used dirty-equals and equivalent for checking the response from APIs or contents of databases, where you don't get steams or files. |
I think Could keep it simple and offload some of the url validation logic to the user? i.e. something simple like this just with
|
Urllib is definitely not suitable for checking urls, is easy too lenient. Simplest solution would probably be to copy the regex and logic from pydantic. We know that's widely used and works. Or we add a dependency like yarl. |
That all makes sense! Would you be interested in a PR on I've been working on testing APIs recently and thought some of these types could be useful. Although I may be predisposed to focus on types that would be useful for cybersecurity applications and perhaps less so elsewhere. Anyhow, would you be interested in a PR on any of these?
|
|
IsFalseLike
feat: add IsFalseLike #23IsTrueLike
add IsTrueLike type #25IsPartialDict
working onIsDict
#5IsFullDict(order_matters=False)
working onIsDict
#5IsIterable(*items, start=None, finish=None, order_matters=True, len=None)
addingIsList
,IsTuple
andIsListOrTuple
#7IsList(*items, skip=DontSkip, order_matters=True, len=None)
addingIsList
,IsTuple
andIsListOrTuple
#7IsTuple(*items, skip=DontSkip, order_matters=True, len=None)
addingIsList
,IsTuple
andIsListOrTuple
#7IsPartialIterable(items: Dict[int, Any])
addingIsList
,IsTuple
andIsListOrTuple
#7IsStr(regex, min_length, max_length, upper, lower, digits)
IsBytes(regex, min_length, max_length, upper, lower, digits)
IsToday
Add IsDate feature #20HasProperties
Inspection types #26HasName
Inspection types #26HasRepr
Inspection types #26HasLen
addingIsList
,IsTuple
andIsListOrTuple
#7IsOneOf
EqualsFunc
addIsJson
type andFunctionCheck
type #4IsJson
addIsJson
type andFunctionCheck
type #4IsDataclass
IsEnumMember(v, strict=True)
The text was updated successfully, but these errors were encountered: