arcgis.realtime.velocity.feeds module

RSS

class arcgis.realtime.velocity.feeds.RSS(label, description, rss_url, http_auth_type, http_headers=<factory>, data_format=None, track_id_field=None, geometry=None, time=None, run_interval=RunInterval(cron_expression='0 * * ? * * *', timezone='America/Los_Angeles'))

Poll an HTTP endpoint for RSS events. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

rss_url

String. Address of the HTTP endpoint providing data.

http_auth_type

[NoAuth, BasicAuth, CertificateAuth]. An instance that contains the authentication information for the feed instance.

http_headers

Dict[str, str]. A Name-Value dictionary that contains HTTP headers for connecting to the RSS feed.

Optional Argument

Description

data_format

[RssFormat, GeoRssFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

run_interval

RunInterval. An instance of the scheduler configuration. The default is: RunInterval(cron_expression=``0 * * ? * * *``, timezone=”America/Los_Angeles”)

Returns

A data class with RSS feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import RSS
from arcgis.realtime.velocity.http_authentication_type import (
    NoAuth,
    BasicAuth,
    CertificateAuth,
)

from arcgis.realtime.velocity.input.format import GeoRssFormat
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant
from arcgis.realtime.velocity.feeds.run_interval import RunInterval

name = "rss feed name"
description = "rss feed description"
url = "rss feed url"
http_auth = NoAuth()
# http_auth = BasicAuth(username="username", password="password")
# http_auth = CertificateAuth(pfx_file_http_location="https://link", password="password")

http_headers = {
    "Content-Type": "application/json"
}

# all properties can also be defined in the constructor as follows

# Set data format
data_format = GeoRssFormat()

# Set geometry field
geometry = XYZGeometry(
    x_field="category_longitude",
    y_field="category_latitude",
    wkid=4326,
    z_field="category_altitude",
    z_unit="Meters"
)

# Set time field
time = TimeInterval(
    interval_start_field="start_field",
    interval_end_field="end_field"
)

# Set recurrence
run_interval = RunInterval(
    cron_expression="0 * * ? * * *",
    timezone="America/Los_Angeles"
)

# Configure the RSS Feed
rss = RSS(
    label="feed_name",
    description="feed_description",
    rss_url=url,
    http_auth_type=http_auth,
    http_headers=http_headers,
    track_id_field="track_id",
    data_format=data_format,
    geometry=geometry,
    time=time,
    run_interval=run_interval
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
RSS_feed = feeds.create(rss)
RSS_feed.start()
feeds.items
data_format: Optional[Union[arcgis.realtime.velocity.input.format.RssFormat, arcgis.realtime.velocity.input.format.GeoRssFormat]] = None
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
http_auth_type: Union[arcgis.realtime.velocity.http_authentication_type.NoAuth, arcgis.realtime.velocity.http_authentication_type.BasicAuth, arcgis.realtime.velocity.http_authentication_type.CertificateAuth]
http_headers: Dict[str, str]
rss_url: str
run_interval: arcgis.realtime.velocity.feeds.run_interval.RunInterval = RunInterval(cron_expression='0 * * ? * * *', timezone='America/Los_Angeles')
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
track_id_field: Optional[str, None] = None

HttpPoller

class arcgis.realtime.velocity.feeds.HttpPoller(label, description, url, http_method, http_auth_type, url_params=<factory>, http_headers=<factory>, enable_long_polling=False, data_format=None, track_id_field=None, geometry=None, time=None, run_interval=RunInterval(cron_expression='0 * * ? * * *', timezone='America/Los_Angeles'))

Poll an HTTP endpoint for event data. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

url

String. URL of the HTTP endpoint providing data.

http_http_method

String. HTTP method. Options: GET or POST.

http_auth_type

[NoAuth, BasicAuth, CertificateAuth,OAuth]. An instance that contains the authentication information for this feed instance.

url_params

Dict[str, str]. A dictionary of URL param/value pairs that contains HTTP params used to access the HTTP resource.

http_headers

Dict[str, str]. A Name-Value dictionary that contains HTTP headers for connecting to the HTTP resource.

enable_long_polling

bool. The default is: False.

Optional Argument

Description

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

run_interval

RunInterval. An instance of the scheduler configuration. The default is: RunInterval(cron_expression=”0 * * ? * * *”, timezone=”America/Los_Angeles”)

Returns

A dataclass with Http poller feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import HttpPoller
from arcgis.realtime.velocity.http_authentication_type import (
    NoAuth,
    BasicAuth,
    CertificateAuth,
)
arcgis.realtime.velocity.input.format import DelimitedFormat
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant
from arcgis.realtime.velocity.feeds.run_interval import RunInterval

name = "http_poller_feed_name"
description = "http_poller_description_feed"
url = "http_poller_url"
http_auth = NoAuth()
# http_auth = BasicAuth(username="username", password="password")
# http_auth = CertificateAuth(pfx_file_http_location="http_auth_link", password="password")

http_headers = {"Content-Type": "application/json"}
url_params = {"f": "json"}

http_poller = HttpPoller(
    label=name,
    description=description,
    url=url,
    http_method="GET",
    http_auth_type=http_auth,
    url_params=url_params,
    http_headers=http_headers,
    enable_long_polling=False,
    data_format=None
)

# Set track id field
http_poller.set_track_id("track_id")

# Set time field
time = TimeInstant(time_field="time_field")
http_poller.set_time_config(time=time)

# Set geometry field
geometry = XYZGeometry(
    x_field="x",
    y_field="y",
    wkid=4326
)
http_poller.set_geometry_config(geometry=geometry)

# Set recurrence
http_poller.run_interval = RunInterval(
    cron_expression="0 * * ? * * *", timezone="America/Los_Angeles"
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
http_poller_feed = feeds.create(http_poller)
http_poller_feed.start()
feeds.items
data_format: Optional[Union[arcgis.realtime.velocity.input.format.EsriJsonFormat, arcgis.realtime.velocity.input.format.GeoJsonFormat, arcgis.realtime.velocity.input.format.JsonFormat, arcgis.realtime.velocity.input.format.DelimitedFormat, arcgis.realtime.velocity.input.format.XMLFormat]] = None
enable_long_polling: bool = False
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
http_auth_type: Union[arcgis.realtime.velocity.http_authentication_type.NoAuth, arcgis.realtime.velocity.http_authentication_type.BasicAuth, arcgis.realtime.velocity.http_authentication_type.CertificateAuth]
http_headers: Dict[str, str]
http_method: str
run_interval: arcgis.realtime.velocity.feeds.run_interval.RunInterval = RunInterval(cron_expression='0 * * ? * * *', timezone='America/Los_Angeles')
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
track_id_field: Optional[str, None] = None
url: str
url_params: Dict[str, str]

HttpReceiver

class arcgis.realtime.velocity.feeds.HttpReceiver(label, description, authentication_type, sample_message, data_format=None, track_id_field=None, geometry=None, time=None)

Receive events via a dedicated HTTP endpoint. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

authentication_type

String. Authentication type.

Options:

none or arcgis.

sample_message

String. The sample content to auto-detect the data format.

For example:

“name,agensam,23”

Optional Argument

Description

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with Http receiver feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import HttpReceiver
from arcgis.realtime.velocity.http_authentication_type import (
    NoAuth,
    BasicAuth,
    CertificateAuth,
)

sample_message="name,age

dan,23"

http_receiver = HttpReceiver(
    label="feed_name",
    description="feed_description",
    authentication_type="none",
    sample_message=sample_message,
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
http_receiver_feed = feeds.create(http_receiver)
http_receiver_feed.start()
feeds.items
authentication_type: str
data_format: Optional[Union[arcgis.realtime.velocity.input.format.EsriJsonFormat, arcgis.realtime.velocity.input.format.GeoJsonFormat, arcgis.realtime.velocity.input.format.JsonFormat, arcgis.realtime.velocity.input.format.DelimitedFormat, arcgis.realtime.velocity.input.format.XMLFormat]] = None
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
sample_message: str
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
track_id_field: Optional[str, None] = None

HttpSimulator

class arcgis.realtime.velocity.feeds.HttpSimulator(label, description, url, field_separator=',', features_per_execution=1, interval_for_sending_events=1000, repeat_simulation=True, time_field_index=0, convert_to_current_time=True, data_format=None, track_id_field=None, geometry=None, time=None)

Simulate events from a text file. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

url

String. The full URL to the externally accessible simulation file.

field_separator

String. The character, or delimiter, which separates field values in the simulation file. The default is: ,.

features_per_execution

int. The number of records (features) to simulate at a time. The default is: 1.

interval_for_sending_events

int. The interval between sending the number of features per execution. The default is: 1000.

repeat_simulation

boolean. Whether to automatically restart from the beginning when the end of the file is reached. The default is: True.

time_field_index

int. The numerical index of the date field in the dataset, where the index starts at 0. The default is: 0.

convert_to_current_time

boolean. Whether to convert the time values in the dataset to current time as the data is simulated. The default is: True.

Optional Argument

Description

data_format

[DelimitedFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with Http simulator feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import HttpSimulator
from arcgis.realtime.velocity.input.format import DelimitedFormat
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

http_simulator = HttpSimulator(
    label="feed_name",
    description="feed_description",
    url="http_simulator_url",
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
http_simulator_feed = feeds.create(http_simulator)
http_simulator_feed.start()
feeds.items
convert_to_current_time: bool = True
data_format: Optional[arcgis.realtime.velocity.input.format.DelimitedFormat, None] = None
features_per_execution: int = 1
field_separator: str = ','
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
interval_for_sending_events: int = 1000
repeat_simulation: bool = True
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
time_field_index: int = 0
track_id_field: Optional[str, None] = None
url: str

AWSIoT

class arcgis.realtime.velocity.feeds.AWSIoT(label, description, endpoint, topic, qos_level=0, access_key_id=None, secret_access_key=None, session_token=None, data_format=None, track_id_field=None, geometry=None, time=None)

Receive events from an AWS IoT broker. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for the feed instance.

description

String. Feed description.

endpoint

String. Endpoint for the AWS IoT broker.

topic

String. Topic over which event messages stream.

qos_level

int. The Quality of Service (QoS) level defines the guarantee of delivery for a specific message. A QoS of 0 means a message is delivered zero or more times. It offers better performance, but no guaranteed delivery. A QoS of 1 means a message is delivered at least once, thereby offering guaranteed delivery. With both levels, messages may be delivered multiple times. The default is: 0.

Optional Argument

Description

access_key_id

String. Access key ID for the AWS IoT credentials.

secret_access_key

String. Secret access key for the AWS IoT credentials.

session_token

String. Session token for the AWS IoT broker.

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as the track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with AWS Iot feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import AWSIoT
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

aws_config = AWSIoT(
    label="feed_name",
    description="feed_description",
    endpoint="aws_iot feed endpoint",
    topic="aws_iot_topic",
    qos_level=0,
    access_key_id="aws_iot_access_key_id",
    secret_access_key="aws_iot_secret_access_key",
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
aws_feed = feeds.create(aws_config)
aws_feed.start()
feeds.items
access_key_id: Optional[str, None] = None
data_format: Optional[Union[arcgis.realtime.velocity.input.format.EsriJsonFormat, arcgis.realtime.velocity.input.format.GeoJsonFormat, arcgis.realtime.velocity.input.format.JsonFormat, arcgis.realtime.velocity.input.format.DelimitedFormat, arcgis.realtime.velocity.input.format.XMLFormat]] = None
endpoint: str
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
qos_level: int = 0
secret_access_key: Optional[str, None] = None
session_token: Optional[str, None] = None
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
topic: str
track_id_field: Optional[str, None] = None

AzureEventHub

class arcgis.realtime.velocity.feeds.AzureEventHub(label, description, shared_access_key_name, shared_access_key, event_hub_endpoint, event_hub_entity_path, consumer_group=None, data_format=None, track_id_field=None, geometry=None, time=None)

Receive events from an Azure Event Hub. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

shared_access_key_name

String. Shared access key name for Azure Event Hub credentials.

shared_access_key

String. Shared access key name for Azure Event Hub credentials.

event_hub_endpoint

String. Endpoint of the Azure Event Hub.

event_hub_entity_path

String. Entity path of the Azure Event Hub.

Optional Argument

Description

consumer_group

String. Consumer group for the Azure Event Hub.

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with azure event hub feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import AzureEventHub
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

azure_event_hub_config = AzureEventHub(
    label="feed_name",
    description="feed_description",
    shared_access_key_name="azure_event_hub_shared_key_name",
    shared_access_key="azure_event_hub_shared_key",
    event_hub_endpoint="azure_event_hub_endpoint",
    event_hub_entity_path="azure_event_hub_entity_path",
    consumer_group="azure_consumer_group",
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
azure_event_hub_feed = feeds.create(azure_event_hub_config)
azure_event_hub_feed.start()
feeds.items
consumer_group: Optional[str, None] = None
data_format: Optional[Union[arcgis.realtime.velocity.input.format.EsriJsonFormat, arcgis.realtime.velocity.input.format.GeoJsonFormat, arcgis.realtime.velocity.input.format.JsonFormat, arcgis.realtime.velocity.input.format.DelimitedFormat, arcgis.realtime.velocity.input.format.XMLFormat]] = None
event_hub_endpoint: str
event_hub_entity_path: str
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
shared_access_key: str
shared_access_key_name: str
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
track_id_field: Optional[str, None] = None

AzureServiceBus

class arcgis.realtime.velocity.feeds.AzureServiceBus(label, description, topic_name, subscription_name, shared_access_key_name, shared_access_key, endpoint, data_format=None, track_id_field=None, geometry=None, time=None)

Receive events from an Azure Service Bus. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

topic_name

String. Topic name for the Azure Service Bus.

subscription_name

String. Topic name for the Azure Service Bus.

shared_access_key_name

String. Shared access key name for the Azure Service Bus.

shared_access_key

String. Shared access key for the Azure Service Bus.

endpoint

String. Endpoint of the Azure Service Bus.

Optional Argument

Description

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with azure service bus feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import AzureServiceBus
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

azure_service_bus_config = AzureServiceBus(
    label="feed_name",
    description="feed_description",
    topic_name="azure_service_bus_topic_name",
    subscription_name="azure_service_bus_subscription_name",
    shared_access_key_name="azure_service_bus_shared_access_key_name",
    shared_access_key="azure_service_bus_shared_access_key",
    endpoint="azure_service_bus_endpoint",
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
azure_service_bus_feed = feeds.create(azure_service_bus_config)
azure_service_bus_feed.start()
feeds.items
data_format: Optional[Union[arcgis.realtime.velocity.input.format.EsriJsonFormat, arcgis.realtime.velocity.input.format.GeoJsonFormat, arcgis.realtime.velocity.input.format.JsonFormat, arcgis.realtime.velocity.input.format.DelimitedFormat, arcgis.realtime.velocity.input.format.XMLFormat]] = None
endpoint: str
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
shared_access_key: str
shared_access_key_name: str
subscription_name: str
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
topic_name: str
track_id_field: Optional[str, None] = None

CiscoEdgeIntelligence

class arcgis.realtime.velocity.feeds.CiscoEdgeIntelligence(label, description, host, port, topic, qos_level=0, username=None, password=None, client_id=None, data_format=None, track_id_field=None, geometry=None, time=None)

Receive events from a Cisco Edge Intelligence broker. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

host

String. Hostname of the Cisco Edge Intelligence broker prefixed with “tcp://” for non-SSL or “ssl://” for SSL connections.

port

String. Port on which the Cisco Edge Intelligence broker is accessible.

topic

String. Topic over which event messages stream.

qos_level

int. Quality of Service (QoS) level defines the guarantee of delivery for a specific message. In MQTT 3.1.1, a QoS of 0 means a message is delivered at most once, a QoS of 1 at least once, and a QoS of 2 exactly once. The default is: 0.

Optional Argument

Description

username

Username for basic authentication.

password

Password for basic authentication.

client_id

The client ID ArcGIS Velocity will use to connect to the Cisco Edge Intelligence broker.

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with cisco edge intelligence feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import CiscoEdgeIntelligence
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

cisco_edge_config = CiscoEdgeIntelligence(
    label="feed_name",
    description="feed_description",
    host="cisco_host",
    port="cisco_port",
    topic="cisco_topic",
    qos_level=0,
    username="cisco_username",
    password="cisco_password",
    client_id="cisco_client_id",
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
cisco_edge_feed = feeds.create(cisco_edge_config)
cisco_edge_feed.start()
feeds.items

FeatureLayer

class arcgis.realtime.velocity.feeds.FeatureLayer(label, description, query='1=1', fields='*', outSR=4326, url=None, portal_item_id=None, extent=None, time_stamp_field=None, track_id_field=None, time=None, run_interval=RunInterval(cron_expression='0 * * ? * * *', timezone='America/Los_Angeles'))

Poll a feature layer for features at a fixed schedule. This data class can be used to define the feed configuration and to create the feed.

The data format is a feature layer. ArcGIS Velocity will automatically handle the location for you.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

query

String. Feature layer query parameters. The default is: 1=1.

fields

String. Requested feature layer output fields.

For example:

“field1, field2”

The default is: *.

outSR

int. Requested output spatial reference. The default is: 4326.

Note

To learn more about projected and geographic coordinate systems, refer to Using spatial references.

Optional Argument

Description

portal_item_id

String. The Portal Item ID of the feature layer.

Note

Either the portal_item_id or url is required.

extent

Dict[str, Any]. A Geometry object that defines the spatial extent for the feature layer.

# Sample Value
{
    "spatialReference": {
        "latestWkid": 3857,
        "wkid": 102100
    },
    "xmin": -14784278.027601289,
    "ymin": 2604610.848073723,
    "xmax": -11451317.846255329,
    "ymax": 6852675.132049575
}

time_stamp_field

String. An optional date field for latest features. Optionally, specify a date field to be used to retrieve only the latest features from the feature layer.

If a timestamp field is not specified, ArcGIS Velocity will load all features that meet the criteria of the WHERE clause when it polls the feature layer.

If a timestamp field is specified, the first time ArcGIS Velocity polls the feature layer it will load all features with a timestamp field datetime within the past minute and less than the first feed poll time that also meets the criteria of the WHERE clause. With each subsequent poll, only features with a timestamp field value between the last polling time and the current polling time that also meet the criteria of the WHERE clause will be loaded.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

run_interval

RunInterval. An instance of the scheduler configuration. The default is: RunInterval(cron_expression=”0 * * ? * * *”, timezone=”America/Los_Angeles”)

Returns

A data class with feature layer feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import FeatureLayer
from arcgis.realtime.velocity.http_authentication_type import (
    NoAuth,
    BasicAuth,
    CertificateAuth,
)

from arcgis.realtime.velocity.input.format import DelimitedFormat
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant
from arcgis.realtime.velocity.feeds.run_interval import RunInterval

extent = {
    "spatialReference": {
        "latestWkid": 3857,
        "wkid": 102100
    },
    "xmin": "xmin",
    "ymin": "ymin",
    "xmax": "xmax",
    "ymax": "ymax"
}

# Feature Layer Properties

feature_layer_config = FeatureLayer(
    label="feed_name",
    description="feed_description",
    query="1=1",
    fields="*",
    outSR=4326,
    url="feed_sample_server_link",
    extent=extent,
    time_stamp_field="date_field"
)

feature_layer_config

# Set recurrence
feature_layer_config.run_interval = RunInterval(
    cron_expression="0 * * ? * * *", timezone="America/Los_Angeles"
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
feature_layer_feed = feeds.create(feature_layer_config)
feature_layer_feed.start()
feeds.items
data_format: Any = None
extent: Optional[Dict[str, Any], None] = None
fields: str = '*'
outSR: int = 4326
portal_item_id: Optional[str, None] = None
query: str = '1=1'
run_interval: arcgis.realtime.velocity.feeds.run_interval.RunInterval = RunInterval(cron_expression='0 * * ? * * *', timezone='America/Los_Angeles')
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
time_stamp_field: Optional[str, None] = None
track_id_field: Optional[str, None] = None
url: Optional[str, None] = None

StreamLayer

class arcgis.realtime.velocity.feeds.StreamLayer(label, description, portal_item_id, query='1=1', fields='*', outSR=4326, extent=None, track_id_field=None, time=None)

Receive features from a stream layer. This data class can be used to define the feed configuration and to create the feed.

Data format is Esri stream layer. ArcGIS Velocity will automatically handle the location for you.

Parameter

Description

label

String. Unique label for the feed instance.

description

String. Feed description.

portal_item_id

String. Portal item ID of the stream layer.

query

String. Stream layer query parameters. The default is: “1=1”

fields

String. Requested stream layer output fields.

For example:

“field1,field2”

The default is: “*”.

outSR

int. Requested output spatial reference. The default is: 4326.

Note

To learn more about projected and geographic coordinate systems, refer to Using spatial references.

data_format

String. Specifies the overall format of the incoming data.

Optional Argument

Description

WHERE clause

String. Query to retrieve a subset of features.

Out fields

String. Comma-separated list of fields to use for processing.

Output spatial reference

String. Spatial reference in which queried features should return.

extent

Dict[str, Any]. JSON representing an envelope as defined by the ArcGIS REST API’s JSON geometry schema.

# Sample Value
{
    "spatialReference": {
        "latestWkid": 3857,
        "wkid": 102100
    },
    "xmin": -14784278.027601289,
    "ymin": 2604610.848073723,
    "xmax": -11451317.846255329,
    "ymax": 6852675.132049575
}

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with stream layer feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import StreamLayer
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

extent = {
    "spatialReference": {
        "latestWkid": 3857,
        "wkid": 102100
    },
    "xmin": "xmin",
    "ymin": "ymin",
    "xmax": "xmax",
    "ymax": "ymax"
}

stream_layer_config = StreamLayer(
    label="feed_name",
    description="feed_description",
    portal_item_id="portal_id",
    query="1=1",
    fields="*",
    outSR=4326,
    extent=extent
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
stream_layer_feed = feeds.create(stream_layer_config)
stream_layer_feed.start()
feeds.items
data_format: Any = None
extent: Optional[Dict[str, Any], None] = None
fields: str = '*'
outSR: int = 4326
portal_item_id: str
query: str = '1=1'
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
track_id_field: Optional[str, None] = None

Geotab

class arcgis.realtime.velocity.feeds.Geotab(label, description, url, database, username, password, groups=None, diagnostics_ids=None, data_format=None, track_id_field=None, geometry=None, time=None, run_interval=RunInterval(cron_expression='0 * * ? * * *', timezone='America/Los_Angeles'))

Poll Geotab for event data. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

url

String. The URL to authenticate Geotab.

database

String. The name of the Geotab database providing data.

username

String. Specify the username to authenticate Geotab.

password

String. Specify the password to authenticate Geotab.

Optional Argument

Description

groups

String. List of groups to include in the feature schema. Separate multiple values with a semi-colon (;).

diagnostics_ids

String. List of diagnostic IDs to include in the feature schema. Separate multiple values with a semi-colon (;).

data_format

JsonFormat. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

run_interval

RunInterval. An instance of the scheduler configuration. The default is: RunInterval(cron_expression=”0 * * ? * * *”, timezone=”America/Los_Angeles”)

Returns

A data class with Geotab feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import Geotab
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

geotab = Geotab(
    label="feed_name",
    description="feed_description",
    url="Geotab_url",
    database="Geotab_database",
    username="Geotab_user_name",
    password="Geotab_password",
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
geotab_feed = feeds.create(geotab)
geotab_feed.start()
feeds.items
data_format: Optional[arcgis.realtime.velocity.input.format.JsonFormat, None] = None
database: str
diagnostics_ids: Optional[str, None] = None
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
groups: Optional[str, None] = None
password: str
run_interval: arcgis.realtime.velocity.feeds.run_interval.RunInterval = RunInterval(cron_expression='0 * * ? * * *', timezone='America/Los_Angeles')
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
track_id_field: Optional[str, None] = None
url: str
username: str

Kafka

class arcgis.realtime.velocity.feeds.Kafka(label, description, brokers, topics, authentication, consumer_group_id=None, data_format=None, track_id_field=None, geometry=None, time=None)

Receive event data from a Kafka broker. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

brokers

String. Comma-separated list of Kafka brokers, including the port, such as

host1.domain.com:9092 , host2.domain.com:9092 .

For example:

kafkaServer1.hostname.com:9092,kafkaServer2.hostname.com:9092

topics

String. Topic to which the output will send messages.

authentication

[NoAuth, SASLPlain , SaslScramSha512 SaslScramSha256]. Kafka authentication type.

Optional Argument

Description

consumer_group_id

String. A unique string that identifies the consumer group this feed belongs to as a consumer.

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with Kafka feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import Kafka
from arcgis.realtime.velocity.feeds.kafka_authentication_type import NoAuth, SASLPlain
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

kafka_config = Kafka(
    label="feed_name",
    description="feed_description",
    brokers="kafka.a4iot.com:9092",
    topics="topicName",
    authentication=NoAuth(),
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
kafka_feed = feeds.create(kafka_config)
kafka_feed.start()
feeds.items
authentication: Union[arcgis.realtime.velocity.feeds.kafka_authentication_type.NoAuth, arcgis.realtime.velocity.feeds.kafka_authentication_type.SASLPlain, arcgis.realtime.velocity.feeds.kafka_authentication_type.SaslScramSha256, arcgis.realtime.velocity.feeds.kafka_authentication_type.SaslScramSha512]
brokers: str
consumer_group_id: Optional[str, None] = None
data_format: Optional[Union[arcgis.realtime.velocity.input.format.EsriJsonFormat, arcgis.realtime.velocity.input.format.GeoJsonFormat, arcgis.realtime.velocity.input.format.JsonFormat, arcgis.realtime.velocity.input.format.DelimitedFormat, arcgis.realtime.velocity.input.format.XMLFormat]] = None
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
topics: str
track_id_field: Optional[str, None] = None

MQTT

class arcgis.realtime.velocity.feeds.MQTT(label, description, host, port, topic, qos_level=0, username=None, password=None, client_id=None, data_format=None, track_id_field=None, geometry=None, time=None)

Receive events from an MQTT broker. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for this feed instance.

description

String. Feed description.

host

String. Hostname of the of the broker prefixed with “tcp://” for non-SSL or “ssl://” for SSL connections.

port

int. Port on which the MQTT broker is accessible.

topic

String. Topic over which event messages stream.

qos_level

int. Quality of Service (QoS) level defines the guarantee of delivery for a specific message. In MQTT 3.1.1, a QoS of 0 means a message is delivered at most once, a QoS of 1 at least once, and a QoS of 2 exactly once. The default is: 0.

Optional Argument

Description

username

String. Username for basic authentication.

password

String. Password for basic authentication.

client_id

String. Client ID ArcGIS Velocity will use to connect to the MQTT broker.

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with MQTT feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import MQTT
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

mqtt_config = MQTT(
    label="feed_name",
    description="feed_description",
    host="Mqtt host",
    port=8883,
    topic="Mqtt topic",
    qos_level=0,
    username="Mqtt_username",
    password="Mqtt_password",
    client_id="Mqtt_client_id",
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
mqtt_feed = feeds.create(mqtt_config)
mqtt_feed.start()
feeds.items
client_id: Optional[str, None] = None
data_format: Optional[Union[arcgis.realtime.velocity.input.format.EsriJsonFormat, arcgis.realtime.velocity.input.format.GeoJsonFormat, arcgis.realtime.velocity.input.format.JsonFormat, arcgis.realtime.velocity.input.format.DelimitedFormat, arcgis.realtime.velocity.input.format.XMLFormat]] = None
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
host: str
password: Optional[str, None] = None
port: int
qos_level: int = 0
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
topic: str
track_id_field: Optional[str, None] = None
username: Optional[str, None] = None

RabbitMQ

class arcgis.realtime.velocity.feeds.RabbitMQ(label, description, host, port=5672, use_ssl=False, prefetch_count=0, virtual_host=None, username=None, password=None, queue_name=None, data_format=None, track_id_field=None, geometry=None, time=None)

Receive events from a RabbitMQ broker. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for the feed instance.

description

String. Feed description.

host

String. Host address of the RabbitMQ Server.

For example:

rabbitmqbroker.centralus.cloudapp.azure.com

port

int. Port on which the RabbitMQ Server is accessible. The default is: 5672.

use_ssl

bool. Whether or not to use SSL in the connection. The default is: False.

prefetch_count

int. Prefetch count is used to specify the number of messages RabbitMQ sends. This limits how many messages are received before acknowledging a message. The default is: 0.

Optional Argument

Description

virtual_host

String. Virtual host of the RabbitMQ Server. For example: virtualhost1

username

String. Username for server authentication.

password

String. Password for server authentication.

queue_name

String. Name of the queue over which messages will be received.

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with RabbitMQ feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import RabbitMQ
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

rabbitmq_config = RabbitMQ(
    label="feed_name",
    description="feed_description",
    host="RabbitMQ host",
    username="RabbitMQ_username",
    password="RabbitMQ password",
    prefetch_count=0,
    queue_name="RabbitMQ_queue_name",
    data_format=None
)

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
rabbitmq_feed = feeds.create(rabbitmq_config)
rabbitmq_feed.start()
feeds.items
data_format: Optional[Union[arcgis.realtime.velocity.input.format.EsriJsonFormat, arcgis.realtime.velocity.input.format.GeoJsonFormat, arcgis.realtime.velocity.input.format.JsonFormat, arcgis.realtime.velocity.input.format.DelimitedFormat, arcgis.realtime.velocity.input.format.XMLFormat]] = None
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
host: str
password: Optional[str, None] = None
port: int = 5672
prefetch_count: int = 0
queue_name: Optional[str, None] = None
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
track_id_field: Optional[str, None] = None
use_ssl: bool = False
username: Optional[str, None] = None
virtual_host: Optional[str, None] = None

VerizonConnectReveal

class arcgis.realtime.velocity.feeds.VerizonConnectReveal(label, description, username, password, data_format=None, track_id_field=None, geometry=None, time=None)

Receive messages from Verizon Connect Reveal via a dedicated HTTP endpoint. This data class can be used to define the feed configuration and to create the feed.

Parameter

Description

label

String. Unique label for the feed instance.

description

String. Feed description.

username

String. Specify a new username.

password

String. Specify a new password.

Optional Argument

Description

data_format

[JsonFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with Verizon connection reveal feed configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import VerizonConnectReveal
from arcgis.realtime.velocity.input.format import DelimitedFormat
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

verizon_connect_reveal = VerizonConnectReveal(
    label="feed_name",
    description="feed_description",
    username = "username",
    password = "password",
    data_format=None
)

# user can't change the schema

verizon_connect_reveal.set_track_id("SequenceId")

# create verizon connect reveal feed

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
verizon_connect_reveal_feed = feeds.create(verizon_connect_reveal)
verizon_connect_reveal_feed.start()
feeds.items
data_format: Optional[arcgis.realtime.velocity.input.format.JsonFormat, None] = None
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
password: str
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
track_id_field: Optional[str, None] = None
username: str

WebSocket

class arcgis.realtime.velocity.feeds.WebSocket(label, description, url, data_format=None, track_id_field=None, geometry=None, time=None)

Receives events from a web socket. This data class can be used to define the feed configuration and use it to create the feed.

Parameter

Description

label

String. Unique label for the feed instance.

description

String. Feed description.

url

String. WebSocket URL over which messages are received.

Optional Argument

Description

data_format

[EsriJsonFormat, GeoJsonFormat, DelimitedFormat, JsonFormat, XMLFormat]. An instance that contains the data format configuration for this feed. Configure only allowed formats. If this is not set right during initialization, a format will be auto-detected and set from a sample of the incoming data. This sample will be fetched from the configuration provided so far in the init.

track_id_field

String. Name of the field from the incoming data that should be set as track ID.

geometry

[XYZGeometry, SingleFieldGeometry]. An instance of geometry configuration that will be used to create geometry objects from the incoming data.

time

[TimeInstant, TimeInterval]. An instance of time configuration that will be used to create time information from the incoming data.

Returns

A data class with Web Socket feed configuration configuration.

# Usage Example

from arcgis.realtime.velocity.feeds import WebSocket
from arcgis.realtime.velocity.input.format import DelimitedFormat
from arcgis.realtime.velocity.feeds.geometry import XYZGeometry, SingleFieldGeometry
from arcgis.realtime.velocity.feeds.time import TimeInterval, TimeInstant

web_socket = WebSocket(
    label="feed_name",
    description="feed_description",
    url = "http://feed_url.com"
)

# create web socket feed

# use velocity object to get the FeedsManager instance
feeds = velocity.feeds

# use the FeedsManager object to create a feed from this feed configuration
web_socket_feed = feeds.create(web_socket)
web_socket_feed.start()
feeds.items
data_format: Optional[Union[arcgis.realtime.velocity.input.format.EsriJsonFormat, arcgis.realtime.velocity.input.format.GeoJsonFormat, arcgis.realtime.velocity.input.format.JsonFormat, arcgis.realtime.velocity.input.format.DelimitedFormat, arcgis.realtime.velocity.input.format.XMLFormat]] = None
geometry: Optional[Union[arcgis.realtime.velocity.feeds.geometry.XYZGeometry, arcgis.realtime.velocity.feeds.geometry.SingleFieldGeometry]] = None
time: Optional[Union[arcgis.realtime.velocity.feeds.time.TimeInstant, arcgis.realtime.velocity.feeds.time.TimeInterval]] = None
track_id_field: Optional[str, None] = None
url: str

NoAuth

class arcgis.realtime.velocity.feeds.NoAuth

This dataclass is used to specify that no authentication is needed to connect to a Kafka broker.

SASLPlain

class arcgis.realtime.velocity.feeds.SASLPlain(username, password, use_ssl=True)

This dataclass is used to specify a SASL/Plain Authentication scenario using username and password for connecting to a Kafka broker.

Parameter

Description

username

String. Username for basic authentication.

password

String. Password for basic authentication.

use_ssl

bool. When disabled, ArcGIS Velocity will connect via PLAINTEXT. The default value is True.

password: str
use_ssl: bool = True
username: str

SaslScramSha256

class arcgis.realtime.velocity.feeds.SaslScramSha256(username, password, use_ssl=True)

This dataclass is used to specify a SASL/SCRAM-SHA-256 Authentication scenario using username and password for connecting to a Kafka broker.

Parameter

Description

username

String. Username for authentication.

password

String. Password for authentication.

use_ssl

bool. When disabled, ArcGIS Velocity will connect via PLAINTEXT. The default value is True.

password: str
use_ssl: bool = True
username: str

SaslScramSha512

class arcgis.realtime.velocity.feeds.SaslScramSha512(username, password, use_ssl=True)

This dataclass is used to specify a SASL/SCRAM-SHA-512 Authentication scenario using username and password for connecting to a Kafka broker.

Parameter

Description

username

String. Username for authentication.

password

String. Password for authentication.

use_ssl

bool. When disabled, ArcGIS Velocity will connect via PLAINTEXT. The default value is True.

password: str
use_ssl: bool = True
username: str

XYZGeometry

class arcgis.realtime.velocity.feeds.XYZGeometry(x_field, y_field, wkid, z_field=None, z_unit=None)

Dataclass that holds the XYZ Geometry configuration.

Parameter

Description

x_field

String. Longitude field name.

y_field

String. Latitude field name.

wkid

int. WKID of the geometry.

Optional Argument

Description

z_field

String. Z field name.

z_unit

String. Z units. Options: Kilometers, Meters, Centimeters, Millimeters, Fathoms, Miles, NauticalMiles, Yards, Feet, Inches.

Returns

True if the operation is a success

# Usage Example

geometry = XYZGeometry(
    x_field = "x",
    y_field = "y",
    wkid = 4326
)
wkid: int
x_field: str
y_field: str
z_field: str = None
z_unit: str = None

SingleFieldGeometry

class arcgis.realtime.velocity.feeds.SingleFieldGeometry(geometry_field, geometry_type, geometry_format, wkid)

Dataclass that holds the Single Field Geometry configuration.

Parameter

Description

geometry_field

String. Geometry field name.

Options:

esriGeometryPoint, esriGeometryPolyline, esriGeometryPolygon, esriGeometryMulti.

geometry_type

String. Geometry type.

Options:

esriGeometryPoint, esriGeometryPolyline, esriGeometryPolygon, esriGeometryMulti.

geometry_format

String. Geometry format.

Options:

coordinates, esrijson, geojson, or wkt.

wkid

int. WKID of the geometry.

Returns

True if the operation is a success

# Usage Example

geometry = SingleFieldFeometry(
    geometry_field="geometry_field"
    geometry_type="esriGeometryPoint",
    geometry_format="esrijson",
    wkid=4326
)
geometry_field: str
geometry_format: str
geometry_type: str
wkid: int

TimeInstant

class arcgis.realtime.velocity.feeds.TimeInstant(time_field, date_format=None)

Data class that holds the Instant Time configuration

Parameter

Description

time_field

String. Time field name.

Optional Argument

Description

date_format

String. If the field does not contain epoch values, a date format can be defined for the time field.

Returns

boolean True if the operation is a success

# Usage Example

time = TimeInstant(time_field="time_field")
date_format: str = None
time_field: str

TimeInterval

class arcgis.realtime.velocity.feeds.TimeInterval(interval_start_field, interval_end_field, date_format=None)

Data class that holds the Interval Time configuration

Parameter

Description

interval_start_field

String. Start-time field name for the time interval.

interval_end_field

String. End-time field name for the time interval.

Optional Argument

Description

date_format

String. If the field does not contain epoch values, a date format can be defined for the time field.

Returns

boolean True if the operation is a success

# Usage Example

time = TimeInterval(
    interval_start_field="start_field",
    interval_end_field="end_field"
)
date_format: str = None
interval_end_field: str
interval_start_field: str

RunInterval

class arcgis.realtime.velocity.feeds.RunInterval(cron_expression, timezone='America/Los_Angeles')

Set the run interval for the feed.

Parameter

Description

cron_expression

String. Cron expression that specifies the run interval. You can use the cron generator at the following link to generate a cron expression: Cron Expression Generator & Explainer.

The default is every one minute, represented by the following expression:

0 * * ? * * *

timezone

String. Run interval timezone to use. The default is: “America/Los_Angeles”

Note

To learn more about time zones, see List of tz database time zones page on Wikipedia.

Returns

True if the operation is a success

# Usage Example

feed.run_interval = RunInterval(
    cron_expression="0 * * ? * * *", timezone="America/Los_Angeles",
)

# Seconds value must be between 10 and 59
# Minutes value must be between 1 and 59
# Hours value must be between 1 and 23
cron_expression: str
timezone: str = 'America/Los_Angeles'

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.