Shortcuts

Object

class geodesic.entanglement.object.Object(**obj)[source]

Bases: geodesic.bases._APIObject

Object represents a node in a graph in Entanglement.

Objects are classified by their class (keyword: object_class), domain, category, type, and name. These values uniquely identify an object. Name and class must be specified, but the rest can remain empty if desired. These properties help to categorize nodes that are similar in name, but represent different things.

Object also has a metaclass, so calling the Object constructer may return a different type based on the specified object_class (or class if created using a dictionary.).

name

(str) - the name of this object, unique to the project

Descriptor: _RegexDescr

alias

(str) - a short name/description for this object - doesn’t need to be unique

Descriptor: _StringDescr

xid

(str) - An external reference id to another graph or system that references this object. This has no constraints, but can be used to look up an item. This does not need to be unique within the graph or project, but should reference a unique object elsewhere. A typical example is an RDF IRI including the namespace prefix (e.g. https;//schema.org/Organization/SeerAI)

Descriptor: _StringDescr

object_class

(str) - the class of this object (e.g. Observable, Entity, Dataset…)

Descriptor: _RegexDescr

domain

(str) - the domain of this object

Descriptor: _RegexDescr

category

(str) - the category of this object

Descriptor: _RegexDescr

type

(str) - the type of this object

Descriptor: _RegexDescr

description

(str) - a text description of this object

Descriptor: _StringDescr

geometry

(str, dict, bytes, BaseGeometry) - a geometry for this object. Can be anything, but only points/polygons are indexed

Descriptor: _GeometryDescr

item

(dict) - an arbitrary dictionary of info about this object. Must be JSON serializable

Descriptor: _DictDescr

project

the project/subgraph this object belongs to

Descriptor: _ProjectDescr

property full_name

Full name for an object. This acts as a sort of unique identifier even before an object is added to Entanglement.

create()[source]

Create a new Object in Entanglement. This will fail if a matching object is found.

Returns

self

Raises

requests.HTTPError – If this failed to create.

save()[source]

Updates an existing Object in Entanglement.

Returns

self

Raises

requests.HTTPError – If this failed to save.

load(uid=None)[source]

Load an object given a UID.

Returns

loaded Object

Parameters

uid – the uid of the object. If none, checks for the uid to have been set on this object.

delete(hard=False, show_prompt=True)[source]

Deletes this object from Entanglement.

get_connections(version_datetime=None)[source]

Returns nearest neighbor connections to this object.

Returns

a list of Connection objects of nearest neighbor edges.

connections(version_datetime=None)

Deprecated in v1.0.0

Returns nearest neighbor connections to this object.

Returns

a list of Connection objects of nearest neighbor edges.

connect_with(predicate, object, overwrite=False)[source]

Adds a connection from this Object to another using the specified Predicate.

Parameters
  • predicate – name of a Predicate or a Predicate object defining the connection and any edge attributes.

  • object – the target Object of this connection.

  • overwrite – If True, will overwrite the connection, else will raise an exception.

Returns

the requested Connection.

property graph

If this object belongs to a graph, will return that parent graph.

property uid

Get the object’s UID, if set, None otherwise.

static from_stac(item, object_class=None, **props)[source]

Derive a new Object from a STAC item.

Parameters
  • item – a STAC Item

  • object_class – what class should this be interpretted as (e.g. ‘Entity’)

  • props – additional properties to be set on this object.

Docs

Developer documentation for Seer AI APIs

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources