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, ForwardRef(None), Mapping[str, ForwardRef('JSON')], List[ForwardRef('JSON')]] = None)
-
Abstract class used to reference core Datapane server objects - not used directly.
Subclasses
- Report
- App
- Environment
- File
- datapane.client.api.teams.Run
- Schedule
Class variables
var endpoint : str
var res : datapane.client.api.common.Resource
var list_fields : List[str]
Static methods
def get(name: str, project: Optional[str] = None) ‑> ~U
-
Lookup and retrieve an object from the Datapane Server by its name
Args
name
- The name of the object, e.g. 'my-file-3
or
project1/my-file-3` project
- The project of the object, e.g.
project1
(can be provided with the name as shown above)
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: Optional[pathlib.Path] = None, overwrite: bool = False, **kwargs) ‑> ~U
def post(overwrite: bool = False, **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 : Optional[munch.Munch]
var has_dto : bool
var url : URL
Methods
def refresh(self)
-
Refresh the object with the latest data from the Datapane Server - override to pull updated fields from dto to top-level
def delete(self)
-
Delete the object on the server
def update(self, **kwargs)