Serpy

Latest version: v0.3.1

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

Scan your dependencies

0.3.1

- Don't catch `AttributeError` and `KeyError` for `MethodField`

0.3.0

- Revert behavior in 38, and match behavior in DRF which is:

| | `required=True` | `required=False` |
| --- | --- | --- |
| `data = {'value': 1}` | `{'value': 1}` | `{'value': 1}` |
| `data = {'value': None}` | `{'value': None}` | `{'value': None}` |
| `data = {}` | `KeyError('value',)` | `{}` |

0.2.0

- If `required=False`, `None` values will now be dropped from the output
- `MethodField`s with `required=True` will trigger an exception when `None` value is returned
- Drop support for Python 2.6
- Add support for Python 3.5 and 3.6

0.1.1

- Added `label` parameter to `Field` to be able to specify the output label
- Updated documentation

0.1.0

API changes:
- argument for the object to be serialized changed name from `obj` to `instance`
- `Serializer` now takes context kwarg and ignores it for Django REST Framework compat
- `Serializer` now takes data kwarg and errors for Django REST Framework compat

0.0.3

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.