Filters

Latest version: v1.3.2

Safety actively analyzes 625786 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

1.2.0

**Important:** If you are currently using ISO filters (`Country`, `Currency` and `Locale`), please wait to upgrade until the 1.2.1 release!

* Introduced extensions framework (more info below).
* Removed ISO filters.
* These will be made available as an extra in the 1.2.1 release.
* If you do not need ISO filters, you may remove the following dependencies from your virtualenv:
* iso3166
* language_tags
* py-moneyed
* Standardized test instructions across pip, travis and tox.
* Little bit of code cleanup.

Extensions Framework
Filters v1.2.0 introduces a new "extensions" framework that allows you to add your own filters to the (nearly) top-level namespace*.

Extension filters are available from `filters.ext`. For example:

import filters as f
f.ext.Country().apply('pe')

\* (we opted to create a separate namespace because IDEs were going insane when we tried injecting symbols directly into the `filters` module scope)

To take advantage of this feature, add `filters.extensions` entry points to your package's `setup.py` file:

setup(
...
entry_points = {
'filters.extensions': [
Load all filters from a single module.
'iso = filters_iso',

Load a single class.
'country = filters_iso:Country',
],
},
)

You can assign any name you want to the entry point; what's important is that the value reference a valid module or class.

Note: extension filters are loaded at runtime when importing the `filters` package.

Binary Distribution Checksums
* filters-1.2.0-py2-none-any.whl
* sha256: 25cb7510286cba1afff06de2c8de7b1befd8cfb4869fface613ee0604d79867c
* md5: 86b9eb131f8246d9ad4fd385a7209b6a
* filters-1.2.0-py3-none-any.whl
* sha256: 7a6c884d2abbce651845b5467a6f1be5fc7b3192ce48c1bd357aec621f338095
* md5: e510da417eca8fd33711b2ac60b6f4bf
* filters-1.2.0.tar.gz
* sha256: 0f7ab724f079586189f2eb010610402993ca4c2020953be4dd2d53dbbf236261
* md5: 7213184326174fedeb3e3ec7cef05eae
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJZFjE4AAoJEC2oW+MnuUmsapkP/jkoLr8kU2Wkb/zf6RvcNp8I
fxPNfK95SRfV+iunYZ0OCUTfRNLVxxIxHhr9I5TO2kTsm0w4PAEd9G9GzRWvkkpP
MdG1wHk/fiKs4i607mq7mK8V55TGIgCTW47YUyyZWyWvJKT2ZPmxXIqLYiHynRot
ZFG+jJCajt5V302lENLYeHWwUCv8KAQV1e6hmSZ6e5ap9QZTrl/GSAOeiyxn4rLu
MiWG/ip6ST/N7erjOwE2R7Xfps/fsHAvf//EV+3OlwdGvwjt6SFfJeaY2WXwkCaV
ninvHL96ci2zyRvMgnw6uEAxIEXTzNYP40axfr+SENulDETa4+Rni5oa/1IIxPGd
qbBDJPrw0OnyR9DdcITZ/e9zrCqa5R3+75DOpcWnNG2aeVpS+y9bdT/GD5xZsAIk
Kumw0Np7sXcJW/5cinCxPoMFmxsHVmT2aeEguTc5sL7DaJ2DsOqdhsrbPUTGWmoK
kiEP0W8UNI0DsBIaoONL2wLyh986xmNArw8UGHx83TABgNH/jLALcjha5IDnybGH
/CSklNdI91ZGRLkKdchDXfI256suNRTsS0BJyATIhVdG43SFSJimMVBtTz//BBUz
tNo7T1lIPPraA2lC742txymNOupLCo6iiozPSkStrMfg57hjkWw7/DsnJ1B+kEzA
xvCRyQ6TEi5cQD6FtJMs
=9aAc
-----END PGP SIGNATURE-----

1.1.7

* [13] `FilterMapper.apply` now returns an unordered `dict` by default.
* To restore the previous behavior, pass an `OrderedDict` to the filter's initializer. Example:
python
Filter returns a dict (new behavior):
filter_ = f.FilterMapper({
'id': f.Int,
'subject': f.Required | f.Unicode,
})

Filter returns an OrderedDict (old behavior):
filter_ = f.FilterMapper(OrderedDict((
('id', f.Int),
('subject', f.Required | f.Unicode),
)))

* [15] Fixed ambiguous error message when `FilterMapper` detects an unexpected key in the input.
* `MaxBytes` now returns correct type when using encodings other than UTF-8.
* Chaining a filter with `None` now correctly returns a `FilterChain` instance.

* General code cleanup:
* Improved docstrings and comments.
* Fixed some incorrect type hints.
* Fixed some RST syntax problems.
* Made code formatting more consistent.
* Made some unit tests more fun to read.
* No longer includes `typing` when installing into Python 3 envs.
* Travis now also builds wheels during deployments.

Binary Distribution Checksums
* filters-1.1.7.tar.gz
* sha256: bd9556357bc9e078125fc1afa9dcf96a0cfbfc73cafc67260a0df21a91d3d6b9
* md5: 9dcb5bca811da67c961868fb32b3d3ba
* filters-1.1.7-py2-none-any.whl
* sha256: 959c0a736f7f11fc9d22b75b1b1d4baec26fb3e3d32fbea491d66368f14031d9
* md5: 00a8702240518df5caeaa97f7eac523d
* filters-1.1.7-py3-none-any.whl
* sha256: b528477a067f907b75be60bb9e0bf4746b2dedbee1b849d71b9f5ad0a5334173
* 47813f5cae1b311ed266d2209293ea73
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJY+A7yAAoJEC2oW+MnuUmsQlQQAJ3VoFfoxmxuUS/Uf9qYAoMt
L6uOF50oSLrcJ8kn3T4HNJajm53sxVlOAilwN2t+LxFoxxy5629fHr/cg6QJFOCr
V+g3t61d6jOCpCFGChR2YEym87EBrZjYwe6NqsPAAD3QEn0w/m+ZSkON8WQ0cA3l
9MndwVusLbYfQC2SY69xSM0Ba9zOhG8H5bR934nPOz2O5nwXWWkGvQxAllaNgUSX
iLkMMKPaueLID601HoVacCIHKIXelraYM2/+XA/9fgL+wc9A2fZsO3NCA6Io0iMj
1KTLH1NOanM6+hBv2KGrX8MWXtNznXWxhPutRfL+tO4VWsclLZqCJvfqAtD7dLe1
lRRi3bJw4e/ChxwfSXT+0jZWWwC6Ne8X9jJoLU1uJ3i2l2YRZOx7R9sPK17hqgol
aX+MyDAd2WZRGKr19GHKXb7ejWqzGx/8RhUKaytPxE5J6ndgIcwW7oUb74y1icIB
QutLuJGnAWLpLLGs1E/U0ygADqse7tAFfkH0mLoP09r95cxfYsoHPUoYSEdYY18J
h6aLhiFIWGSt474PFOtHrxAb1Pb9DW1Iko5kz1kvDc1lcVpgsVA2gSy9X9CmrZs9
SR0i424aLzlMlwuG03ZJSJFQF6EmfFQJ6C/w6fy9H3dfVb3/QJsPo8d0L6sOb+Q5
BKdjQVdr9PoNePIK//GM
=zXwv
-----END PGP SIGNATURE-----

1.1.6

**⚠️ WARNING ⚠️**
**This version contains backwards-incompatible changes. Please re-run your unit tests after upgrading!**

Backwards-Incompatible Changes
* Removed type check from `Max` and `Min` filters. To restore the old functionality, chain with a `Type` filter. Example:
python
Before:
filter_chain = Max(42)

After:
filter_chain = Type(int) | Max(42)


Additional Changes
* `setup.py` no longer installs py2casefold on Python 3 systems. This also applies when installing from wheels.
* Configured automatic PyPI releases via Travis CI.
* Cleaned up some comments and code formatting.

Binary Distribution Checksums
* filters-1.1.6.tar.gz
* sha256: e6cb1619fcff390d6381dd9ccca637ba562fd4e07817f121447e2f9fb12cbf7d
* md5: b07db6a1311aeb3cc68f91fa1146f367
* filters-1.1.6-py2-none-any.whl
* sha256: 8c2ada6911e7e6736df3d9b1cc3d5e6cdc9f78e833459c4686c3e1569e272028
* md5: 4e054f3c2d7cd71b45341d22d8f13a26
* filters-1.1.6-py3-none-any.whl
* sha256: 759f848c1969ea4717c7194711df096d0940ffe5b310dc941128caa8305186cd
* md5: 62094c1836d2f106ceb3f36b95aff60f
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJY9+4bAAoJEC2oW+MnuUmslH0P/3t3erTW6aJkQZ+majCDTTti
uR3b6evwL+T/euk3F5gsA1JldPsjQiymGIt4BJESPgSjjBOuc0xtmn+GBbURz1fN
TB3ZsPuOnYScE7Ybwagxex+sZmHTvdOYv2fFet8ANXrM+VN8OBYE95Oq9vKaNHmL
QWA7LMEb/XBso9bj1xoBXRVwQ8LarrMYAXeQLvGRx0KuSKaWmmOIYf1rK1/BoMmw
qCoMfXvaxO2z5IWTjT6HM8exTKlT54LaQV31qJ9Gt+ngeb6pu5r8r2na6P0ZHiNq
Bflew9Al0o8WBvqiQJiWEkgiychKaGsqppVeEOxmKR0QorQBNgK0WR/4sGIbbb4w
udpAcP307jU95lZqUN3jKD1WCtJv452ptEItG5pAjKBwSl3cYZxYn6yjBK1upPHm
U+Ei2kdDa6DyDsrGqBsyWXUVZnHsuERpnO0Hc/0cAUD9Q8nDT6FBE+8fKSHuKmCL
Drq7vtw/hvK7b1qjdHAL3GJI5RdmmwD79X3/hDSrGoN0bGwWFD6on8DT/gyLSYgb
13eWI3GhtALl9QqAcWGTrOCvPLhsbYZGSQMeaY7I1vPk5Q4aQ3hki1rCK9kEc24E
G2XszoNug3Ude2eZZEHhOqN3jZQ2xyoArsnfdavLxbbC5pWxXGD0pMOePUUUrRu7
t+C8WazhCjNIAzV4RM1b
=LBf5
-----END PGP SIGNATURE-----

1.1.5

* Implemented new `iso` package:
* `Country`: Interprets an incoming value as an ISO 3166-1 alpha-2 or alpha-3 country code.
* `Currency`: Interprets an incoming value as an ISO 4217 currency code.
* `Locale`: Interprets an incoming value as an IETF Language Tag.
* More informative error message when filter test case is misconfigured.
* Cleaned up project metadata.
* Fixed incorrect configuration that breaks the documentation build.
* Improved documentation for partials.

Binary Distribution Checksums
* filters-1.1.5-py2.py3-none-any.whl
* md5: 2b38383a2c632afc857baaddcc36324d
* sha256: 90fce5e7664b32c65e82ed4c3e3b307605c8732f31d2a5825f40c9a68487a931
* filters-1.1.5.tar.gz
* md5: c8f4ce7ad6881bf3f6d372ec848ba4b7
* sha256: 2653dfbcb892e417bbfbf91ff7933efca49f729a0ac527410ac397b36de23a83
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJYsds8AAoJEIyGP45e1NNDC0YQALQiSd3Lrn+wC4gUaypUdSmy
b8df6W24YJbe9giXbjPnH3sQFwiTh7jVjkfEbQheU6WQi7GfQjn/JSgAp+eaZU0m
8WFB1mAkZaaqx3supwhQi01OdpNmaMSrfpYI9Z0XGeWSGLXQ2q/wG5aH0r8FluDC
mzxLVkj8mdwQZTTsFVEbrs/138W/7JY4lkYv6AfVS3Ch5ws21Agpj8hqz5z86UBV
my4jEQ0AXEqephNoN0VtWa1NzFLSYiYcTJy3q0MWC2nFTbLOn9QykS9dX5O4BfLe
VHFYwMVeZ6VYblR1kZYnGAHN4ngjbU9lzNLyoldjfTbPoUPsGWdCoHz56s2Qo3Au
zbQQ6jJ4nr5S/cik/zbedMbxDzbXIbHLQthB/u7bD9nlitJhSZPKCt0tssGF6SPD
0BzhaJgdDztfZe8A05uxu2srV51zTY+Xs7XM1m6le1jHRbrO92a3LVwNgBPg1TM2
jRSRjOSXsM5fPViJEuMx8C/lAPQnr0ANYrYVmtikUrwh4bQNUaoulETpDGJ+4s02
d5t0j8Ki9veWOfoS75IMOuLvuPHXZOQCwWqID8/l99XZAsrigW4vD6HlOlmbF5Uv
vAK40CnU419+FDUurwNf9lPq/ZWlfdC/4lJ+zty1CmLscSiaQ8QNliCVmmz2l0M8
Jc5t7Bl8BCb2eW/5T3rU
=8IK7
-----END PGP SIGNATURE-----

1.1.4

- Added 3.6 to list of supported Python versions.
- Added missing documentation for `Decimal` filter.

Binary Distribution Checksums


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

- - filters-1.1.4-py2.py3-none-any.whl
- sha256: 4b04a848a20b1c85d6038ea76c71a3d3e823468996e5fdcfe00e5fbebdf93e9d
- sha1: 6dc78eb8ac220cfe4e77df7fba6be7b650ecc69c
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJYVaNQAAoJEC2oW+MnuUmsTsgQAJ2nUcKgeQk4c/CxZQr+9EMA
DWkO2E7kbIbGz+SA+6IMxiIgLONBtII0CNTaBgFd3vWEH1u2U+ihLNa4DHwgV6xj
iTlQ4u6R3v66MbD1FBWmzLSi8XUPSBfJosxRBlxqnamydZCwTQnnSeo9e0QI5zHM
qOiRdOsGAChh6Yl7F0Qfd5C6PZIwTlTxQxWJ+ETG7HerRGjE8F5W8ltJGkhvDG1X
omsVMyWenH3Q88fd5wbEpISC9w5RAM3BV6JCNlNBdpI6JBoREOII4brCSIhN6PP3
xJ03egHpQp9ASEQDKlWNoqyjw7VMmr/OcY99MOgBoP8edXOJUt7ypAcqQmCF6aFx
pNzYmG1YOBUxtOZOpLJvOdpoIOXYssj9sJh4AsGfmsFgexIiVmasLZlHN3PXiuvR
nyIlpdi3SxaNn7EfM9aRRnsufrHcgBAhDIdghw0D7OGpcx4udEjzVq5eY7n8XMXv
t5RFIjIo8L5TCNOH3qd6BvuGDoWewwyJRWNnAwozYjypnLLnm4qaXw6AuEUCNVfY
I115T9m/k/6iLoY5brpdAuXo635pXrMwKEWqUvfOIpN8eKncf9ZHekq8T+hMY8Ov
x1vbQQ0+3O60SPPXlU3iEwu2z6cb8Carc+2qR2ahBnntf3a7UltO69XgWRdPWNDX
agq8Ggutj3mPPxWeBNac
=q45d
-----END PGP SIGNATURE-----

1.1.3

- Made `setup.py` compatible with older versions of pip.
- Added Travis integration.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.