Fields

class pypipedrive.orm.fields.AddressField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]
Dict field containing address information:
  • value: the full address

  • street_number: the street number

  • route: the street name

  • sublocality: the sublocality

  • locality: the locality

  • admin_area_level_1: the state or province

  • admin_area_level_2: the city

  • country: the country

  • postal_code: the postal code

  • formatted_address: the formatted address

contains_type

alias of AddressDict

class pypipedrive.orm.fields.AssigneeField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a dict with schema AssigneeDict (Goal).

contains_type

alias of AssigneeDict

class pypipedrive.orm.fields.AttendeeField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of AttendeeDict.

contains_type

alias of AttendeeDict

class pypipedrive.orm.fields.BooleanField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]
missing_value: ClassVar[Any] = None

The value to return when the field is missing

valid_types

alias of bool

class pypipedrive.orm.fields.BytesField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]
missing_value: ClassVar[Any] = None

The value to return when the field is missing

valid_types

alias of bytes

class pypipedrive.orm.fields.CustomFieldsField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of CodeDict.

contains_type

alias of str

class pypipedrive.orm.fields.CustomFieldsProductField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a dict with schema CustomFieldsProductDict.

contains_type

alias of CustomFieldsProductDict

class pypipedrive.orm.fields.DataField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of CodeDict.

contains_type

alias of CodeDict

class pypipedrive.orm.fields.DateField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Date field. Accepts only date values.

missing_value: ClassVar[Any] = None

The value to return when the field is missing

to_internal_value(value: str | None) date | None[source]

Convert an ISO 8601 string, e.g. “2014-09-05” into a date.

to_record_value(value: date | None) str | None[source]

Convert a date into an ISO 8601 string, e.g. “2014-09-05”.

valid_or_raise(value: Any) None[source]

Validate the type of the given value and raise TypeError if invalid.

valid_types

alias of date

validate_type(value)[source]

Ensure only datetime.date (but not datetime.datetime) values are accepted.

class pypipedrive.orm.fields.DatetimeField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

DateTime field. Accepts only datetime values.

missing_value: ClassVar[Any] = None

The value to return when the field is missing

to_internal_value(value: str | None) datetime | None[source]

Convert an ISO 8601 string, e.g. “2014-09-05T07:00:00.000Z” into a datetime.

to_record_value(value: datetime | None) str | None[source]

Convert a datetime into an ISO 8601 string, e.g. “2014-09-05T12:34:56.000Z”.

valid_or_raise(value: Any) None[source]

Validate the type of the given value and raise TypeError if invalid.

valid_types

alias of datetime

class pypipedrive.orm.fields.DurationField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Duration field. Accepts only timedelta values.

missing_value: ClassVar[Any] = None

The value to return when the field is missing

to_internal_value(value: int | float) timedelta[source]

Convert a number of seconds into a datetime.timedelta.

to_record_value(value: timedelta) float[source]

Convert a datetime.timedelta into a number of seconds.

valid_types

alias of timedelta

class pypipedrive.orm.fields.EmailsField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of LabelValuePrimaryDict.

contains_type

alias of LabelValuePrimaryDict

class pypipedrive.orm.fields.ExpectedOutcomeField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a dict with schema ExpectedOutcomeDict (Goal).

contains_type

alias of ExpectedOutcomeDict

class pypipedrive.orm.fields.Field(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]
missing_value: ClassVar[Any] = None

The value to return when the field is missing

to_internal_value(value: Any) Any[source]

Convert a value from the API into the value’s internal representation.

to_record_value(value: Any) Any[source]

Calculate the value which should be persisted to the API.

valid_or_raise(value: Any) None[source]

Validate the type of the given value and raise TypeError if invalid.

valid_types: ClassVar[type | Tuple[type | Tuple[_ClassInfo, ...], ...]] = ()

Types that are allowed to be passed to this field.

class pypipedrive.orm.fields.FloatField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]
missing_value: ClassVar[Any] = None

The value to return when the field is missing

valid_types

alias of float

class pypipedrive.orm.fields.GoalDurationField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a dict with schema GoalDurationDict (Goal).

contains_type

alias of GoalDurationDict

class pypipedrive.orm.fields.ImField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of LabelValuePrimaryDict.

contains_type

alias of LabelValuePrimaryDict

class pypipedrive.orm.fields.IntegerField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]
missing_value: ClassVar[Any] = None

The value to return when the field is missing

valid_types

alias of int

class pypipedrive.orm.fields.ItemSearchDealField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of ItemSearchDealDict.

contains_type

alias of ItemSearchDealDict

class pypipedrive.orm.fields.ItemSearchPersonField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of ItemSearchPersonDict.

contains_type

alias of ItemSearchPersonDict

class pypipedrive.orm.fields.ItemsField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of ItemSearchDict (Model.ItemSearch).

contains_type

alias of ItemSearchDict

class pypipedrive.orm.fields.LabelIdsField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of integers or strings.

class pypipedrive.orm.fields.MonetaryField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a dict with schema {“value”: value, “currency”: “UNIT”}

contains_type

alias of MonetaryDict

class pypipedrive.orm.fields.NumberField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]
missing_value: ClassVar[Any] = None

The value to return when the field is missing

valid_types: ClassVar[type | Tuple[type | Tuple[_ClassInfo, ...], ...]] = (<class 'int'>, <class 'float'>)

Types that are allowed to be passed to this field.

validate_type(value)[source]

Accept numeric values but reject booleans.

class pypipedrive.orm.fields.OptionsField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of IdLabelDict.

contains_type

alias of IdLabelDict

class pypipedrive.orm.fields.ParticipantField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of ParticipantDict.

contains_type

alias of ParticipantDict

class pypipedrive.orm.fields.PartiesField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a dict with schema PartiesDict (MailThreads to, from, bcc and cc).

contains_type

alias of PartiesDict

class pypipedrive.orm.fields.PhonesField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of LabelValuePrimaryDict.

contains_type

alias of LabelValuePrimaryDict

class pypipedrive.orm.fields.PricesField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of PriceDict.

contains_type

alias of PriceDict

class pypipedrive.orm.fields.SeasonalityField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a dict with schema SeasonalityDict (Goal).

contains_type

alias of SeasonalityDict

class pypipedrive.orm.fields.SubfieldField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a list of dicts in the format of SubfieldDict.

contains_type

alias of SubfieldDict

class pypipedrive.orm.fields.TextField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]
missing_value: ClassVar[Any] = None

The value to return when the field is missing

valid_types

alias of str

class pypipedrive.orm.fields.TimeField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]
missing_value: ClassVar[Any] = None

The value to return when the field is missing

to_internal_value(value)[source]

Convert a value from the API into the value’s internal representation.

to_record_value(value)[source]

Calculate the value which should be persisted to the API.

valid_types

alias of time

class pypipedrive.orm.fields.TypeField(field_name: str, validate_type: bool = True, validate: None | Callable[[Any], Any] | Iterable[Callable[[Any], Any]] = None, readonly: bool | None = False)[source]

Accepts a dict with schema TypeDict (Goal).

contains_type

alias of TypeDict