-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f70ceb
commit 696676b
Showing
14 changed files
with
166 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,99 @@ | ||
# Make the base filters accessible from the top level of the package. | ||
# Note that the order is important here, due to dependencies. | ||
from .base import * | ||
from .handlers import * | ||
from .macros import * | ||
from .number import * | ||
from .simple import * | ||
from .complex import * | ||
from .string import * | ||
|
||
# Additional filters are loaded into a separate namespace, so that IDEs | ||
# don't go insane. | ||
from filters.extensions import FilterExtensionRegistry | ||
from .base import Type | ||
from .complex import ( | ||
FilterMapper, | ||
FilterRepeater, | ||
FilterSwitch, | ||
NamedTuple, | ||
) | ||
from .extensions import FilterExtensionRegistry | ||
from .number import ( | ||
Decimal, | ||
Int, | ||
Max, | ||
Min, | ||
Round, | ||
) | ||
from .simple import ( | ||
Array, | ||
ByteArray, | ||
Call, | ||
Date, | ||
Datetime, | ||
Empty, | ||
Item, | ||
Length, | ||
MaxLength, | ||
MinLength, | ||
NoOp, | ||
NotEmpty, | ||
Omit, | ||
Optional, | ||
Pick, | ||
Required, | ||
) | ||
from .string import ( | ||
Base64Decode, | ||
ByteString, | ||
CaseFold, | ||
Choice, | ||
IpAddress, | ||
JsonDecode, | ||
MaxBytes, | ||
MaxChars, | ||
Regex, | ||
Split, | ||
Strip, | ||
Unicode, | ||
Uuid, | ||
) | ||
|
||
__all__ = [ | ||
"Array", | ||
"Base64Decode", | ||
"ByteArray", | ||
"ByteString", | ||
"Call", | ||
"CaseFold", | ||
"Choice", | ||
"Date", | ||
"Datetime", | ||
"Decimal", | ||
"Empty", | ||
"FilterMapper", | ||
"FilterRepeater", | ||
"FilterSwitch", | ||
"Int", | ||
"IpAddress", | ||
"Item", | ||
"JsonDecode", | ||
"Length", | ||
"Max", | ||
"MaxBytes", | ||
"MaxChars", | ||
"MaxLength", | ||
"Min", | ||
"MinLength", | ||
"NamedTuple", | ||
"NoOp", | ||
"NotEmpty", | ||
"Omit", | ||
"Optional", | ||
"Pick", | ||
"Regex", | ||
"Required", | ||
"Round", | ||
"Split", | ||
"Strip", | ||
"Type", | ||
"Unicode", | ||
"Uuid", | ||
"ext", | ||
] | ||
|
||
# Initialise extensions namespace. | ||
ext = FilterExtensionRegistry() | ||
del FilterExtensionRegistry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.