GData.GDPostalAddress

g GData.Comparable GData.Comparable GData.GDPostalAddress GData.GDPostalAddress GData.Comparable->GData.GDPostalAddress GData.Parsable GData.Parsable GData.Parsable->GData.GDPostalAddress GObject.GInterface GObject.GInterface GObject.GInterface->GData.Comparable GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

None

Methods

Inherited:

GData.Parsable (5), GObject.Object (37), GData.Comparable (1)

Structs:

GObject.ObjectClass (5)

class

new (relation_type, label, is_primary)

get_address ()

get_agent ()

get_city ()

get_country ()

get_country_code ()

get_house_name ()

get_label ()

get_mail_class ()

get_neighborhood ()

get_po_box ()

get_postcode ()

get_region ()

get_relation_type ()

get_street ()

get_subregion ()

get_usage ()

is_primary ()

set_address (address)

set_agent (agent)

set_city (city)

set_country (country, country_code)

set_house_name (house_name)

set_is_primary (is_primary)

set_label (label)

set_mail_class (mail_class)

set_neighborhood (neighborhood)

set_po_box (po_box)

set_postcode (postcode)

set_region (region)

set_relation_type (relation_type)

set_street (street)

set_subregion (subregion)

set_usage (usage)

Virtual Methods

Inherited:

GData.Parsable (9), GObject.Object (7), GData.Comparable (1)

Properties

Inherited:

GData.Parsable (1)

Name

Type

Flags

Short Description

address

str

r/w

The postal address itself.

agent

str

r/w

The agent who actually receives the mail.

city

str

r/w

Can be city, village, town, borough, etc.

country

str

r

The name of the country.

country-code

str

r

The ISO 3166-1 alpha-2 country code for the country.

house-name

str

r/w

Used in places where houses or buildings have names (and not numbers).

is-primary

bool

r/w

Indicates which postal address out of a group is primary.

label

str

r/w

A simple string value used to name this postal address.

mail-class

str

r/w

Classes of mail accepted at this address.

neighborhood

str

r/w

This is used to disambiguate a street address.

po-box

str

r/w

Covers actual P.O. boxes, drawers, locked bags, etc.

postcode

str

r/w

Postal code.

region

str

r/w

A state, province, county, Land, departement, etc.

relation-type

str

r/w

A programmatic value that identifies the type of postal address.

street

str

r/w

Can be street, avenue, road, etc.

subregion

str

r/w

Handles administrative districts such as U.S. or U.K. counties.

usage

str

r/w

The context in which this address can be used.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Parsable

r

Class Details

class GData.GDPostalAddress(**kwargs)
Bases:

GData.Parsable, GData.Comparable

Abstract:

No

Structure:

GData.GDPostalAddressClass

All the fields in the GData.GDPostalAddress structure are private and should never be accessed directly.

New in version 0.2.0.

classmethod new(relation_type, label, is_primary)
Parameters:
  • relation_type (str or None) – the relationship between the address and its owner, or None

  • label (str or None) – a human-readable label for the address, or None

  • is_primary (bool) – True if this phone number is its owner’s primary number, False otherwise

Returns:

a new GData.GDPostalAddress, or None; unref with GObject.Object.unref()

Return type:

GData.GDPostalAddress

Creates a new GData.GDPostalAddress. More information is available in the GData specification.

New in version 0.2.0.

get_address()
Returns:

the postal address itself, or None

Return type:

str

Gets the GData.GDPostalAddress :address property.

New in version 0.4.0.

get_agent()
Returns:

the postal address’ agent, or None

Return type:

str

Gets the GData.GDPostalAddress :agent property.

New in version 0.5.0.

get_city()
Returns:

the postal address’ city, or None

Return type:

str

Gets the GData.GDPostalAddress :city property.

New in version 0.5.0.

get_country()
Returns:

the postal address’ country, or None

Return type:

str

Gets the GData.GDPostalAddress :country property.

New in version 0.5.0.

get_country_code()
Returns:

the postal address’ ISO 3166-1 alpha-2 country code, or None

Return type:

str

Gets the GData.GDPostalAddress :country-code property.

New in version 0.5.0.

get_house_name()
Returns:

the postal address’ house name, or None

Return type:

str

Gets the GData.GDPostalAddress :house-name property.

New in version 0.5.0.

get_label()
Returns:

the postal address’ label, or None

Return type:

str

Gets the GData.GDPostalAddress :label property.

New in version 0.4.0.

get_mail_class()
Returns:

the postal address’ mail class, or None

Return type:

str

Gets the GData.GDPostalAddress :mail-class property.

New in version 0.5.0.

get_neighborhood()
Returns:

the postal address’ neighborhood, or None

Return type:

str

Gets the GData.GDPostalAddress :neighborhood property.

New in version 0.5.0.

get_po_box()
Returns:

the postal address’ P.O. box, or None

Return type:

str

Gets the GData.GDPostalAddress :po-box property.

New in version 0.5.0.

get_postcode()
Returns:

the postal address’ postcode, or None

Return type:

str

Gets the GData.GDPostalAddress :postcode property.

New in version 0.5.0.

get_region()
Returns:

the postal address’ region, or None

Return type:

str

Gets the GData.GDPostalAddress :region property.

New in version 0.5.0.

get_relation_type()
Returns:

the postal address’ relation type, or None

Return type:

str

Gets the GData.GDPostalAddress :relation-type property.

New in version 0.4.0.

get_street()
Returns:

the postal address’ street, or None

Return type:

str

Gets the GData.GDPostalAddress :street property.

New in version 0.5.0.

get_subregion()
Returns:

the postal address’ subregion, or None

Return type:

str

Gets the GData.GDPostalAddress :subregion property.

New in version 0.5.0.

get_usage()
Returns:

the postal address’ usage, or None

Return type:

str

Gets the GData.GDPostalAddress :usage property.

New in version 0.5.0.

is_primary()
Returns:

True if this is the primary postal address, False otherwise

Return type:

bool

Gets the GData.GDPostalAddress :is-primary property.

New in version 0.4.0.

set_address(address)
Parameters:

address (str or None) – the new postal address, or None

Sets the GData.GDPostalAddress :address property to address.

New in version 0.4.0.

set_agent(agent)
Parameters:

agent (str or None) – the new agent for the postal address, or None

Sets the GData.GDPostalAddress :agent property to agent.

Set agent to None to unset the property in the postal address.

New in version 0.5.0.

set_city(city)
Parameters:

city (str or None) – the new city for the postal address, or None

Sets the GData.GDPostalAddress :city property to city.

Set city to None to unset the property in the postal address.

New in version 0.5.0.

set_country(country, country_code)
Parameters:
  • country (str or None) – the new country for the postal address, or None

  • country_code (str or None) – the new country code for the postal address, or None

Sets the GData.GDPostalAddress :country property to country, and GData.GDPostalAddress :country-code to country_code.

Set country or country_code to None to unset the relevant property in the postal address. If a country_code is provided, a country must also be provided.

New in version 0.5.0.

set_house_name(house_name)
Parameters:

house_name (str or None) – the new house name for the postal address, or None

Sets the GData.GDPostalAddress :house-name property to house_name.

Set house_name to None to unset the property in the postal address.

New in version 0.5.0.

set_is_primary(is_primary)
Parameters:

is_primary (bool) – True if this is the primary postal address, False otherwise

Sets the GData.GDPostalAddress :is-primary property to is_primary.

New in version 0.4.0.

set_label(label)
Parameters:

label (str or None) – the new label for the postal address, or None

Sets the GData.GDPostalAddress :label property to label.

Set label to None to unset the property in the postal address.

New in version 0.4.0.

set_mail_class(mail_class)
Parameters:

mail_class (str or None) – the new mail class for the postal address, or None

Sets the GData.GDPostalAddress :mail-class property to mail_class.

Set mail_class to None to unset the property in the postal address.

New in version 0.5.0.

set_neighborhood(neighborhood)
Parameters:

neighborhood (str or None) – the new neighborhood for the postal address, or None

Sets the GData.GDPostalAddress :neighborhood property to neighborhood.

Set neighborhood to None to unset the property in the postal address.

New in version 0.5.0.

set_po_box(po_box)
Parameters:

po_box (str or None) – the new P.O. box for the postal address, or None

Sets the GData.GDPostalAddress :po-box property to po_box.

Set po_box to None to unset the property in the postal address.

New in version 0.5.0.

set_postcode(postcode)
Parameters:

postcode (str or None) – the new postcode for the postal address, or None

Sets the GData.GDPostalAddress :postcode property to postcode.

Set postcode to None to unset the property in the postal address.

New in version 0.5.0.

set_region(region)
Parameters:

region (str or None) – the new region for the postal address, or None

Sets the GData.GDPostalAddress :region property to region.

Set region to None to unset the property in the postal address.

New in version 0.5.0.

set_relation_type(relation_type)
Parameters:

relation_type (str or None) – the new relation type for the postal_address, or None

Sets the GData.GDPostalAddress :relation-type property to relation_type.

Set relation_type to None to unset the property in the postal address.

New in version 0.4.0.

set_street(street)
Parameters:

street (str or None) – the new street for the postal address, or None

Sets the GData.GDPostalAddress :street property to street.

Set street to None to unset the property in the postal address.

New in version 0.5.0.

set_subregion(subregion)
Parameters:

subregion (str or None) – the new subregion for the postal address, or None

Sets the GData.GDPostalAddress :subregion property to subregion.

Set subregion to None to unset the property in the postal address.

New in version 0.5.0.

set_usage(usage)
Parameters:

usage (str or None) – the new usage for the postal address, or None

Sets the GData.GDPostalAddress :usage property to usage.

Set usage to None to unset the property in the postal address.

New in version 0.5.0.

Property Details

GData.GDPostalAddress.props.address
Name:

address

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The postal address itself, formatted and unstructured. It is preferred to use the other, structured properties rather than this one.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDPostalAddress.props.agent
Name:

agent

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The agent who actually receives the mail. Used in work addresses. Also for “in care of” or “c/o”.

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.city
Name:

city

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Can be city, village, town, borough, etc. This is the postal town and not necessarily the place of residence or place of business.

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.country
Name:

country

Type:

str

Default Value:

None

Flags:

READABLE

The name of the country. Since this is paired with GData.GDPostalAddress :country-code, they must both be set with GData.GDPostalAddress.set_country().

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.country_code
Name:

country-code

Type:

str

Default Value:

None

Flags:

READABLE

The ISO 3166-1 alpha-2 country code for the country in GData.GDPostalAddress :country. Since this is paired with GData.GDPostalAddress :country, they must both be set with GData.GDPostalAddress.set_country().

For more information, see the

GData specification or ISO 3166-1 alpha-2.

New in version 0.5.0.

GData.GDPostalAddress.props.house_name
Name:

house-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Used in places where houses or buildings have names (and not necessarily numbers).

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.is_primary
Name:

is-primary

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Indicates which postal address out of a group is primary.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDPostalAddress.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A simple string value used to name this postal address. It allows UIs to display a label such as “Work”, “Personal”, “Preferred”, etc.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDPostalAddress.props.mail_class
Name:

mail-class

Type:

str

Default Value:

'http://schemas.google.com/g/2005#both'

Flags:

READABLE, WRITABLE

Classes of mail accepted at this address. For example: GData.GD_MAIL_CLASS_LETTERS or GData.GD_MAIL_CLASS_BOTH.

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.neighborhood
Name:

neighborhood

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

This is used to disambiguate a street address when a city contains more than one street with the same name, or to specify a small place whose mail is routed through a larger postal town. In China it could be a county or a minor city.

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.po_box
Name:

po-box

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Covers actual P.O. boxes, drawers, locked bags, etc. This is usually but not always mutually exclusive with GData.GDPostalAddress :street.

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.postcode
Name:

postcode

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Postal code. Usually country-wide, but sometimes specific to the city (e.g. “2” in “Dublin 2, Ireland” addresses).

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.region
Name:

region

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A state, province, county (in Ireland), Land (in Germany), departement (in France), etc.

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.relation_type
Name:

relation-type

Type:

str

Default Value:

'http://schemas.google.com/g/2005#work'

Flags:

READABLE, WRITABLE

A programmatic value that identifies the type of postal address. For example: GData.GD_POSTAL_ADDRESS_WORK or GData.GD_POSTAL_ADDRESS_OTHER.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDPostalAddress.props.street
Name:

street

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number.

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.subregion
Name:

subregion

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Handles administrative districts such as U.S. or U.K. counties that are not used for mail addressing purposes. Subregion is not intended for delivery addresses.

For more information, see the

GData specification.

New in version 0.5.0.

GData.GDPostalAddress.props.usage
Name:

usage

Type:

str

Default Value:

'http://schemas.google.com/g/2005#general'

Flags:

READABLE, WRITABLE

The context in which this address can be used. For example: GData.GD_ADDRESS_USAGE_GENERAL or GData.GD_ADDRESS_USAGE_LOCAL.

For more information, see the

GData specification.

New in version 0.5.0.