__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(42)

# The same constructor can also accept other types, e.g., a datetime
date_prop = PropertyValue(datetime.now())

init

Initializes a new PropertyValue with a long integer 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 (float) value.

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

init

Initializes a new PropertyValue with a string value.

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

Example

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

property_value = PropertyValue(datetime.now())

init

Initializes a new PropertyValue with the given value.

def __init__(self, value):
    ...
Parameter Type Description
value Any The value to store.

Example

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

    # Create a PropertyValue containing the current date and time
    prop_val = PropertyValue(datetime.now())
    ```

## __init__ {#value}

Initializes a PropertyValue with a datetime value.

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

Example

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

prop_val = PropertyValue(datetime.now())

init

Initializes a new PropertyValue instance with a timedelta value.

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

init

Initializes a new PropertyValue with a list of strings.

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

init

Initializes a PropertyValue with a byte array.

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

init

Initializes a new 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 new 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 new 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 new PropertyValue instance with an array of unsigned 16‑bit integer values.

def __init__(self, values):
    ...
Parameter Type Description
values list[System.UInt16] An array of unsigned 16‑bit integer values.

See Also