Module datapane.client.api.dp_object
Base classes
The base classes used by all Datapane objects stored on the Datapane Server and accessible by the client API
Note: This module is not used directly
Classes
class DPObjectRef (dto: Union[str, int, float, bool, NoneType, Mapping[str, ForwardRef('JSON')], List[ForwardRef('JSON')]] = None)
-
Abstract class used to reference core Datapane server objects - not used directly.
Subclasses
Class variables
var endpoint : str
var res : datapane.client.api.common.Resource
var list_fields : List[str]
Static methods
def get(name: str, owner: Union[str, NoneType] = None) ‑> ~U
-
Lookup and retrieve an object from the Datapane Server by its name
Args
name
- The name of the object, e.g.
my-blob 3
owner
- The owner of the object, e.g.
fred
Returns
The object if found
def by_id(id_or_url: str) ‑> ~U
-
Lookup and retrieve an object from the Datapane Server by its id
Args
id_or_url
- The
id
, or full URL that represents the object
Returns
The object if found
def post_with_files(files: Dict[str, List[pathlib.Path]] = None, file: Union[pathlib.Path, NoneType] = None, **kwargs) ‑> ~U
def post(**kwargs) ‑> ~U
def list() ‑> Iterable[Dict[str, Any]]
-
Returns: A list of the Datapane objects of this type that are owned by the user
Instance variables
var dto : Union[munch.Munch, NoneType]
var has_dto : bool
var url : URL
Methods
def refresh(self)
-
Refresh the object with the latest data from the Datapane Server
def delete(self)
-
Delete the object on the server
def update(self, **kwargs)