Database helpers
- class vng_api_common.descriptors.GegevensGroepType(mapping: Dict[str, Field], optional: Optional[tuple] = None, required=None, none_for_empty=False)
Structure a body of data from flat model fields.
All keys are always truthy for a value.
- Parameters:
mapping – dict, mapping simple keys to model fields
optional – iterable of fields that are NOT required.
none_for_empty – convert ‘empty’ values to None, such as empty strings. Booleans are left untouched
- class vng_api_common.models.APICredential(*args, **kwargs)
Store credentials for external APIs.
When we need to authenticate against a remote API, we need to know which client ID and secret to use to sign the JWT.
- exception DoesNotExist
- exception MultipleObjectsReturned