__init__ constructor

init

Initializes a PropertyValue with an integer value.

def __init__(self, value):
    ...
Parameter Type Description
value int An integer value.

Example

from datetime import datetime
from groupdocs.metadata.common import PropertyValue

# Integer value
int_prop = PropertyValue(123)

# DateTime value (also supported)
date_prop = PropertyValue(datetime.now())

init

Initializes a PropertyValue with a long value.

def __init__(self, value):
    ...
Parameter Type Description
value int A long integer value.

init

Initializes a new PropertyValue with a boolean value.

def __init__(self, value):
    ...
Parameter Type Description
value bool A boolean value.

init

Initializes a PropertyValue with a double value.

def __init__(self, value):
    ...
Parameter Type Description
value float A double value.

init

Initializes a PropertyValue with a string value.

def __init__(self, value):
    ...
Parameter Type Description
value str A str value.

init

Initializes a new PropertyValue with the given value.

def __init__(self, value):
    ...
Parameter Type Description
value Any An object value.

Example

from datetime import datetime
from groupdocs.metadata.common import PropertyValue

property_value = PropertyValue(datetime.now())

init

Initializes a new PropertyValue with a datetime value.

def __init__(self, value):
    ...
Parameter Type Description
value datetime A datetime value to store.

Example

from datetime import datetime
from groupdocs.metadata.common import PropertyValue

pv = PropertyValue(datetime.now())

init

Initializes a new PropertyValue instance with a datetime.timedelta value.

def __init__(self, value):
    ...
Parameter Type Description
value timedelta A datetime.timedelta value.

init

Initializes a PropertyValue with a list of strings.

def __init__(self, values):
    ...
Parameter Type Description
values list[str] A string array.

init

Initializes a PropertyValue with a byte array.

def __init__(self, values):
    ...
Parameter Type Description
values list[int] A byte array.

init

Initializes a PropertyValue with an array of double values.

def __init__(self, values):
    ...
Parameter Type Description
values list[float] A list of float values.

init

Initializes a PropertyValue with an array of integer values.

def __init__(self, values):
    ...
Parameter Type Description
values list[int] An array of integer values.

init

Initializes a PropertyValue with an array of long values.

def __init__(self, values):
    ...
Parameter Type Description
values list[int] An array of long values.

init

Initializes a PropertyValue with an array of unsigned 16‑bit integer values.

def __init__(self, values):
    ...
Parameter Type Description
values list[System.UInt16] An array of ushort values.

See Also