Python 3.9 is now generally available.

google.appengine.api.datastore_entities.Event

A calendar event.

Inherits From: GdKind, Entity, expected_type

Includes the event title, description, location, organizer, start and end time, and other details.

This is the gd Event kind. See: https://developers.google.com/gdata/docs/1.0/elements#gdEventKind

These properties are meaningful. They are all optional.

Property name Property type Meaning
title String Event name
content String Event description
author String The organizer's name
where String* Human-readable location (not a GeoPt)
startTime Timestamp Start time
endTime Timestamp End time
eventStatus String One of the Event.Status values
link Link* Page with more information
category Category* Tag or label associated with this event
attendee Contact* Attendees and other related people

The asterisk (*) means this property may be repeated.

The Contact properties should be Keys of Contact entities. They are represented in the XML encoding as linked <gd:who> elements.

kind String
title String
kind_properties List of strings
contact_properties List of string

Child Classes

class Status

Methods

FromPb

View source

Static factory method. Returns the Entity representation of the given protocol buffer (datastore_pb.Entity).

Args
pb datastore_pb.Entity or str encoding of a datastore_pb.Entity
validate_reserved_properties deprecated
default_kind str, the kind to use if the pb has no key.

Returns
Entity the Entity representation of pb

ToPb

View source

Converts this Entity to its protocol buffer representation.

Returns
entity_pb2.Entity

ToXml

View source

Returns the XML format of author, gd:where, gd:when, and gd:eventStatus.

Overrides GdKind.ToXml() to author, gd:where, gd:when, and gd:eventStatus.

app

View source

Returns the name of the application that created this entity, a string or None if not set.

clear

D.clear() -> None. Remove all items from D.

copy

View source

The copy method is not supported.

entity_group

View source

Returns this entity's entity group as a Key.

Note that the returned Key will be incomplete if this is a a root entity and its key is incomplete.

fromkeys

Create a new dictionary with keys from iterable and values set to value.

get

Return the value for key if key is in the dictionary, else default.

is_projection

View source

Returns if this entity is a projection from full entity.

Projected entities:

  • may not contain all properties from the original entity;
  • only contain single values for lists;
  • may not contain values with the same type as the original entity.

is_saved

View source

Returns if this entity has been saved to the datastore.

items

D.items() -> a set-like object providing a view on D's items

key

View source

Returns this entity's primary key, a Key instance.

keys

D.keys() -> a set-like object providing a view on D's keys

kind

View source

Returns this entity's kind, a string.

namespace

View source

Returns the namespace of this entity, a string or None.

parent

View source

Returns this entity's parent, as a Key. If this entity has no parent, returns None.

pop

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.

If key is not found, default is returned if given, otherwise KeyError is raised

popitem

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

set_unindexed_properties

View source

setdefault

View source

If the property exists, returns its value. Otherwise sets it to value.

If the property name is the empty string or not a string, raises BadPropertyError. If the value is not a supported type, raises BadValueError.

unindexed_properties

View source

Returns this entity's unindexed properties, as a frozenset of strings.

update

View source

Updates this entity's properties from the values in other.

If any property name is the empty string or not a string, raises BadPropertyError. If any value is not a supported type, raises BadValueError.

values

D.values() -> an object providing a view on D's values

__contains__

True if the dictionary has the specified key, else False.

__eq__

Return self==value.

__ge__

Return self>=value.

__getitem__

x.getitem(y) <==> x[y]

__gt__

Return self>value.

__iter__

Implement iter(self).

__le__

Return self<=value.

__len__

Return len(self).

__lt__

Return self<value.

__ne__

Return self!=value.

__or__

Return self|value.

__ror__

Return value|self.

CONTACT_PROPERTIES ['attendee']
FOOTER '\n</entry>'
HEADER ("<entry xmlns:gd='http://schemas.google.com/g/2005'>\n" " <category scheme='http://schemas.google.com/g/2005#kind'\n" " term='http://schemas.google.com/g/2005#%s' />")
KIND_PROPERTIES ['title', 'content', 'author', 'where', 'startTime', 'endTime', 'eventStatus', 'link', 'category']