exiv2._datasets

IPTC key class and data attributes.

Classes

DataSet

Details of an IPTC dataset.

IptcDataSets

IPTC dataset reference, implemented as a static class.

IptcKey

Concrete keys for IPTC metadata.

class DataSet

Bases: SwigPyObject

Details of an IPTC dataset.

desc_

Dataset description

items()

Get structure members.

Return type:

list of (str, value) tuple

Returns:

structure member (name, value) pairs (with any trailing underscores removed from names).

keys()

Get structure member names.

Return type:

list of str

Returns:

structure member names (with any trailing underscores removed).

mandatory_

True if dataset is mandatory

maxbytes_

Maximum number of bytes

minbytes_

Minimum number of bytes

name_

Dataset name

number_

Dataset number

photoshop_

Photoshop string

recordId_

Record id

repeatable_

True if dataset is repeatable

title_

Dataset title or label

type_

Exiv2 default type

values()

Get structure member values.

Return type:

list of value

Returns:

structure member values.

class IptcDataSets

Bases: SwigPyObject

IPTC dataset reference, implemented as a static class.

ARMId = 120
ARMVersion = 122
ActionAdvised = 42
AudioDuration = 153
AudioOutcue = 154
AudioRate = 151
AudioResolution = 152
AudioType = 150
Byline = 80
BylineTitle = 85
Caption = 120
Category = 15
CharacterSet = 90
City = 90
Contact = 118
Copyright = 116
CountryCode = 100
CountryName = 101
Credit = 110
DateCreated = 55
DateSent = 70
Destination = 5
DigitizationDate = 62
DigitizationTime = 63
EditStatus = 7
EditorialUpdate = 8
EnvelopeNumber = 40
EnvelopePriority = 60
ExpirationDate = 37
ExpirationTime = 38
FileFormat = 20
FileVersion = 22
FixtureId = 22
Headline = 105
ImageOrientation = 131
ImageType = 130
Keywords = 25
Language = 135
LocationCode = 26
LocationName = 27
ModelVersion = 0
ObjectAttribute = 4
ObjectCycle = 75
ObjectName = 5
ObjectType = 3
Preview = 202
PreviewFormat = 200
PreviewVersion = 201
ProductId = 50
Program = 65
ProgramVersion = 70
ProvinceState = 95
RasterizedCaption = 125
RecordVersion = 0
ReferenceDate = 47
ReferenceNumber = 50
ReferenceService = 45
ReleaseDate = 30
ReleaseTime = 35
ServiceId = 30
Source = 115
SpecialInstructions = 40
SubLocation = 92
Subject = 12
SuppCategory = 20
TimeCreated = 60
TimeSent = 80
TransmissionReference = 103
UNO = 100
Urgency = 10
Writer = 122
application2 = 2
static application2RecordList()

Return read-only list of built-in Application2 Record datasets

static dataSet()

Return the dataSet number for dataset name and record id

Parameters:
  • dataSetName (str) – dataSet name

  • recordId (int) – recordId

Return type:

int

Returns:

dataSet number

Raises:

Exiv2Error if the dataSetName or recordId are invalid

static dataSetDesc()

Return the description of the dataset.

Parameters:
  • number (int) – The dataset number

  • recordId (int) – The IPTC record Id

Return type:

string

Returns:

The description of the dataset

static dataSetName()

Return the name of the dataset.

Parameters:
  • number (int) – The dataset number

  • recordId (int) – The IPTC record Id

Return type:

str

Returns:

The name of the dataset or a string containing the hexadecimal value of the dataset in the form “0x01ff”, if this is an unknown dataset.

static dataSetPsName()

Return the Photoshop name of a given dataset.

Parameters:
  • number (int) – The dataset number

  • recordId (int) – The IPTC record Id

Return type:

string

Returns:

The name used by Photoshop for a dataset or an empty string if Photoshop does not use the dataset.

static dataSetRepeatable()

Check if a given dataset is repeatable

Parameters:
  • number (int) – The dataset number

  • recordId (int) – The IPTC record Id

Return type:

bool

Returns:

true if the given dataset is repeatable otherwise false

static dataSetTitle()

Return the title (label) of the dataset.

Parameters:
  • number (int) – The dataset number

  • recordId (int) – The IPTC record Id

Return type:

string

Returns:

The title (label) of the dataset

static dataSetType()

Return the type for dataSet number and Record id

envelope = 1
static envelopeRecordList()

Return read-only list of built-in Envelope Record datasets

invalidRecord = 0
static recordDesc()

Return the description of a record

Parameters:

recordId (int) – Record Id number

Return type:

string

Returns:

the description of the Record

static recordId()

Return the Id number of a record

Parameters:

recordName (str) – Name of a record type

Return type:

int

Returns:

the Id number of a Record

Raises:

Exiv2Error if the record is not known;

static recordName()

Return the name of the Record

Parameters:

recordId (int) – The record id

Return type:

str

Returns:

The name of the record or a string containing the hexadecimal value of the record in the form “0x01ff”, if this is an unknown record.

class IptcKey

Bases: SwigPyObject

Concrete keys for IPTC metadata.

clone()
familyName()
groupName()

Return the name of the group (the second part of the key). For IPTC keys, the group name is the record name.

key()
record()

Return the record id

recordName()

Return the name of the record

tag()
tagDesc()
tagLabel()
tagName()