diff --git a/CNAME b/CNAME deleted file mode 100644 index c9c8d3d..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -client-docs.deeporigin.io \ No newline at end of file diff --git a/changelog.html b/changelog.html index 383e36b..41ba93b 100644 --- a/changelog.html +++ b/changelog.html @@ -1327,6 +1327,48 @@
deeporigin v2.4.0
¶datahub-api/api/
deeporigin v2.2.1
¶upload_file(file_path: str, client=None) -> None
+upload_file(
+ file_path: str,
+ client=None,
+ *,
+ compute_hash: bool = True
+) -> None
diff --git a/ref/data-hub/types.html b/ref/data-hub/types.html
index 7065124..2a79f3d 100644
--- a/ref/data-hub/types.html
+++ b/ref/data-hub/types.html
@@ -1736,7 +1736,6 @@ *,
use_file_names: bool = True,
reference_format: IDFormat = "human-id",
- return_type: DatabaseReturnType = "dataframe",
client=None
)
@@ -1799,20 +1798,6 @@
- return_type
-
- DatabaseReturnType
-
-
-
- The type of return value. Defaults to "dataframe".
-
-
-
- 'dataframe'
-
-
@@ -1828,11 +1813,7 @@
¶
-to_deeporigin(
- *,
- columns: Optional[list] = None,
- rows: Optional[list] = None
-)
+to_deeporigin()
@@ -1843,49 +1824,6 @@
To automatically save changes to local DataFrames to Deep Origin databases, set the auto_sync
attribute of the dataframe True
.
-
-Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- columns
-
- list
-
-
-
- The columns of the dataframe to update. When None, all modified columns are updated.
-
-
-
- None
-
-
-
- rows
-
- list
-
-
-
- The rows to update. Defaults to None. When None, all rows in the relevant columns are updated.
-
-
-
- None
-
-
-
-
-
pip install deeporigin
.The Deep Origin CLI and Python client allow you to programmatically interact with the Deep Origin OS . The example below illustrates how to use the CLI and Python library to retrieve the database row with ID data-1
.
deeporigin data show data-1\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Column \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Boolean \u2502 False \u2502\n\u2502 Float \u2502 112 \u2502\n\u2502 Select \u2502 sdsd \u2502\n\u2502 Date \u2502 2024-06-19 00:00:00 \u2502\n\u2502 File \u2502 _file:hnU7F62xeW8j0l1kR7YP1 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
from deeporigin.data_hub import api\n\napi.get_row_data(\"data-1\")\n\n# {'Status': 'Processing',\n# 'Age (years)': 15,\n# 'Gender': 'F',\n# 'Order date': '2024-03-01T00:00:00',\n# 'Received by client': '2023-04-05T00:00:00',\n# 'Sent to client': '2024-03-03T00:00:00',\n# 'Sent by client': '2024-03-05T00:00:00',\n# 'Raw reads': ['_file:UjKrB0QibhgBDAVvGQ3VP'],\n# 'Date completed': '2024-03-08T00:00:00',\n# }\n
"},{"location":"changelog.html","title":"Changelog","text":""},{"location":"changelog.html#deeporigin-v221","title":"deeporigin v2.2.1
","text":"api.list_files
functiondf.tail()
and df.head()
deeporigin v2.1.1
","text":"deeporigin v2.1.0
","text":"On a Deep Origin workstation, no configuration is needed! Within a workstation, the Deep Origin CLI and Python client are automatically configured.
"},{"location":"configure.html#on-your-local-computer","title":"On your local computer","text":"To run this package outside of a Deep Origin workstation (for example, on your own computer), first you need to configure this package. After installing this package, run the following to configure your organization, replacing org-id
with the ID of the Deep Origin organization that you would like to work with.
deeporigin config set organization_id [org-id]\n
"},{"location":"configure.html#view-configuration","title":"View configuration","text":"To view the configuration for this package, run:
deeporigin config show\n
This will display a table such as below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Variable \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 organization_id \u2502 likely-aardvark-ewo \u2502\n\u2502 bench_id \u2502 average-possum-3x3 \u2502\n\u2502 env \u2502 us-west-1 \u2502\n\u2502 api_endpoint \u2502 https://os.prod.deeporigin.io/api \u2502\n\u2502 nucleus_api_route \u2502 nucleus-api/api/ \u2502\n\u2502 auth_domain \u2502 https://formicbio-dev.us.auth0.com \u2502\n\u2502 auth_device_code_endpoint \u2502 oauth/device/code/ \u2502\n\u2502 auth_token_endpoint \u2502 oauth/token/ \u2502\n\u2502 auth_audience \u2502 https://os.deeporigin.io/api \u2502\n\u2502 auth_grant_type \u2502 urn:ietf:params:device_code \u2502\n\u2502 auth_client_id \u2502 <secret> \u2502\n\u2502 auth_client_secret \u2502 <secret> \u2502\n\u2502 variables_cache_filename \u2502 ~/variables.yml \u2502\n\u2502 feature_flags \u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
"},{"location":"configure.html#set-a-configuration-variable","title":"Set a configuration variable","text":"To set a variable, run:
deeporigin config set [variable-name] [variable-value]\n
For example, to configure your organization, run:
deeporigin config set organization_id likely-aardvark-ewo\n
"},{"location":"install.html","title":"Installation","text":""},{"location":"install.html#on-a-deep-origin-workstation","title":"On a Deep Origin workstation","text":"No installation needed!
The Deep Origin CLI and Python client are installed on every workstation.
"},{"location":"install.html#on-your-local-computer","title":"On your local computer","text":"Run the command below for your favorite package manager to install the Deep Origin CLI and Python client.
pippixipipxpipenvpoetryuvmicromambaflitpip install deeporigin\n
pixi add deeporigin\n
pipx install deeporigin\n
pipenv install deeporigin\n
poetry add deeporigin\n
uv pip install deeporigin\n
micromamba install -c https://repo.prefix.dev/deeporigin-public deeporigin\n
flit install deeporigin\n
"},{"location":"install.html#for-developers","title":"For developers","text":"Developers only
If you intend to contribute this package, we recommend installing this package via the instructions below. If you simply intend to use this package, we recommend following the instructions above.
"},{"location":"install.html#get-the-code","title":"Get the code","text":"First, run the following command to clone the source code repository:
git clone git@github.com:deeporiginbio/deeporigin-client.git\n
"},{"location":"install.html#install-the-development-dependencies-for-this-package","title":"Install the development dependencies for this package","text":"Second, install Python 3.9+ and make.
To verify that both are installed, run the following commands:
python3 --version\n# Python 3.12.3\n\nmake --version\n# GNU Make 4.4.1\n
"},{"location":"install.html#create-an-editable-installation-of-this-package-from-the-cloned-source-code","title":"Create an editable installation of this package from the cloned source code","text":"Third, navigate to the directory you cloned the code to, and run the following command:
make install\n
This will install this package in an \"editable\" mode. In this mode, changes to the source code will take effect immediately.
"},{"location":"install.html#run-the-linting-and-tests-for-this-package","title":"Run the linting and tests for this package","text":"Once installed, you can lint and test this package by running the following commands:
make lint\nmake test\n
"},{"location":"install.html#compiling-and-serving-the-documentation-for-this-package","title":"Compiling and serving the documentation for this package","text":"You can compile and serve the documentation for this package by running:
make docs-serve\n
"},{"location":"install.html#supported-python-versions","title":"Supported Python versions","text":"deeporigin
is tested against the following versions of Python in Ubuntu Linux and Windows:
The Deep Origin compute hub allows you create and use powerful workstations with pre-installed software packages. Deep Origin was built to help computational scientists get clean data from their labs and perform advanced analyses and simulations.
Each Deep Origin workstation comes pre-installed and pre-configured with this Python client and CLI.
Learn more about the compute hub here .
"},{"location":"data-hub/index.html","title":"Data hub","text":"The Deep Origin data hub provides R&D teams a foundation for collaboratively capturing data, extracting insights, and making decisions:
Learn more about the data hub here .
"},{"location":"data-hub/dataframes.html","title":"Using Deep Origin DataFrames","text":"This page describes how to a Deep Origin DataFrame, which are the primary object you will use to interact with a database on Deep Origin. This page will cover:
What is a Deep Origin DataFrame?
A Deep Origin DataFrame is a subclass of a pandas.DataFrame that is created from a Deep Origin database, and can easily write data back to it. Because it is a subclass of a pandas DataFrame, all pandas DataFrame methods work on Deep Origin DataFrames.
"},{"location":"data-hub/dataframes.html#create-a-dataframe","title":"Create a DataFrame","text":"Create a DataFrame using:
from deeporigin.data_hub.dataframe import DataFrame\ndf = DataFrame.from_deeporigin(\"database-id\")\n
In a Jupyter Lab, you should be able to view the DataFrame using:
df\n
which should show you something like this:
Information in the DataFrame
In addition to information you would find in the rows and columns of a pandas DataFrame, a Deep Origin DataFrame also contains metadata about the underlying database. In the view above we also see:
Because a Deep Origin DataFrame is a subclass of a pandas DataFrame, all pandas DataFrame methods work on Deep Origin DataFrames. In this example, we modify values in one of the columns, or modify a single cell.
Modify entire columnsModify data in a single cellTo modify entire columns, use native pandas syntax:
df[\"y^2\"] = df[\"y\"] ** 2\n
To modify data in a single cell, use native pandas syntax (the at operator):
df.at[\"sgs-1\", \"y\"] = 10\n
In either case, when we view the DataFrame once more using df
, we see the updated data, together with a warning telling us that we have local changes that haven't been written back to Deep Origin.
Work in progress
Writing data back to Deep Origin from a Deep Origin DataFrame is still a work in progress. The following functionality is not yet supported. To perform these functions, use the API directly instead.
from_deeporigin
method.from_deeporigin
method.to_deeporigin
method","text":"Local changes in the dataframe can be written back to Deep Origin using the to_deeporigin
method:
df.to_deeporigin()\n\n# \u2714\ufe0e Wrote 9 rows in y^2 to Deep Origin database.\n
The to_deeporigin
method writes data that have been modified in the local dataframe back to the corresponding Deep Origin Database.
Intelligent writing
to_deeporigin
will generate a print statement describing the changes that have been written back to Deep Origin. to_deeporigin
method.If we now view the dataframe once more using df
, we see the following:
Note that the warning about local changes that have not been written back to Deep Origin has disappeared, because the changes have been written back to Deep Origin.
"},{"location":"data-hub/dataframes.html#automatic-writing-to-deep-origin","title":"Automatic writing to Deep Origin","text":"All Deep Origin DataFrames have an attribute called auto_sync
that determines if local changes are written automatically to Deep Origin. By default, auto_sync
is set to False
, requiring you to call the to_deeporigin
method to write changes back to Deep Origin.
To enable automatic syncing, set the auto_sync
attribute to True
:
df.auto_sync = True\ndf\n
Note that the dataframe now displays a message indicating that local changes will be written back to Deep Origin.
Making any change to the dataframe now triggers a write back to the Deep Origin database.
df[\"y^2\"] = df[\"y\"] * 0.99\ndf\n\n# \u2714\ufe0e Wrote 9 rows in y^2 to Deep Origin database.\n
Use auto_sync
with caution
Turning on auto_sync
on dataframes can be dangerous. - Changes made to the local database are written to a Deep Origin database automatically, and no confirmation is asked for. - This can cause data loss. - Every change made to the database is written immediately, so modifying the local dataframe multiple times leads to multiple writes to a Deep Origin database.
Read more about the to_deeporigin
method here.
Configure if running locally
If you're running this code on your local computer (outside of a Deep Origin Workstation), make sure to configure it first.
To use most of the functionality of the CLI or Python client, you must first run one of the following commands to sign into Deep Origin.
CLIPythondeeporigin authenticate\n
from deeporigin import auth\nauth.authenticate()\n
In either case, you will be presented with a prompt similar to below:
To connect to the Deep Origin OS, navigate your browser to \n\nhttps://<env>auth0.com/activate?user_code=VMPZ-PQFG\n\nand verify the confirmation code is \"VMPZ-PQFG\", and click the \"Confirm\" button.\n
When you visit that URL, you will see a prompt that looks like:
After clicking the Confirm
button, you will see a confirmation similar to below:
After signing in, your access tokens will be cached to disk and then automatically be used in subsequent interactions with Deep Origin.
Authenticating
In most cases, you only need to authenticate to the Deep Origin OS once. You do not need to authenticate every time you use the client or the CLI.
Authenticating on Deep Origin workstations
Presently, workstation users must authenticate (once) to the Deep Origin OS. We plan to develop the capability to automatically authenticate workstation users.
"},{"location":"how-to/compute-hub/variables.html","title":"Install variables and secrets","text":"Variables and secrets captured in the Deep Orgin OS, either at the organization level or the account level, can be installed into workstations by running the following command:
deeporigin variables install\n
This command will install your variables and secrets into your workstation and print a message similar to that below:
No variables were modified\nNo variables were added\nNo variables were deleted\n1 variables were unmodified:\n EnvironmentVariable: foo\n
Only on Deep Origin workstations
This function of the CLI only works on Deep Origin workstations. This function will not work on your local computer.
"},{"location":"how-to/compute-hub/workstation-info.html","title":"Get information about your Deep Origin workstation","text":"Inside a Deep Origin workstation, run the following command to get information about the workstation:
deeporigin context\n
This will display a table similar to below:
Workstation ID: average-possum-3x3\nUser ID: None\nOrganization ID: likely-aardvark-ewo\nEnvironment: edge\nDebug: False\n
Only supported on Deep Origin workstations
Note that this command is only supported on Deep Origin workstations. If you run this command outside of a workstation, you will likely see this output:
Workstation ID: None\nUser ID: None\nOrganization ID: None\nEnvironment: None\nDebug: False\n
"},{"location":"how-to/data-hub/create.html","title":"Create objects","text":"This document describes how to create databases, columns in databases, and folders (workspaces) in the Deep Origin data hub.
"},{"location":"how-to/data-hub/create.html#folders","title":"Folders","text":"Folders can be created by specifying a name, and, optionally, a parent.
CLIPythonIf no parent is specified, the folder will be created at the root level.
deeporigin data new folder --name <name> \n
To create a folder within another folder, specify the parent:
deeporigin data new folder \\\n --name <name> \\ \n --parent <parent-id>\n
from deeporigin.data_hub import api\napi.create_workspace(name=\"test-folder\")\n
To create a folder within another folder, specify the parent:
api.create_workspace(\n name=\"test-folder-2\",\n parent_id=\"parent-id\",\n)\n
"},{"location":"how-to/data-hub/create.html#databases","title":"Databases","text":"Databases can be created by specifying a name, and, optionally, a parent.
CLIPythonIf no parent is specified, the database will be created at the root level.
deeporigin data new --name <name> --database\n
To create a folder within another folder, specify the parent:
deeporigin data new database \\\n --name <name> \\\n --parent <parent-id>\n
from deeporigin.data_hub import api\napi.create_database(name=\"test-database\")\n
To create a folder within another folder, specify the parent:
api.create_database(\n name=\"test-database-2\",\n parent_id=\"parent-id\",\n)\n
"},{"location":"how-to/data-hub/create.html#database-columns","title":"Database columns","text":"Work in progress
Currently, this package has limited support for creating database columns. We plan to expand the capabilities of this package.
To create a new database column in an existing database, run:
CLIPythondeeporigin data new column \\\n --name <name> \\\n --database <database-id> \\\n --type <type>\n
from deeporigin.data_hub import api\napi.add_database_column(\n database_id=\"existing-database-id\",\n key=\"unique-key\",\n type=\"integer\",\n name=\"unique-name\",\n)\n
This code creates a new column in the existing database. To configure the type of the column, use the type
argument. The type must a member of DataType.
This document describes how to delete objects in the Deep Origin data hub:
Exercise caution
All resources will be deleted without asking for confirmation.
"},{"location":"how-to/data-hub/delete.html#delete-database-rows","title":"Delete database rows","text":"To delete a row in a database, run:
CLIPythondeeporigin data delete \\\n --row <row-id> \\\n --database <database-id>\n
from deeporigin.data_hub import api\napi.delete_rows(row_ids=[\"row-1\", \"row-2\"], database_id=\"database-id\")\n
Deleting multiple rows
Note that the python client allows you to delete multiple rows at once.
"},{"location":"how-to/data-hub/delete.html#delete-databases","title":"Delete databases","text":"To delete an entire database, run:
CLIPythondeeporigin data delete --database <db-id>\n
Aliases
The following alias also works: deeporigin data delete -d <db-id>
.
from deeporigin.data_hub import api\napi.delete_database(database_id=<db-id>)\n
"},{"location":"how-to/data-hub/delete.html#delete-folders-workspaces","title":"Delete folders (workspaces)","text":"To delete an entire folder, including all contained databases, run:
CLIPythondeeporigin data delete --folder <id>\n
Aliases
The following aliases also work --workspace
, -w
, --ws
, -f
instead of --folder
.
from deeporigin.data_hub import api\napi.delete_workspace(workspace_id=<folder-id>)\n
"},{"location":"how-to/data-hub/delete.html#delete-database-column","title":"Delete database column","text":"To delete a column in a databas, run the following command, specifying the ID of the column to delete and its parent database:
CLIPythondeeporigin data delete \\\n --column <ids> \\\n --database <database-id> \\\n
from deeporigin.data_hub import api\napi.delete_database_column(\n column_id=\"col-id\",\n database_id=\"database-id\",\n)\n
"},{"location":"how-to/data-hub/download-files.html","title":"Download files","text":"This page describes how to download files from Deep Origin to your local computer.
"},{"location":"how-to/data-hub/download-files.html#download-one-or-many-files-from-the-data-hub","title":"Download one or many files from the Data hub","text":"To download file(s) to the Deep Origin data hub, run the following commands:
CLIPythondeeporigin data download-files\n
This will download all files on Deep Origin to the current folder.
To download files that have been assigned to a particular row, use:
deeporigin data download-files --assigned-row-ids <row-id-1> <row-id-2> ...\n
To download specific files, pass the file IDs using:
deeporigin data download-files --file-ids <file-1> <file-1> ...\n
from deeporigin.data_hub import api\napi.download_files(files)\n
files
is a list of files to download, and is a list of ListFilesResponse
objects. To obtain this list, use api.list_files()
, the output of which can be used as an input to download_files
.
Download all files
To download all files, call api.list_files()
and pass the output to download_files
.
This page describes how to list resources on Deep Origin. Listing folders (workspaces), databases, rows and files can be used to discover the resources available on Deep Origin, and show their IDs for further queries.
"},{"location":"how-to/data-hub/list-data.html#list-folders","title":"List folders","text":"To list all of your Deep Origin folders, run:
CLIPythondeeporigin data list --folders\n
This will display a screen similar to below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Name \u2502 Type \u2502 ID \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Secret Project \u2502 workspace \u2502 secret \u2502\n\u2502 QC Efforts \u2502 workspace \u2502 qc-efforts \u2502\n\u2502 Covid Target \u2502 workspace \u2502 corona \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data list --folders --json | jq\n
[\n {\n \"id\": \"_workspace:ncZhbnYXXfg0zWNcGKTnz\",\n \"parentId\": null,\n \"hid\": \"secret\",\n \"type\": \"workspace\",\n \"name\": \"Secret Project\"\n },\n {\n \"id\": \"_workspace:sDTZKGZXOkhGw6XSg2Jla\",\n \"parentId\": null,\n \"hid\": \"qc-efforts\",\n \"type\": \"workspace\",\n \"name\": \"QC Efforts\"\n },\n {\n \"id\": \"_workspace:UWhlb4Wyzh2R7bySapY2m\",\n \"parentId\": null,\n \"hid\": \"corona\",\n \"type\": \"workspace\",\n \"name\": \"Covid Target\"\n }\n]\n
Combining outputs You can combine multiple output types. For example, to list all folders and databases:
deeporigin data list --folders --databases\n
from deeporigin.data_hub import api\napi.list_rows(row_type=\"workspace\")\n
"},{"location":"how-to/data-hub/list-data.html#list-databases","title":"List databases","text":"To list all of your databases in Deep Origin, run:
CLIPythondeeporigin data list --databases\n
This will display a screen similar to below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Name \u2502 Type \u2502 ID \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 First Database \u2502 database \u2502 first \u2502\n\u2502 QC Efforts \u2502 database \u2502 qc-efforts \u2502\n\u2502 Covid Target \u2502 database \u2502 corona \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data list --databases --json | jq\n
[\n {\n \"id\": \"_database:ncZhbnYXXfg0zWNcGKTnz\",\n \"parentId\": \"_workspace:ncZhbnYXXfg0zWNcGKTnz\",\n \"hid\": \"db-first\",\n \"type\": \"database\",\n \"name\": \"First Database\"\n },\n {\n \"id\": \"_database:sDTZKGZXOkhGw6XSg2Jla\",\n \"parentId\": \"_workspace:sDTZKGZXOkhGw6XSg2Jla\",\n \"hid\": \"db-qc\",\n \"type\": \"database\",\n \"name\": \"QC Efforts\"\n },\n {\n \"id\": \"_database:UWhlb4Wyzh2R7bySapY2m\",\n \"parentId\": \"_workspace:UWhlb4Wyzh2R7bySapY2m\",\n \"hid\": \"db-covid\",\n \"type\": \"database\",\n \"name\": \"Covid Target\"\n }\n]\n
Combining outputs You can combine multiple output types. For example, to list all folders and databases:
deeporigin data list --folders --databases\n
from deeporigin.data_hub import api\napi.list_rows(row_type=\"database\")\n
"},{"location":"how-to/data-hub/list-data.html#list-rows","title":"List rows","text":"To list all of your database rows in Deep Origin:
CLIPythondeeporigin data list --rows\n
This will display a screen similar to below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Name \u2502 Type \u2502 ID \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 row \u2502 data-1 \u2502\n\u2502 \u2502 row \u2502 data-2 \u2502\n\u2502 \u2502 row \u2502 data-3 \u2502\n\u2502 \u2502 row \u2502 data-4 \u2502\n\u2502 \u2502 row \u2502 data-5 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
from deeporigin.data_hub import api\napi.list_rows(row_type=\"row\")\n
"},{"location":"how-to/data-hub/list-data.html#list-files","title":"List files","text":"To list all of your files in Deep Origin, run:
CLIPythondeeporigin data list --files\n
This will display a screen similar to below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Name \u2502 Status \u2502 ID \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 db-dna.csv \u2502 ready \u2502 _file:gBAK9tzFC5Cegx4NmSETc \u2502\n\u2502 seqs.gz \u2502 ready \u2502 _file:FgVjcv8zzyPho6FME8QFp \u2502\n\u2502 db-rna.csv \u2502 ready \u2502 _file:hnU7F62xeW8j0l1kR7YP1 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data list --databases --json | jq\n
[\n {\n \"file\": {\n \"id\": \"_file:gBAK9tzFC5Cegx4NmSETc\",\n \"uri\": \"s3://_file:gBAK9tzFC5Cegx4NmSETc\",\n \"name\": \"db-dna.csv\",\n \"status\": \"ready\",\n \"contentLength\": 234,\n \"contentType\": \"text/csv\",\n \"dateCreated\": \"2024-05-08 01:01:48.925\",\n \"dateUpdated\": \"2024-05-08 01:01:48.925\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\"\n }\n },\n {\n \"file\": {\n \"id\": \"_file:FgVjcv8zzyPho6FME8QFp\",\n \"uri\": \"s3://_file:FgVjcv8zzyPho6FME8QFp\",\n \"name\": \"seqs.gz\",\n \"status\": \"ready\",\n \"contentLength\": 554588,\n \"contentType\": \"zip/gz\",\n \"dateCreated\": \"2024-05-08 18:08:09.149\",\n \"dateUpdated\": \"2024-05-08 18:08:09.149\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\"\n },\n \"assignments\": [\n {\n \"rowId\": \"_row:WORR9xeGvG6mSg0yyDRlk\"\n }\n ]\n },\n {\n \"file\": {\n \"id\": \"_file:hnU7F62xeW8j0l1kR7YP1\",\n \"uri\": \"s3://_file:hnU7F62xeW8j0l1kR7YP1\",\n \"name\": \"db-rna.csv\",\n \"status\": \"ready\",\n \"contentLength\": 234,\n \"contentType\": \"text/csv\",\n \"dateCreated\": \"2024-05-08 18:07:57.655\",\n \"dateUpdated\": \"2024-05-08 18:07:57.655\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\"\n },\n \"assignments\": [\n {\n \"rowId\": \"_row:mlNnmNkfktz7GT5qpjyrF\"\n }\n ]\n }\n]\n
Listing files cannot list other objects
If you pass --files
to the list command, all other arguments are ignored. As a result,
deeporigin data list --files --databases\n
will only list files. First, we start off by importing the necessary modules:
We can list all files on Deep Origin using:
from deeporigin.data_hub import api\napi.list_files()\n
To find only unassigned files, we can use:
api.list_files(is_unassigned=True)\n
To find files that are assigned to a specific row:
api.list_files(assigned_row_ids=[\"row-1\"])\n
"},{"location":"how-to/data-hub/upload-files.html","title":"Upload files","text":"This page describes how to upload files to the Deep Origin data hub, and assign them to individual cells.
"},{"location":"how-to/data-hub/upload-files.html#upload-a-file-to-the-data-hub","title":"Upload a file to the data hub","text":"To upload a file to the Deep Origin data hub, run the following commands:
CLIPythondeeporigin data upload /path/to/test.fasta\n
This will upload the file to your data hub, but the file will not yet be assigned to any database or cell. An example response is shown below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Property \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 name \u2502 test.fasta \u2502\n\u2502 contentType \u2502 data/fasta \u2502\n\u2502 contentLength \u2502 554588 \u2502\n\u2502 id \u2502 _file:36ufKT2Sej22coSEOizpK \u2502\n\u2502 status \u2502 ready \u2502\n\u2502 uri \u2502 s3://foo \u2502\n\u2502 dateCreated \u2502 2024-06-18T14:48:33.501Z \u2502\n\u2502 dateUpdated \u2502 2024-06-18T14:48:33.501Z \u2502\n\u2502 createdByUserDrn \u2502 levins@deeporigin.com \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin upload /path/to/test.fasta | jq\n
{\n \"name\": \"test.fasta\",\n \"contentType\": \"data/fasta\",\n \"contentLength\": 554588,\n \"id\": \"_file:36ufKT2Sej22coSEOizpK\",\n \"status\": \"ready\",\n \"uri\": \"s3://foo\",\n \"dateCreated\": \"2024-06-18T14:51:43.876Z\",\n \"dateUpdated\": \"2024-06-18T14:51:43.876Z\",\n \"createdByUserDrn\": \"levins@deeporigin.com\"\n}\n
from deeporigin.data_hub import api\napi.upload_file(\"/path/to/file.fasta\")\n
This will upload the file to your data hub. An example is shown below:
{\n \"name\": \"file.fasta\",\n \"contentType\": \"data/foo\",\n \"contentLength\": 55454688,\n \"id\": \"_file:6Hdhyc3t8xZ6pmyCrQy1t\",\n \"status\": \"ready\",\n \"uri\": \"s3://data.<org-name>/_file:6Hdhyc3t8xZ6pmyCrQy1t\",\n \"dateCreated\": \"2024-06-18T14:18:37.409Z\",\n \"dateUpdated\": \"2024-06-18T14:18:37.409Z\",\n \"createdByUserDrn\": \"haldane@deeporigin.com\",\n}\n
"},{"location":"how-to/data-hub/upload-files.html#upload-a-file-to-an-existing-row","title":"Upload a file to an existing row","text":"To upload a file and assign it to a cell in an existing row, run the following commands:
CLIPythondeeporigin data upload /path/to/test.fasta \\\n --column <column_id> \\\n --database <database_id> \\\n --row <row_id>\n
from deeporigin.data_hub import api\napi.upload_file(\"/path/to/file.fasta\")\n
To assign an uploaded file to a cell in an existing row, run the assign_files_to_cell
function:
api.assign_files_to_cell(\n file_ids=[\"_file:6Hdhyc3t8xZ6pmyCrQy1t\"],\n database_id=\"db-dna\",\n column_id=\"base_sequence_file\",\n row_id=\"row-id\",\n)\n
"},{"location":"how-to/data-hub/upload-files.html#upload-a-file-to-a-new-row-of-a-database","title":"Upload a file to a new row of a database","text":"To upload a file and assign it to a column in a new row, run the following commands:
CLIPythondeeporigin data upload /path/to/test.fasta \\\n --column <column_id> \\\n --database <database_id> \n
This omits the --row
parameter, which would create a new row in the database.
First, upload a file to your data hub by running:
from deeporigin.data_hub import api\napi.upload_file(\"/path/to/file.fasta\")\n
Second, assign the file to a new row by running:
api.assign_files_to_cell(\n file_ids=[\"_file:6Hdhyc3t8xZ6pmyCrQy1t\"],\n database_id=\"db-dna\",\n column_id=\"base_sequence_file\",\n)\n
"},{"location":"how-to/data-hub/view-data.html","title":"View data","text":"This page describes how to describe and show the details of data objects in Deep Origin. To simply list objects, see List data.
"},{"location":"how-to/data-hub/view-data.html#describe-data","title":"Describe data","text":""},{"location":"how-to/data-hub/view-data.html#describe-rows","title":"Describe rows","text":"Describing rows provides metadata about the row, such as its ID, parent, and status.
Describe vs. Show
This does not show you information in that row. To see data contained in that row, use the show
command.
To describe a row in a database in Deep Origin, run:
CLIPythondeeporigin data describe <row-id>\n
This will display a table similar to:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Column \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 id \u2502 _row:WORR9xeGvG6mSg0yyDRlk \u2502\n\u2502 parentId \u2502 _database:kyEws11L4KagGAaqRwONv \u2502\n\u2502 type \u2502 row \u2502\n\u2502 dateCreated \u2502 2024-05-08 17:59:32.512306 \u2502\n\u2502 dateUpdated \u2502 2024-05-08 18:08:13.103 \u2502\n\u2502 createdByUserDrn \u2502 scientist@deeporigin.com \u2502\n\u2502 editedByUserDrn \u2502 scientist@deeporigin.com \u2502\n\u2502 hid \u2502 data-2 \u2502\n\u2502 validationStatus \u2502 valid \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data describe <row-id> --json | jq\n
{\n \"id\": \"_row:WORR9xeGvG6mSg0yyDRlk\",\n \"parentId\": \"_database:kyEws11L4KagGAaqRwONv\",\n \"type\": \"row\",\n \"dateCreated\": \"2024-05-08 17:59:32.512306\",\n \"dateUpdated\": \"2024-05-08 18:08:13.103\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\",\n \"editedByUserDrn\": \"scientist@deeporigin.com\",\n \"hid\": \"data-2\",\n \"validationStatus\": \"valid\"\n}\n
from deeporigin.data_hub import api\napi.describe_row(\"_row:WORR9xeGvG6mSg0yyDRlk\")\n
"},{"location":"how-to/data-hub/view-data.html#describe-files","title":"Describe files","text":"To describe a file in a database in Deep Origin, run:
CLIPythondeeporigin data describe <file-id>\n
This will display a table similar to:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Property \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 id \u2502 _file:gBAK9tzFC5Cegx4NmSETc \u2502\n\u2502 uri \u2502 s3://_file:gBAK9tzFC5Cegx4NmSETc \u2502\n\u2502 name \u2502 db-dna.csv \u2502\n\u2502 status \u2502 ready \u2502\n\u2502 contentLength \u2502 234 \u2502\n\u2502 contentType \u2502 text/csv \u2502\n\u2502 dateCreated \u2502 2024-05-08 01:01:48.925 \u2502\n\u2502 dateUpdated \u2502 2024-05-08 01:01:48.925 \u2502\n\u2502 createdByUserDrn \u2502 scientist@deeporigin.com \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data describe <file-id> --json | jq\n
{\n \"id\": \"_file:gBAK9tzFC5Cegx4NmSETc\",\n \"uri\": \"s3://_file:gBAK9tzFC5Cegx4NmSETc\",\n \"name\": \"db-dna.csv\",\n \"status\": \"ready\",\n \"contentLength\": 234,\n \"contentType\": \"text/csv\",\n \"dateCreated\": \"2024-05-08 01:01:48.925\",\n \"dateUpdated\": \"2024-05-08 01:01:48.925\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\"\n}\n
from deeporigin.data_hub import api\napi.describe_file(\"file-id\")\n
"},{"location":"how-to/data-hub/view-data.html#show-data","title":"Show data","text":""},{"location":"how-to/data-hub/view-data.html#show-rows","title":"Show rows","text":"To show the data in a row in a database in Deep Origin, run:
CLIPythondeeporigin data show <row-id>\n
This will display a table similar to:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Column \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 File \u2502 _file:hnU7F62xeW8j0l1kR7YP1 \u2502\n\u2502 Float Num \u2502 112 \u2502\n\u2502 selctcol \u2502 sdsd \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data describe <file-id> --json | jq\n
{\n \"File\": \"_file:hnU7F62xeW8j0l1kR7YP1\",\n \"Float Num\": 112,\n \"selctcol\": \"sdsd\"\n}\n
from deeporigin.data_hub import api\napi.get_row_data(\"row-id\")\n
The data will be returned as a dictionary, where the keys are the column names and the values are values of the cells.
"},{"location":"how-to/data-hub/view-data.html#show-databases","title":"Show databases","text":"CLIPythondeeporigin data show <database-id>\n
This will display a table similar to:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Status \u2502 stag-id \u2502 Customer Name \u2502 Status \u2502 Output Files \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 valid \u2502 stag-1 \u2502 Blue Sun Corp \u2502 Processing \u2502 \u2502\n\u2502 valid \u2502 stag-2 \u2502 Veridian Dynamics\u2502 Complete \u2502 report.tar.gz \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data describe <database-id> --json | jq\n
{\n \"Status\": [\n \"valid\",\n \"valid\"\n ],\n \"stag-id\": [\n \"stag-1\",\n \"stag-2\"\n ],\n \"Customer Name\": [\n \"Blue Sun Corp \",\n \"Veridian Dynamics\"\n ],\n \"Status\": [\n \"Processing\",\n \"Complete\"\n ],\n \"Output Files\": [\n null,\n \"report.tar.gz\"\n ]\n}\n
from deeporigin.data_hub import api\napi.get_dataframe(\"database-id\")\n
The data will be returned as a Pandas DataFrame.
"},{"location":"how-to/data-hub/write-data.html","title":"Write data","text":"This page describes how to write data to the Deep Origin data hub.
"},{"location":"how-to/data-hub/write-data.html#write-data-to-a-cell-in-a-database","title":"Write data to a cell in a database","text":""},{"location":"how-to/data-hub/write-data.html#write-text-data","title":"Write text data","text":"Run the following to write a text value to a cell in a database:
CLIPythondeeporigin data write \"some-string\" \\\n --database $database_id \\\n --column $column_id \\\n --row $row_id\n
from deeporigin.data_hub import api\napi.set_cell_data(\n \"some string\",\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
"},{"location":"how-to/data-hub/write-data.html#write-numeric-data","title":"Write numeric data","text":"Run the following to write a numeric value to a cell in a database:
CLIPythondeeporigin data write 123 \\\n --database $database_id \\\n --column $column_id \\\n --row $row_id\n
from deeporigin.data_hub import api\napi.set_cell_data(\n 1,\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
Numeric data will be coerced to the data type of the underlying cell.
"},{"location":"how-to/data-hub/write-data.html#write-select-data","title":"Write select data","text":"This section describes how to write data to a cell in a database that is of type select
. This includes cells where a single option can be selected from a list, and cells where more than one value can be selected from a list of options.
deeporigin data write \"option A\" \\\n --database $database_id \\\n --column $column_id \\\n --row $row_id\n
from deeporigin.data_hub import api\napi.set_cell_data(\n \"option A\",\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
The value must be one of the options in the list. If it is not, an error will be raised showing the list of legal options.
"},{"location":"how-to/data-hub/write-data.html#write-boolean-data","title":"Write Boolean data","text":"Run the following to write a Boolean value to a cell in a database:
CLIPythondeeporigin data write \"True\" \\\n --database $database_id \\\n --column $column_id \\\n --row $row_id\n
from deeporigin.data_hub import api\napi.set_cell_data(\n True,\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
Unsetting Boolean data To unset a cell, so that it contains no data, write None
to the cell as follows:
from deeporigin.data_hub import api\napi.set_cell_data(\n None,\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
"},{"location":"how-to/platform/user-info.html","title":"Get user information","text":""},{"location":"how-to/platform/user-info.html#get-info-about-current-user","title":"Get info about current user","text":"To get information about the currently logged in user, including the user ID, use:
from deeporigin.platform import api\napi.whoami()\n
returns information about the current user. A typical response is:
{\n \"data\": {\n \"attributes\": {\n \"company\": null,\n \"expertise\": null,\n \"industries\": null,\n \"pendingInvites\": [],\n \"platform\": \"OS\",\n \"title\": null\n },\n \"id\": \"google-apps|user@deeporigin.com\",\n \"type\": \"User\"\n },\n \"links\": {\n \"self\": \"https://os.deeporigin.io/users/me\"\n }\n}\n
"},{"location":"how-to/platform/user-info.html#get-information-about-a-user","title":"Get information about a user","text":"To get information about a user, use:
from deeporigin.platform import api\napi.resolve_user(\"user-id\")\n
where user-id
is the ID of the user, in the format returned by api.whoami()
. A typical response looks like:
{\n \"data\": {\n \"attributes\": {\n \"avatar\": \"https://...\",\n \"email\": \"user@deeporigin.com\",\n \"name\": \"User Name\"\n },\n \"id\": \"918ddd25-ab97-4400-9a14-7a8be1216754\",\n \"type\": \"User\"\n },\n \"links\": {\n \"self\": \"https://...\"\n }\n}\n
"},{"location":"how-to/platform/workstation-info.html","title":"Get information about workstations","text":"To list all workstations on Deep Origin, use:
from deeporigin.platform import api\napi.get_workstations()\n
This returns a list of objects, where each object correspond to a workstation. A typical entry looks like:
{\n \"attributes\": {\n \"accessMethods\": [\n {\n \"icon\": \"/assets/icons/catalog-items/jupyterlab.svg\",\n \"id\": \"jupyterlab\",\n \"name\": \"JupyterLab\"\n },\n {\n \"icon\": \"/assets/icons/catalog-items/code-server.svg\",\n \"id\": \"code-server\",\n \"name\": \"VS Code (web)\"\n }\n ],\n \"accessSettings\": {\n \"publicKey\": \"ssh-ed25519 ... \",\n \"ssh\": true\n },\n \"autoStopIdleCPUThreshold\": 0,\n \"autoStopIdleDuration\": 30,\n \"blueprint\": \"deeporigin/deeporigin-python:staging\",\n \"cloudProvider\": {\n \"region\": \"us-west-2\",\n \"vendor\": \"aws\"\n },\n \"clusterId\": \"3bb775e4-8be6-4936-a6b9\",\n \"created\": \"2024-10-05T17:01:06.840Z\",\n \"description\": \"dfd\",\n \"drn\": \"drn:...\",\n \"enableAutoStop\": true,\n \"name\": \"forthcoming-tyrannosaurus-8fd\",\n \"nextUserActions\": [\n \"DELETE\"\n ],\n \"orgHandle\": \"deeporigin-com\",\n \"requestedResources\": {\n \"cpu\": 8,\n \"gpu\": 0,\n \"gpuSize\": \"NONE\",\n \"memory\": 32,\n \"storage\": 250\n },\n \"state\": {\n \"error\": \"\",\n \"isError\": false,\n \"stage\": \"READY\",\n \"status\": \"TERMINATED\"\n },\n \"status\": \"TERMINATED\",\n \"summary\": \"\",\n \"templateVersion\": \"v0.1.0\",\n \"updated\": \"2024-10-07T12:46:46.511Z\",\n \"userHandle\": \"google-apps|srinivas@deeporigin.com\",\n \"volumeDrns\": [\n \"...\"\n ],\n \"wasAutoStopped\": false\n },\n \"id\": \"...\",\n \"type\": \"ComputeBench\"\n}\n
"},{"location":"platform/index.html","title":"Platform API","text":"The Deep Origin CLI and python client allows you to control and interact with the Deep Origin platform.
"},{"location":"ref/data-hub/high-level-api.html","title":"API reference: High-level API","text":"How to use this reference
This page contains information about each class and function in this module. This is meant as a detailed reference for this module. If you're looking an introduction, we recommend reviewing the How to section.
The deeporigin.data_hub.api
module contains high-level functions for interacting with your Deep Origin data hub.
add_database_column(\n *,\n database_id: str,\n key: str,\n type: DataType,\n name: str,\n cardinality: Cardinality = \"one\",\n required: bool = False,\n client=None\n)\n
Add a column to a database.
Parameters:
Name Type Description Defaultdatabase_id
str
ID (or human ID) of a database on Deep Origin.
requiredkey
str
key of the column
requiredtype
DataType
type of the column. Should be one of DataType
requiredname
str
name of the column
requiredcardinality
Cardinality
cardinality of the column. Specifies whether cells in this column can contain or many items. Should be one of \"one\" or \"many\"
'one'
required
bool
whether the column is required. If True, cells in this column cannot be empty
False
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.assign_files_to_cell","title":"assign_files_to_cell","text":"assign_files_to_cell(\n *,\n file_ids: list[str],\n database_id: str,\n column_id: str,\n row_id: Optional[str] = None,\n client=None\n)\n
Assign existing file(s) to a cell
Assign files to a cell in a database table, where the cell is identified by the database ID, row ID, and column ID.
If row_id is None
, a new row will be created.
Parameters:
Name Type Description Defaultfile_ids
list[str]
ID of the file
requireddatabase_id
str
ID of database to assign to
requiredcolumn_id
str
ID of the column
requiredrow_id
Optional[str]
ID of the row
None
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.convert_id_format","title":"convert_id_format","text":"convert_id_format(\n *,\n hids: Optional[Union[list[str], set[str]]] = None,\n ids: Optional[Union[list[str], set[str]]] = None,\n client=None\n) -> list[dict]\n
Convert a list of human IDs to IDs or vice versa.
Parameters:
Name Type Description Defaulthids
Optional[Union[list[str], set[str]]]
List of human IDs
None
ids
Optional[Union[list[str], set[str]]]
List of IDs (system IDs)
None
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.create_database","title":"create_database","text":"create_database(\n *,\n name: str,\n client=None,\n parent_id: Optional[str] = None,\n hid: Optional[str] = None,\n hid_prefix: Optional[str] = None\n)\n
Create a new database in the data hub
A database contains rows of data.
Parameters:
Name Type Description Defaultname
str
Name of the database to create
requiredhid
Optional[str]
Human ID. If not specified, the name will be used
None
parent_id
Optional[str]
ID of the parent. If None, the folder is created at the root level
None
hid_prefix
Optional[str]
Human ID prefix to be used for each row. If not specified, the name will be used
None
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.create_workspace","title":"create_workspace","text":"create_workspace(\n *,\n name: str,\n client=None,\n hid: Optional[str] = None,\n parent_id: Optional[str] = None\n)\n
Create a new folder (workspace) in the data hub
A folder contains can contain other rows and databases.
Parameters:
Name Type Description Defaultname
str
Name of the folder to create
requiredhid
Optional[str]
Human ID. If not specified, the name will be used
None
parent_id
Optional[str]
ID of the parent. If None, the folder is created at the root level
None
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.download","title":"download","text":"download(\n source: str,\n destination: str,\n *,\n include_files: bool = False,\n client=None\n) -> None\n
Download resources from Deep Origin and save them to a local destination.
Download databases, objects and other entities from your Deep Origin data hub and save them to local disk.
Work in progressAll features in this function have not been implemented yet.
Parameters:
Name Type Description Defaultsource
str
ID (or human ID) of a resource on Deep Origin.
requireddestination
str
Path to local directory to save resources.
requiredinclude_files
bool
if True
, download files in database.
False
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.download_database","title":"download_database","text":"download_database(\n source: Any,\n destination: str = os.getcwd(),\n *,\n include_files: bool = False,\n client=None\n) -> None\n
Download a database and save it to a CSV file on the local disk.
Download a database from your Deep Origin data hub and save to local disk as a CSV file.
Parameters:
Name Type Description Defaultsource
Any
ID (or human ID) of a resource on Deep Origin.
requireddestination
str
Path to local directory to save resources.
getcwd()
include_files
bool
if True
, download files in database.
False
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.download_file","title":"download_file","text":"download_file(\n file_id: str,\n *,\n destination: str = os.getcwd(),\n client=None\n) -> None\n
Download a file to a destination folder (workspace).
Download a file synchronously from Deep Origin to folder on the local file system.
Parameters:
Name Type Description Defaultfile_id
str
ID of the file on Deep Origin
requireddestination
str
Path to the destination folder
getcwd()
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.download_files","title":"download_files","text":"download_files(\n files: Optional[\n list[ListFilesResponse] | ListFilesResponse\n ] = None,\n *,\n save_to_dir: Path | str = Path(\".\"),\n use_file_names: bool = True,\n client=None\n) -> None\n
download multiple files in parallel to local disk
Parameters:
Name Type Description Defaultfiles
Optional[list[ListFilesResponse] | ListFilesResponse]
list of files to download. These can be of type types.list_files_response.Data
(as returned by api.list_files) or can be a list of strings of file IDs.
None
save_to_dir
Path | str
directory to save files to on local computer
Path('.')
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_cell_data","title":"get_cell_data","text":"get_cell_data(\n *, row_id: str, column_name: str, client=None\n) -> Any\n
Extract data from a cell in a database, referenced by row_id
and column_name
.
Returns the value in a single cell in a database.
CautionThis function internally calls get_row_data, so it is not efficient to write a loop to get all values of cells from a row. It will be faster to call get_row_data directly.
Parameters:
Name Type Description Defaultrow_id
str
ID (or human ID) of a row.
requiredcolumn_name
str
Name of column.
requiredReturns:
Type DescriptionAny
Value of that cell.
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_columns","title":"get_columns","text":"get_columns(row_id: str, *, client=None) -> list[dict]\n
Get information about the columns of a row or database.
If row_id
is a database, then column metadata and names are returned. If row_id
is a row, then a dictionary of human IDs and values are returned.
Parameters:
Name Type Description Defaultrow_id
str
ID (or human ID) of a row or database on Deep Origin.
required"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_dataframe","title":"get_dataframe","text":"get_dataframe(\n database_id: str,\n *,\n use_file_names: bool = True,\n reference_format: IDFormat = \"human-id\",\n return_type: DatabaseReturnType = \"dataframe\",\n client=None\n)\n
Generate a pandas.DataFrame
or dictionary for a database.
Download a database from your Deep Origin data hub and return it as a data frame or dictionary.
Parameters:
Name Type Description Defaultdatabase_id
str
ID (or human ID) of a database on Deep Origin.
requireduse_file_names
bool
If True
, refer to files by name rather than ID.
True
reference_format
IDFormat
Refer to rows on Deep Origin using human IDs or system IDs.
'human-id'
return_type
DatabaseReturnType
Whether to return a pandas.Dataframe
or a dictionary.
'dataframe'
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_notebook","title":"get_notebook","text":"get_notebook(row_id: str, *, client=None) -> list\n
Get the notebook of a row, if it exists
Parameters:
Name Type Description Defaultrow_id
str
ID (or human ID) of a row on Deep Origin.
requiredReturns:
Type Descriptionlist
The notebook of the row, returned as a list
list
of blocks
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_row_data","title":"get_row_data","text":"get_row_data(\n row_id: str,\n *,\n use_column_keys: bool = False,\n client=None\n) -> dict\n
Get the data in a row.
Read data from a row, and return it as a dictionary, where the keys are column names (or keys), and the values are the values of those cells.
Parameters:
Name Type Description Defaultrow_id
str
ID (or human ID) of a row or database on Deep Origin.
requireduse_column_keys
bool
if True
, keys of dictionary are column keys.
False
Raises:
Type DescriptionDeepOriginException
If row_id is not a row
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_tree","title":"get_tree","text":"get_tree(*, include_rows: bool = True, client=None) -> list\n
Construct a tree of all folders (workspaces), databases and rows.
Returns a tree that contains all folders, databases and (optionally) rows. The tree is returned as a dictionary, and children of each object are contained in a field called children
.
Parameters:
Name Type Description Defaultinclude_rows
bool
If True
, rows are included in the tree.
True
Returns:
Type Descriptionlist
A dictionary describing the tree structure of all folders
list
and databases.
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.list_files","title":"list_files","text":"list_files(\n *,\n assigned_row_ids: Optional[list[str]] = None,\n is_unassigned: Optional[bool] = None,\n file_ids: Optional[list[str]] = None,\n client=None\n) -> list\n
List files, with option to filter by assigned rows, assigned status
Returns a list of files.
Parameters:
Name Type Description Defaultassigned_row_ids
Optional[list[str]]
List of IDs of rows that files are assigned to
None
is_unassigned
Optional[bool]
If True
only files that are unassigned will be returned
None
Returns:
Type Descriptionlist
A list of files, where each entry is an object that corresponds to a file on Deep Origin
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.list_rows","title":"list_rows","text":"list_rows(\n *,\n parent_id: Optional[str] = None,\n row_type: ObjectType = None,\n parent_is_root: Optional[bool] = None,\n client=None\n) -> list\n
List rows in a database or folder (workspace).
Returns a list of rows from folders and databases, based on the parent, row type, or whether the parent is the root.
Parameters:
Name Type Description Defaultparent_id
Optional[str]
ID (or human ID) or the parent.
None
row_type
ObjectType
One of row
, folder
, or database
.
None
parent_is_root
Optional[bool]
If True
only rows that are children of the root will be returned.
None
Returns:
Type Descriptionlist
A list of objects, where each entry corresponds to a row.
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.make_database_rows","title":"make_database_rows","text":"make_database_rows(\n database_id: str, n_rows: int = 1, client=None\n) -> dict\n
Makes one or several new row(s) in a database table
Parameters:
Name Type Description Defaultdatabase_id
str
ID or Human ID of the database
requiredn_rows
int
Number of rows to create. Must be an integer greater than 0
1
Returns:
Type Descriptiondict
A dictionary that conforms to a EnsureRowsResponse
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.set_cell_data","title":"set_cell_data","text":"set_cell_data(\n value: Any,\n *,\n database_id: str,\n row_id: str,\n column_id: str,\n client=None\n) -> Any\n
Set data in a cell to some value.
Parameters:
Name Type Description Defaultvalue
Any
Value to set in the cell
requireddatabase_id
str
ID (or human ID) of a database
requiredrow_id
str
ID (or human ID) of a row
requiredcolumn_id
str
ID (or human ID) of a column
required"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.set_data_in_cells","title":"set_data_in_cells","text":"set_data_in_cells(\n *,\n values: list,\n row_ids: list[str],\n column_id: str,\n database_id: str,\n client=None\n)\n
Set data in multiple cells to some value.
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.upload_file","title":"upload_file","text":"upload_file(file_path: str, client=None) -> None\n
Upload a file to Deep Origin.
This upload files to your Deep Origin data hub. To assign this file to a cell, next run assign_files_to_cell
Parameters:
Name Type Description Defaultfile_path
str
Path to the file to upload
required"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.upload_file_to_new_database_row","title":"upload_file_to_new_database_row","text":"upload_file_to_new_database_row(\n *,\n database_id: str,\n file_path: str,\n column_id: str,\n client=None\n)\n
Upload a file to a new row in a database.
Upload a file to a new row in a database. This utility function wraps two other functions:
Parameters:
Name Type Description Defaultdatabase_id
str
ID (or human ID) of a database.
requiredfile_path
str
Path to the file to upload.
requiredcolumn_id
str
ID (or human ID) of a column in the database.
required"},{"location":"ref/data-hub/low-level-api.html","title":"API reference: Low-level API","text":""},{"location":"ref/data-hub/low-level-api.html#background","title":"Background","text":"We use automatically generated code to implement a low-level Python SDK that connects to the Deep Origin data hub API. This page describes that API. In most cases, you will not need to know how this works, nor will you need to use it.
Using the methods in the DeeporiginData class
The deeporigin.api
module provides wrappers that allow you to use methods in the deeporigin_data.DeeporiginData
class, without needing to instantiate an object and configure it. Each method of this class is exposed as a function with the same name. These functions enable you to easily use the methods of the deeporigin_data.DeeporiginData
class.
For example, to use the list_files method in the DeeporiginData
class, run:
from deeporigin.data_hub import api\napi.list_files()\n
Your IDE should be able to provide information about the arguments and return types of these functions by typing api.list_files(
and then pressing tab.
Bases: AsyncAPIClient
__init__(\n *,\n token: str | None = None,\n org_id: str | None = None,\n base_url: str | URL | None = None,\n timeout: Union[\n float, Timeout, None, NotGiven\n ] = NOT_GIVEN,\n max_retries: int = DEFAULT_MAX_RETRIES,\n default_headers: Mapping[str, str] | None = None,\n default_query: Mapping[str, object] | None = None,\n http_client: AsyncClient | None = None,\n _strict_response_validation: bool = False\n) -> None\n
This automatically infers the following arguments from their corresponding environment variables if they are not provided: - token
from ORG_BEARER_TOKEN
- org_id
from ORG_ID
async
","text":"add_database_column(\n *,\n column: Column,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> AddDatabaseColumnResponse\n
Add a column to a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.archive_files","title":"archive_files async
","text":"archive_files(\n *,\n file_ids: List[str],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> object\n
Archive files by their ids.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.close","title":"close async
","text":"close() -> None\n
Close the underlying HTTPX client.
The client will not be usable after this.
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.configure_column_select_options","title":"configure_column_select_optionsasync
","text":"configure_column_select_options(\n *,\n column_id: str,\n database_id: str,\n option_configuration: Iterable[OptionConfiguration],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ConfigureColumnSelectOptionsResponse\n
Configure column select options.
Supports both adding and removing options.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.convert_id_format","title":"convert_id_format async
","text":"convert_id_format(\n *,\n conversions: Iterable[Conversion],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ConvertIDFormatResponse\n
Converts between system IDs and human IDs (HIDs).
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.copy","title":"copy","text":"copy(\n *,\n token: str | None = None,\n org_id: str | None = None,\n base_url: str | URL | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN,\n http_client: AsyncClient | None = None,\n max_retries: int | NotGiven = NOT_GIVEN,\n default_headers: Mapping[str, str] | None = None,\n set_default_headers: Mapping[str, str] | None = None,\n default_query: Mapping[str, object] | None = None,\n set_default_query: Mapping[str, object] | None = None,\n _extra_kwargs: Mapping[str, Any] = {}\n) -> Self\n
Create a new client instance re-using the same options given to the current client with optional overriding.
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.create_database","title":"create_databaseasync
","text":"create_database(\n *,\n database: Database,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateDatabaseResponse\n
Create a new database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.create_file_download_url","title":"create_file_download_url async
","text":"create_file_download_url(\n *,\n file_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateFileDownloadURLResponse\n
Returns a pre-signed S3 URL.
Parameters:
Name Type Description Defaultfile_id
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.create_file_upload","title":"create_file_upload async
","text":"create_file_upload(\n *,\n content_length: str,\n name: str,\n checksum_sha256: str | NotGiven = NOT_GIVEN,\n content_type: str | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateFileUploadResponse\n
Create a file upload URL.
Typically this is creating a pre-signed S3 URL.
Parameters:
Name Type Description Defaultchecksum_sha256
str | NotGiven
Base64 encoded SHA256 checksum of the file.
NOT_GIVEN
extra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.create_workspace","title":"create_workspace async
","text":"create_workspace(\n *,\n workspace: Workspace,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateWorkspaceResponse\n
Create a new workspace.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.delete_database","title":"delete_database async
","text":"delete_database(\n *,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteDatabaseResponse\n
Permanently deletes a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.delete_database_column","title":"delete_database_column async
","text":"delete_database_column(\n *,\n column_id: str,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteDatabaseColumnResponse\n
Delete a column from a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.delete_rows","title":"delete_rows async
","text":"delete_rows(\n *,\n database_id: str,\n row_ids: List[str],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteRowsResponse\n
Delete rows by their ids.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.delete_workspace","title":"delete_workspace async
","text":"delete_workspace(\n *,\n workspace_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteWorkspaceResponse\n
Permanently deletes a workspace and all its children.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.describe_code_execution","title":"describe_code_execution async
","text":"describe_code_execution(\n *,\n id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeCodeExecutionResponse\n
Returns information about a particular code execution.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.describe_database_stats","title":"describe_database_stats async
","text":"describe_database_stats(\n *,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeDatabaseStatsResponse\n
Returns aggregation information about a particular database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.describe_file","title":"describe_file async
","text":"describe_file(\n *,\n file_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeFileResponse\n
Describe a file by its ID.
Parameters:
Name Type Description Defaultfile_id
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.describe_row","title":"describe_row async
","text":"describe_row(\n *,\n row_id: str,\n column_selection: (\n ColumnSelection | NotGiven\n ) = NOT_GIVEN,\n fields: bool | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeRowResponse\n
Describe a row
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.ensure_rows","title":"ensure_rows async
","text":"ensure_rows(\n *,\n database_id: str,\n rows: Iterable[Row],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> EnsureRowsResponse\n
Either creates or updates an existing row.
Supports updates to both system and user defined columns.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.execute_code_async","title":"execute_code_async async
","text":"execute_code_async(\n *,\n code: str,\n code_language: Literal[\"python\"],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ExecuteCodeAsyncResponse\n
Execute code asynchronously.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.execute_code_sync","title":"execute_code_sync async
","text":"execute_code_sync(\n *,\n code: str,\n code_language: Literal[\"python\"],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ExecuteCodeSyncResponse\n
Execute code synchronously.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.get_code_execution_result","title":"get_code_execution_result async
","text":"get_code_execution_result(\n *,\n id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> object\n
Returns the result of a code execution.
Parameters:
Name Type Description Defaultid
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.import_rows","title":"import_rows async
","text":"import_rows(\n *,\n database_id: str,\n add_columns: Iterable[AddColumn] | NotGiven = NOT_GIVEN,\n creation_block_id: str | NotGiven = NOT_GIVEN,\n creation_parent_id: str | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ImportRowsResponse\n
Creates new rows from CSV data.
Parameters:
Name Type Description Defaultadd_columns
Iterable[AddColumn] | NotGiven
Optionally add additional columns to the database during import.
NOT_GIVEN
extra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_database_rows","title":"list_database_rows async
","text":"list_database_rows(\n *,\n database_row_id: str,\n column_selection: (\n ColumnSelection | NotGiven\n ) = NOT_GIVEN,\n creation_block_id: str | NotGiven = NOT_GIVEN,\n creation_parent_id: str | NotGiven = NOT_GIVEN,\n filter: Filter | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListDatabaseRowsResponse\n
List database rows with full row data.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_files","title":"list_files async
","text":"list_files(\n *,\n filters: Iterable[Filter] | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListFilesResponse\n
Returns a list of files using the filters.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_mentions","title":"list_mentions async
","text":"list_mentions(\n *,\n query: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListMentionsResponse\n
Returns entities that can be mentioned in a notebook.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_row_back_references","title":"list_row_back_references async
","text":"list_row_back_references(\n *,\n row_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListRowBackReferencesResponse\n
Finds all the places a row is referenced.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_rows","title":"list_rows async
","text":"list_rows(\n *,\n filters: Iterable[Filter],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListRowsResponse\n
Lists rows at a given depth in the hierarchy.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.update_database","title":"update_database async
","text":"update_database(\n *,\n id: str,\n database: Database,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateDatabaseResponse\n
Update a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.update_database_column","title":"update_database_column async
","text":"update_database_column(\n *,\n column: Column,\n column_id: str,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateDatabaseColumnResponse\n
Update a column in a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.update_workspace","title":"update_workspace async
","text":"update_workspace(\n *,\n id: str,\n workspace: Workspace,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateWorkspaceResponse\n
Update a workspace.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData","title":"DeeporiginData","text":" Bases: SyncAPIClient
__init__(\n *,\n token: str | None = None,\n org_id: str | None = None,\n base_url: str | URL | None = None,\n timeout: Union[\n float, Timeout, None, NotGiven\n ] = NOT_GIVEN,\n max_retries: int = DEFAULT_MAX_RETRIES,\n default_headers: Mapping[str, str] | None = None,\n default_query: Mapping[str, object] | None = None,\n http_client: Client | None = None,\n _strict_response_validation: bool = False\n) -> None\n
This automatically infers the following arguments from their corresponding environment variables if they are not provided: - token
from ORG_BEARER_TOKEN
- org_id
from ORG_ID
add_database_column(\n *,\n column: Column,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> AddDatabaseColumnResponse\n
Add a column to a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.archive_files","title":"archive_files","text":"archive_files(\n *,\n file_ids: List[str],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> object\n
Archive files by their ids.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.close","title":"close","text":"close() -> None\n
Close the underlying HTTPX client.
The client will not be usable after this.
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.configure_column_select_options","title":"configure_column_select_options","text":"configure_column_select_options(\n *,\n column_id: str,\n database_id: str,\n option_configuration: Iterable[OptionConfiguration],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ConfigureColumnSelectOptionsResponse\n
Configure column select options.
Supports both adding and removing options.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.convert_id_format","title":"convert_id_format","text":"convert_id_format(\n *,\n conversions: Iterable[Conversion],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ConvertIDFormatResponse\n
Converts between system IDs and human IDs (HIDs).
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.copy","title":"copy","text":"copy(\n *,\n token: str | None = None,\n org_id: str | None = None,\n base_url: str | URL | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN,\n http_client: Client | None = None,\n max_retries: int | NotGiven = NOT_GIVEN,\n default_headers: Mapping[str, str] | None = None,\n set_default_headers: Mapping[str, str] | None = None,\n default_query: Mapping[str, object] | None = None,\n set_default_query: Mapping[str, object] | None = None,\n _extra_kwargs: Mapping[str, Any] = {}\n) -> Self\n
Create a new client instance re-using the same options given to the current client with optional overriding.
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.create_database","title":"create_database","text":"create_database(\n *,\n database: Database,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateDatabaseResponse\n
Create a new database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.create_file_download_url","title":"create_file_download_url","text":"create_file_download_url(\n *,\n file_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateFileDownloadURLResponse\n
Returns a pre-signed S3 URL.
Parameters:
Name Type Description Defaultfile_id
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.create_file_upload","title":"create_file_upload","text":"create_file_upload(\n *,\n content_length: str,\n name: str,\n checksum_sha256: str | NotGiven = NOT_GIVEN,\n content_type: str | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateFileUploadResponse\n
Create a file upload URL.
Typically this is creating a pre-signed S3 URL.
Parameters:
Name Type Description Defaultchecksum_sha256
str | NotGiven
Base64 encoded SHA256 checksum of the file.
NOT_GIVEN
extra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.create_workspace","title":"create_workspace","text":"create_workspace(\n *,\n workspace: Workspace,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateWorkspaceResponse\n
Create a new workspace.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.delete_database","title":"delete_database","text":"delete_database(\n *,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteDatabaseResponse\n
Permanently deletes a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.delete_database_column","title":"delete_database_column","text":"delete_database_column(\n *,\n column_id: str,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteDatabaseColumnResponse\n
Delete a column from a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.delete_rows","title":"delete_rows","text":"delete_rows(\n *,\n database_id: str,\n row_ids: List[str],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteRowsResponse\n
Delete rows by their ids.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.delete_workspace","title":"delete_workspace","text":"delete_workspace(\n *,\n workspace_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteWorkspaceResponse\n
Permanently deletes a workspace and all its children.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.describe_code_execution","title":"describe_code_execution","text":"describe_code_execution(\n *,\n id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeCodeExecutionResponse\n
Returns information about a particular code execution.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.describe_database_stats","title":"describe_database_stats","text":"describe_database_stats(\n *,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeDatabaseStatsResponse\n
Returns aggregation information about a particular database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.describe_file","title":"describe_file","text":"describe_file(\n *,\n file_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeFileResponse\n
Describe a file by its ID.
Parameters:
Name Type Description Defaultfile_id
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.describe_row","title":"describe_row","text":"describe_row(\n *,\n row_id: str,\n column_selection: (\n ColumnSelection | NotGiven\n ) = NOT_GIVEN,\n fields: bool | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeRowResponse\n
Describe a row
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.ensure_rows","title":"ensure_rows","text":"ensure_rows(\n *,\n database_id: str,\n rows: Iterable[Row],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> EnsureRowsResponse\n
Either creates or updates an existing row.
Supports updates to both system and user defined columns.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.execute_code_async","title":"execute_code_async","text":"execute_code_async(\n *,\n code: str,\n code_language: Literal[\"python\"],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ExecuteCodeAsyncResponse\n
Execute code asynchronously.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.execute_code_sync","title":"execute_code_sync","text":"execute_code_sync(\n *,\n code: str,\n code_language: Literal[\"python\"],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ExecuteCodeSyncResponse\n
Execute code synchronously.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.get_code_execution_result","title":"get_code_execution_result","text":"get_code_execution_result(\n *,\n id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> object\n
Returns the result of a code execution.
Parameters:
Name Type Description Defaultid
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.import_rows","title":"import_rows","text":"import_rows(\n *,\n database_id: str,\n add_columns: Iterable[AddColumn] | NotGiven = NOT_GIVEN,\n creation_block_id: str | NotGiven = NOT_GIVEN,\n creation_parent_id: str | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ImportRowsResponse\n
Creates new rows from CSV data.
Parameters:
Name Type Description Defaultadd_columns
Iterable[AddColumn] | NotGiven
Optionally add additional columns to the database during import.
NOT_GIVEN
extra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_database_rows","title":"list_database_rows","text":"list_database_rows(\n *,\n database_row_id: str,\n column_selection: (\n ColumnSelection | NotGiven\n ) = NOT_GIVEN,\n creation_block_id: str | NotGiven = NOT_GIVEN,\n creation_parent_id: str | NotGiven = NOT_GIVEN,\n filter: Filter | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListDatabaseRowsResponse\n
List database rows with full row data.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_files","title":"list_files","text":"list_files(\n *,\n filters: Iterable[Filter] | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListFilesResponse\n
Returns a list of files using the filters.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_mentions","title":"list_mentions","text":"list_mentions(\n *,\n query: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListMentionsResponse\n
Returns entities that can be mentioned in a notebook.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_row_back_references","title":"list_row_back_references","text":"list_row_back_references(\n *,\n row_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListRowBackReferencesResponse\n
Finds all the places a row is referenced.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_rows","title":"list_rows","text":"list_rows(\n *,\n filters: Iterable[Filter],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListRowsResponse\n
Lists rows at a given depth in the hierarchy.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.update_database","title":"update_database","text":"update_database(\n *,\n id: str,\n database: Database,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateDatabaseResponse\n
Update a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.update_database_column","title":"update_database_column","text":"update_database_column(\n *,\n column: Column,\n column_id: str,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateDatabaseColumnResponse\n
Update a column in a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.update_workspace","title":"update_workspace","text":"update_workspace(\n *,\n id: str,\n workspace: Workspace,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateWorkspaceResponse\n
Update a workspace.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/types.html","title":"Classes and constants","text":"This page lists some classes, types and constants used in this library.
"},{"location":"ref/data-hub/types.html#src.data_hub.dataframe.DataFrame","title":"src.data_hub.dataframe.DataFrame","text":" Bases: DataFrame
A subclass of pandas DataFrame that allows for easy updating of a Deep Origin database. This can be used as a drop-in replacement for a pandas DataFrame, and should support all methods a pandas DataFrame supports.
The primary method of creating an object of this type is to use the from_deeporigin class method.
"},{"location":"ref/data-hub/types.html#src.data_hub.dataframe.DataFrame.auto_sync","title":"auto_syncclass-attribute
instance-attribute
","text":"auto_sync: bool = False\n
When True
, changes made to the dataframe will be automatically synced to the Deep Origin database this dataframe represents.
classmethod
","text":"from_deeporigin(\n database_id: str,\n *,\n use_file_names: bool = True,\n reference_format: IDFormat = \"human-id\",\n return_type: DatabaseReturnType = \"dataframe\",\n client=None\n)\n
Create a local Deep Origin DataFrame from a Deep Origin database.
Parameters:
Name Type Description Defaultdatabase_id
str
The ID of the Deep Origin database.
requireduse_file_names
bool
Whether to use the file names in the Deep Origin database. Defaults to True.
True
reference_format
IDFormat
The format of the IDs in the Deep Origin database. Defaults to \"human-id\".
'human-id'
return_type
DatabaseReturnType
The type of return value. Defaults to \"dataframe\".
'dataframe'
"},{"location":"ref/data-hub/types.html#src.data_hub.dataframe.DataFrame.to_deeporigin","title":"to_deeporigin","text":"to_deeporigin(\n *,\n columns: Optional[list] = None,\n rows: Optional[list] = None\n)\n
Write data in dataframe to Deep Origin
Deep Origin DataFrames can automatically synchronize
To automatically save changes to local DataFrames to Deep Origin databases, set the auto_sync
attribute of the dataframe True
.
Parameters:
Name Type Description Defaultcolumns
list
The columns of the dataframe to update. When None, all modified columns are updated.
None
rows
list
The rows to update. Defaults to None. When None, all rows in the relevant columns are updated.
None
"},{"location":"ref/data-hub/types.html#src.utils.constants","title":"src.utils.constants","text":"this module contains constants used in the rest of this library
"},{"location":"ref/data-hub/types.html#src.utils.constants.Cardinality","title":"Cardinalitymodule-attribute
","text":"Cardinality = Literal['one', 'many']\n
The cardinality defines whether a cell in a database can contain one or multiple objects
"},{"location":"ref/data-hub/types.html#src.utils.constants.DataType","title":"DataTypemodule-attribute
","text":"DataType = Literal[\n \"integer\",\n \"str\",\n \"select\",\n \"date\",\n \"text\",\n \"file\",\n \"reference\",\n \"editor\",\n \"float\",\n \"boolean\",\n]\n
Type of a column in a Deep Origin database. See this page in the documentation for more information.
"},{"location":"ref/data-hub/types.html#src.utils.constants.DatabaseReturnType","title":"DatabaseReturnTypemodule-attribute
","text":"DatabaseReturnType = Literal['dataframe', 'dict']\n
Return type for api.get_dataframe
"},{"location":"ref/data-hub/types.html#src.utils.constants.FileStatus","title":"FileStatusmodule-attribute
","text":"FileStatus = Literal['ready', 'archived']\n
Status of a file. Ready files are ready to be used, downloaded, and operated on.
"},{"location":"ref/data-hub/types.html#src.utils.constants.IDFormat","title":"IDFormatmodule-attribute
","text":"IDFormat = Literal['human-id', 'system-id']\n
Format of an ID
"},{"location":"ref/data-hub/types.html#src.utils.constants.ObjectType","title":"ObjectTypemodule-attribute
","text":"ObjectType = Literal['row', 'database', 'workspace']\n
Type of a row. In Deep Origin, a row can be a database row, a database or a workspace
"},{"location":"ref/data-hub/types.html#src.utils.constants.PREFIXES","title":"PREFIXESdataclass
","text":"Prefixes for CLI and Python client
"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Deep Origin CLI and Python client","text":"pip install deeporigin
.The Deep Origin CLI and Python client allow you to programmatically interact with the Deep Origin OS . The example below illustrates how to use the CLI and Python library to retrieve the database row with ID data-1
.
deeporigin data show data-1\n\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Column \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Boolean \u2502 False \u2502\n\u2502 Float \u2502 112 \u2502\n\u2502 Select \u2502 sdsd \u2502\n\u2502 Date \u2502 2024-06-19 00:00:00 \u2502\n\u2502 File \u2502 _file:hnU7F62xeW8j0l1kR7YP1 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
from deeporigin.data_hub import api\n\napi.get_row_data(\"data-1\")\n\n# {'Status': 'Processing',\n# 'Age (years)': 15,\n# 'Gender': 'F',\n# 'Order date': '2024-03-01T00:00:00',\n# 'Received by client': '2023-04-05T00:00:00',\n# 'Sent to client': '2024-03-03T00:00:00',\n# 'Sent by client': '2024-03-05T00:00:00',\n# 'Raw reads': ['_file:UjKrB0QibhgBDAVvGQ3VP'],\n# 'Date completed': '2024-03-08T00:00:00',\n# }\n
"},{"location":"changelog.html","title":"Changelog","text":""},{"location":"changelog.html#deeporigin-v240","title":"deeporigin v2.4.0
","text":""},{"location":"changelog.html#bugfixes","title":"Bugfixes","text":"datahub-api/api/
deeporigin v2.2.1
","text":"api.list_files
functiondf.tail()
and df.head()
deeporigin v2.1.1
","text":"deeporigin v2.1.0
","text":"On a Deep Origin workstation, no configuration is needed! Within a workstation, the Deep Origin CLI and Python client are automatically configured.
"},{"location":"configure.html#on-your-local-computer","title":"On your local computer","text":"To run this package outside of a Deep Origin workstation (for example, on your own computer), first you need to configure this package. After installing this package, run the following to configure your organization, replacing org-id
with the ID of the Deep Origin organization that you would like to work with.
deeporigin config set organization_id [org-id]\n
"},{"location":"configure.html#view-configuration","title":"View configuration","text":"To view the configuration for this package, run:
deeporigin config show\n
This will display a table such as below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Variable \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 organization_id \u2502 likely-aardvark-ewo \u2502\n\u2502 bench_id \u2502 average-possum-3x3 \u2502\n\u2502 env \u2502 us-west-1 \u2502\n\u2502 api_endpoint \u2502 https://os.prod.deeporigin.io/api \u2502\n\u2502 nucleus_api_route \u2502 datahub-api/api/ \u2502\n\u2502 auth_domain \u2502 https://formicbio-dev.us.auth0.com \u2502\n\u2502 auth_device_code_endpoint \u2502 oauth/device/code/ \u2502\n\u2502 auth_token_endpoint \u2502 oauth/token/ \u2502\n\u2502 auth_audience \u2502 https://os.deeporigin.io/api \u2502\n\u2502 auth_grant_type \u2502 urn:ietf:params:device_code \u2502\n\u2502 auth_client_id \u2502 <secret> \u2502\n\u2502 auth_client_secret \u2502 <secret> \u2502\n\u2502 variables_cache_filename \u2502 ~/variables.yml \u2502\n\u2502 feature_flags \u2502 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
"},{"location":"configure.html#set-a-configuration-variable","title":"Set a configuration variable","text":"To set a variable, run:
deeporigin config set [variable-name] [variable-value]\n
For example, to configure your organization, run:
deeporigin config set organization_id likely-aardvark-ewo\n
"},{"location":"install.html","title":"Installation","text":""},{"location":"install.html#on-a-deep-origin-workstation","title":"On a Deep Origin workstation","text":"No installation needed!
The Deep Origin CLI and Python client are installed on every workstation.
"},{"location":"install.html#on-your-local-computer","title":"On your local computer","text":"Run the command below for your favorite package manager to install the Deep Origin CLI and Python client.
pippixipipxpipenvpoetryuvmicromambaflitpip install deeporigin\n
pixi add deeporigin\n
pipx install deeporigin\n
pipenv install deeporigin\n
poetry add deeporigin\n
uv pip install deeporigin\n
micromamba install -c https://repo.prefix.dev/deeporigin-public deeporigin\n
flit install deeporigin\n
"},{"location":"install.html#for-developers","title":"For developers","text":"Developers only
If you intend to contribute this package, we recommend installing this package via the instructions below. If you simply intend to use this package, we recommend following the instructions above.
"},{"location":"install.html#get-the-code","title":"Get the code","text":"First, run the following command to clone the source code repository:
git clone git@github.com:deeporiginbio/deeporigin-client.git\n
"},{"location":"install.html#install-the-development-dependencies-for-this-package","title":"Install the development dependencies for this package","text":"Second, install Python 3.9+ and make.
To verify that both are installed, run the following commands:
python3 --version\n# Python 3.12.3\n\nmake --version\n# GNU Make 4.4.1\n
"},{"location":"install.html#create-an-editable-installation-of-this-package-from-the-cloned-source-code","title":"Create an editable installation of this package from the cloned source code","text":"Third, navigate to the directory you cloned the code to, and run the following command:
make install\n
This will install this package in an \"editable\" mode. In this mode, changes to the source code will take effect immediately.
"},{"location":"install.html#run-the-linting-and-tests-for-this-package","title":"Run the linting and tests for this package","text":"Once installed, you can lint and test this package by running the following commands:
make lint\nmake test\n
"},{"location":"install.html#compiling-and-serving-the-documentation-for-this-package","title":"Compiling and serving the documentation for this package","text":"You can compile and serve the documentation for this package by running:
make docs-serve\n
"},{"location":"install.html#supported-python-versions","title":"Supported Python versions","text":"deeporigin
is tested against the following versions of Python in Ubuntu Linux and Windows:
The Deep Origin compute hub allows you create and use powerful workstations with pre-installed software packages. Deep Origin was built to help computational scientists get clean data from their labs and perform advanced analyses and simulations.
Each Deep Origin workstation comes pre-installed and pre-configured with this Python client and CLI.
Learn more about the compute hub here .
"},{"location":"data-hub/index.html","title":"Data hub","text":"The Deep Origin data hub provides R&D teams a foundation for collaboratively capturing data, extracting insights, and making decisions:
Learn more about the data hub here .
"},{"location":"data-hub/dataframes.html","title":"Using Deep Origin DataFrames","text":"This page describes how to a Deep Origin DataFrame, which are the primary object you will use to interact with a database on Deep Origin. This page will cover:
What is a Deep Origin DataFrame?
A Deep Origin DataFrame is a subclass of a pandas.DataFrame that is created from a Deep Origin database, and can easily write data back to it. Because it is a subclass of a pandas DataFrame, all pandas DataFrame methods work on Deep Origin DataFrames.
"},{"location":"data-hub/dataframes.html#create-a-dataframe","title":"Create a DataFrame","text":"Create a DataFrame using:
from deeporigin.data_hub.dataframe import DataFrame\ndf = DataFrame.from_deeporigin(\"database-id\")\n
In a Jupyter Lab, you should be able to view the DataFrame using:
df\n
which should show you something like this:
Information in the DataFrame
In addition to information you would find in the rows and columns of a pandas DataFrame, a Deep Origin DataFrame also contains metadata about the underlying database. In the view above we also see:
Because a Deep Origin DataFrame is a subclass of a pandas DataFrame, all pandas DataFrame methods work on Deep Origin DataFrames. In this example, we modify values in one of the columns, or modify a single cell.
Modify entire columnsModify data in a single cellTo modify entire columns, use native pandas syntax:
df[\"y^2\"] = df[\"y\"] ** 2\n
To modify data in a single cell, use native pandas syntax (the at operator):
df.at[\"sgs-1\", \"y\"] = 10\n
In either case, when we view the DataFrame once more using df
, we see the updated data, together with a warning telling us that we have local changes that haven't been written back to Deep Origin.
Work in progress
Writing data back to Deep Origin from a Deep Origin DataFrame is still a work in progress. The following functionality is not yet supported. To perform these functions, use the API directly instead.
from_deeporigin
method.from_deeporigin
method.to_deeporigin
method","text":"Local changes in the dataframe can be written back to Deep Origin using the to_deeporigin
method:
df.to_deeporigin()\n\n# \u2714\ufe0e Wrote 9 rows in y^2 to Deep Origin database.\n
The to_deeporigin
method writes data that have been modified in the local dataframe back to the corresponding Deep Origin Database.
Intelligent writing
to_deeporigin
will generate a print statement describing the changes that have been written back to Deep Origin. to_deeporigin
method.If we now view the dataframe once more using df
, we see the following:
Note that the warning about local changes that have not been written back to Deep Origin has disappeared, because the changes have been written back to Deep Origin.
"},{"location":"data-hub/dataframes.html#automatic-writing-to-deep-origin","title":"Automatic writing to Deep Origin","text":"All Deep Origin DataFrames have an attribute called auto_sync
that determines if local changes are written automatically to Deep Origin. By default, auto_sync
is set to False
, requiring you to call the to_deeporigin
method to write changes back to Deep Origin.
To enable automatic syncing, set the auto_sync
attribute to True
:
df.auto_sync = True\ndf\n
Note that the dataframe now displays a message indicating that local changes will be written back to Deep Origin.
Making any change to the dataframe now triggers a write back to the Deep Origin database.
df[\"y^2\"] = df[\"y\"] * 0.99\ndf\n\n# \u2714\ufe0e Wrote 9 rows in y^2 to Deep Origin database.\n
Use auto_sync
with caution
Turning on auto_sync
on dataframes can be dangerous. - Changes made to the local database are written to a Deep Origin database automatically, and no confirmation is asked for. - This can cause data loss. - Every change made to the database is written immediately, so modifying the local dataframe multiple times leads to multiple writes to a Deep Origin database.
Read more about the to_deeporigin
method here.
Configure if running locally
If you're running this code on your local computer (outside of a Deep Origin Workstation), make sure to configure it first.
To use most of the functionality of the CLI or Python client, you must first run one of the following commands to sign into Deep Origin.
CLIPythondeeporigin authenticate\n
from deeporigin import auth\nauth.authenticate()\n
In either case, you will be presented with a prompt similar to below:
To connect to the Deep Origin OS, navigate your browser to \n\nhttps://<env>auth0.com/activate?user_code=VMPZ-PQFG\n\nand verify the confirmation code is \"VMPZ-PQFG\", and click the \"Confirm\" button.\n
When you visit that URL, you will see a prompt that looks like:
After clicking the Confirm
button, you will see a confirmation similar to below:
After signing in, your access tokens will be cached to disk and then automatically be used in subsequent interactions with Deep Origin.
Authenticating
In most cases, you only need to authenticate to the Deep Origin OS once. You do not need to authenticate every time you use the client or the CLI.
Authenticating on Deep Origin workstations
Presently, workstation users must authenticate (once) to the Deep Origin OS. We plan to develop the capability to automatically authenticate workstation users.
"},{"location":"how-to/compute-hub/variables.html","title":"Install variables and secrets","text":"Variables and secrets captured in the Deep Orgin OS, either at the organization level or the account level, can be installed into workstations by running the following command:
deeporigin variables install\n
This command will install your variables and secrets into your workstation and print a message similar to that below:
No variables were modified\nNo variables were added\nNo variables were deleted\n1 variables were unmodified:\n EnvironmentVariable: foo\n
Only on Deep Origin workstations
This function of the CLI only works on Deep Origin workstations. This function will not work on your local computer.
"},{"location":"how-to/compute-hub/workstation-info.html","title":"Get information about your Deep Origin workstation","text":"Inside a Deep Origin workstation, run the following command to get information about the workstation:
deeporigin context\n
This will display a table similar to below:
Workstation ID: average-possum-3x3\nUser ID: None\nOrganization ID: likely-aardvark-ewo\nEnvironment: edge\nDebug: False\n
Only supported on Deep Origin workstations
Note that this command is only supported on Deep Origin workstations. If you run this command outside of a workstation, you will likely see this output:
Workstation ID: None\nUser ID: None\nOrganization ID: None\nEnvironment: None\nDebug: False\n
"},{"location":"how-to/data-hub/create.html","title":"Create objects","text":"This document describes how to create databases, columns in databases, and folders (workspaces) in the Deep Origin data hub.
"},{"location":"how-to/data-hub/create.html#folders","title":"Folders","text":"Folders can be created by specifying a name, and, optionally, a parent.
CLIPythonIf no parent is specified, the folder will be created at the root level.
deeporigin data new folder --name <name> \n
To create a folder within another folder, specify the parent:
deeporigin data new folder \\\n --name <name> \\ \n --parent <parent-id>\n
from deeporigin.data_hub import api\napi.create_workspace(name=\"test-folder\")\n
To create a folder within another folder, specify the parent:
api.create_workspace(\n name=\"test-folder-2\",\n parent_id=\"parent-id\",\n)\n
"},{"location":"how-to/data-hub/create.html#databases","title":"Databases","text":"Databases can be created by specifying a name, and, optionally, a parent.
CLIPythonIf no parent is specified, the database will be created at the root level.
deeporigin data new --name <name> --database\n
To create a folder within another folder, specify the parent:
deeporigin data new database \\\n --name <name> \\\n --parent <parent-id>\n
from deeporigin.data_hub import api\napi.create_database(name=\"test-database\")\n
To create a folder within another folder, specify the parent:
api.create_database(\n name=\"test-database-2\",\n parent_id=\"parent-id\",\n)\n
"},{"location":"how-to/data-hub/create.html#database-columns","title":"Database columns","text":"Work in progress
Currently, this package has limited support for creating database columns. We plan to expand the capabilities of this package.
To create a new database column in an existing database, run:
CLIPythondeeporigin data new column \\\n --name <name> \\\n --database <database-id> \\\n --type <type>\n
from deeporigin.data_hub import api\napi.add_database_column(\n database_id=\"existing-database-id\",\n key=\"unique-key\",\n type=\"integer\",\n name=\"unique-name\",\n)\n
This code creates a new column in the existing database. To configure the type of the column, use the type
argument. The type must a member of DataType.
This document describes how to delete objects in the Deep Origin data hub:
Exercise caution
All resources will be deleted without asking for confirmation.
"},{"location":"how-to/data-hub/delete.html#delete-database-rows","title":"Delete database rows","text":"To delete a row in a database, run:
CLIPythondeeporigin data delete \\\n --row <row-id> \\\n --database <database-id>\n
from deeporigin.data_hub import api\napi.delete_rows(row_ids=[\"row-1\", \"row-2\"], database_id=\"database-id\")\n
Deleting multiple rows
Note that the python client allows you to delete multiple rows at once.
"},{"location":"how-to/data-hub/delete.html#delete-databases","title":"Delete databases","text":"To delete an entire database, run:
CLIPythondeeporigin data delete --database <db-id>\n
Aliases
The following alias also works: deeporigin data delete -d <db-id>
.
from deeporigin.data_hub import api\napi.delete_database(database_id=<db-id>)\n
"},{"location":"how-to/data-hub/delete.html#delete-folders-workspaces","title":"Delete folders (workspaces)","text":"To delete an entire folder, including all contained databases, run:
CLIPythondeeporigin data delete --folder <id>\n
Aliases
The following aliases also work --workspace
, -w
, --ws
, -f
instead of --folder
.
from deeporigin.data_hub import api\napi.delete_workspace(workspace_id=<folder-id>)\n
"},{"location":"how-to/data-hub/delete.html#delete-database-column","title":"Delete database column","text":"To delete a column in a databas, run the following command, specifying the ID of the column to delete and its parent database:
CLIPythondeeporigin data delete \\\n --column <ids> \\\n --database <database-id> \\\n
from deeporigin.data_hub import api\napi.delete_database_column(\n column_id=\"col-id\",\n database_id=\"database-id\",\n)\n
"},{"location":"how-to/data-hub/download-files.html","title":"Download files","text":"This page describes how to download files from Deep Origin to your local computer.
"},{"location":"how-to/data-hub/download-files.html#download-one-or-many-files-from-the-data-hub","title":"Download one or many files from the Data hub","text":"To download file(s) to the Deep Origin data hub, run the following commands:
CLIPythondeeporigin data download-files\n
This will download all files on Deep Origin to the current folder.
To download files that have been assigned to a particular row, use:
deeporigin data download-files --assigned-row-ids <row-id-1> <row-id-2> ...\n
To download specific files, pass the file IDs using:
deeporigin data download-files --file-ids <file-1> <file-1> ...\n
from deeporigin.data_hub import api\napi.download_files(files)\n
files
is a list of files to download, and is a list of ListFilesResponse
objects. To obtain this list, use api.list_files()
, the output of which can be used as an input to download_files
.
Download all files
To download all files, call api.list_files()
and pass the output to download_files
.
This page describes how to list resources on Deep Origin. Listing folders (workspaces), databases, rows and files can be used to discover the resources available on Deep Origin, and show their IDs for further queries.
"},{"location":"how-to/data-hub/list-data.html#list-folders","title":"List folders","text":"To list all of your Deep Origin folders, run:
CLIPythondeeporigin data list --folders\n
This will display a screen similar to below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Name \u2502 Type \u2502 ID \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Secret Project \u2502 workspace \u2502 secret \u2502\n\u2502 QC Efforts \u2502 workspace \u2502 qc-efforts \u2502\n\u2502 Covid Target \u2502 workspace \u2502 corona \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data list --folders --json | jq\n
[\n {\n \"id\": \"_workspace:ncZhbnYXXfg0zWNcGKTnz\",\n \"parentId\": null,\n \"hid\": \"secret\",\n \"type\": \"workspace\",\n \"name\": \"Secret Project\"\n },\n {\n \"id\": \"_workspace:sDTZKGZXOkhGw6XSg2Jla\",\n \"parentId\": null,\n \"hid\": \"qc-efforts\",\n \"type\": \"workspace\",\n \"name\": \"QC Efforts\"\n },\n {\n \"id\": \"_workspace:UWhlb4Wyzh2R7bySapY2m\",\n \"parentId\": null,\n \"hid\": \"corona\",\n \"type\": \"workspace\",\n \"name\": \"Covid Target\"\n }\n]\n
Combining outputs You can combine multiple output types. For example, to list all folders and databases:
deeporigin data list --folders --databases\n
from deeporigin.data_hub import api\napi.list_rows(row_type=\"workspace\")\n
"},{"location":"how-to/data-hub/list-data.html#list-databases","title":"List databases","text":"To list all of your databases in Deep Origin, run:
CLIPythondeeporigin data list --databases\n
This will display a screen similar to below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Name \u2502 Type \u2502 ID \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 First Database \u2502 database \u2502 first \u2502\n\u2502 QC Efforts \u2502 database \u2502 qc-efforts \u2502\n\u2502 Covid Target \u2502 database \u2502 corona \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data list --databases --json | jq\n
[\n {\n \"id\": \"_database:ncZhbnYXXfg0zWNcGKTnz\",\n \"parentId\": \"_workspace:ncZhbnYXXfg0zWNcGKTnz\",\n \"hid\": \"db-first\",\n \"type\": \"database\",\n \"name\": \"First Database\"\n },\n {\n \"id\": \"_database:sDTZKGZXOkhGw6XSg2Jla\",\n \"parentId\": \"_workspace:sDTZKGZXOkhGw6XSg2Jla\",\n \"hid\": \"db-qc\",\n \"type\": \"database\",\n \"name\": \"QC Efforts\"\n },\n {\n \"id\": \"_database:UWhlb4Wyzh2R7bySapY2m\",\n \"parentId\": \"_workspace:UWhlb4Wyzh2R7bySapY2m\",\n \"hid\": \"db-covid\",\n \"type\": \"database\",\n \"name\": \"Covid Target\"\n }\n]\n
Combining outputs You can combine multiple output types. For example, to list all folders and databases:
deeporigin data list --folders --databases\n
from deeporigin.data_hub import api\napi.list_rows(row_type=\"database\")\n
"},{"location":"how-to/data-hub/list-data.html#list-rows","title":"List rows","text":"To list all of your database rows in Deep Origin:
CLIPythondeeporigin data list --rows\n
This will display a screen similar to below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Name \u2502 Type \u2502 ID \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502 row \u2502 data-1 \u2502\n\u2502 \u2502 row \u2502 data-2 \u2502\n\u2502 \u2502 row \u2502 data-3 \u2502\n\u2502 \u2502 row \u2502 data-4 \u2502\n\u2502 \u2502 row \u2502 data-5 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
from deeporigin.data_hub import api\napi.list_rows(row_type=\"row\")\n
"},{"location":"how-to/data-hub/list-data.html#list-files","title":"List files","text":"To list all of your files in Deep Origin, run:
CLIPythondeeporigin data list --files\n
This will display a screen similar to below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Name \u2502 Status \u2502 ID \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 db-dna.csv \u2502 ready \u2502 _file:gBAK9tzFC5Cegx4NmSETc \u2502\n\u2502 seqs.gz \u2502 ready \u2502 _file:FgVjcv8zzyPho6FME8QFp \u2502\n\u2502 db-rna.csv \u2502 ready \u2502 _file:hnU7F62xeW8j0l1kR7YP1 \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data list --databases --json | jq\n
[\n {\n \"file\": {\n \"id\": \"_file:gBAK9tzFC5Cegx4NmSETc\",\n \"uri\": \"s3://_file:gBAK9tzFC5Cegx4NmSETc\",\n \"name\": \"db-dna.csv\",\n \"status\": \"ready\",\n \"contentLength\": 234,\n \"contentType\": \"text/csv\",\n \"dateCreated\": \"2024-05-08 01:01:48.925\",\n \"dateUpdated\": \"2024-05-08 01:01:48.925\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\"\n }\n },\n {\n \"file\": {\n \"id\": \"_file:FgVjcv8zzyPho6FME8QFp\",\n \"uri\": \"s3://_file:FgVjcv8zzyPho6FME8QFp\",\n \"name\": \"seqs.gz\",\n \"status\": \"ready\",\n \"contentLength\": 554588,\n \"contentType\": \"zip/gz\",\n \"dateCreated\": \"2024-05-08 18:08:09.149\",\n \"dateUpdated\": \"2024-05-08 18:08:09.149\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\"\n },\n \"assignments\": [\n {\n \"rowId\": \"_row:WORR9xeGvG6mSg0yyDRlk\"\n }\n ]\n },\n {\n \"file\": {\n \"id\": \"_file:hnU7F62xeW8j0l1kR7YP1\",\n \"uri\": \"s3://_file:hnU7F62xeW8j0l1kR7YP1\",\n \"name\": \"db-rna.csv\",\n \"status\": \"ready\",\n \"contentLength\": 234,\n \"contentType\": \"text/csv\",\n \"dateCreated\": \"2024-05-08 18:07:57.655\",\n \"dateUpdated\": \"2024-05-08 18:07:57.655\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\"\n },\n \"assignments\": [\n {\n \"rowId\": \"_row:mlNnmNkfktz7GT5qpjyrF\"\n }\n ]\n }\n]\n
Listing files cannot list other objects
If you pass --files
to the list command, all other arguments are ignored. As a result,
deeporigin data list --files --databases\n
will only list files. First, we start off by importing the necessary modules:
We can list all files on Deep Origin using:
from deeporigin.data_hub import api\napi.list_files()\n
To find only unassigned files, we can use:
api.list_files(is_unassigned=True)\n
To find files that are assigned to a specific row:
api.list_files(assigned_row_ids=[\"row-1\"])\n
"},{"location":"how-to/data-hub/upload-files.html","title":"Upload files","text":"This page describes how to upload files to the Deep Origin data hub, and assign them to individual cells.
"},{"location":"how-to/data-hub/upload-files.html#upload-a-file-to-the-data-hub","title":"Upload a file to the data hub","text":"To upload a file to the Deep Origin data hub, run the following commands:
CLIPythondeeporigin data upload /path/to/test.fasta\n
This will upload the file to your data hub, but the file will not yet be assigned to any database or cell. An example response is shown below:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Property \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 name \u2502 test.fasta \u2502\n\u2502 contentType \u2502 data/fasta \u2502\n\u2502 contentLength \u2502 554588 \u2502\n\u2502 id \u2502 _file:36ufKT2Sej22coSEOizpK \u2502\n\u2502 status \u2502 ready \u2502\n\u2502 uri \u2502 s3://foo \u2502\n\u2502 dateCreated \u2502 2024-06-18T14:48:33.501Z \u2502\n\u2502 dateUpdated \u2502 2024-06-18T14:48:33.501Z \u2502\n\u2502 createdByUserDrn \u2502 levins@deeporigin.com \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin upload /path/to/test.fasta | jq\n
{\n \"name\": \"test.fasta\",\n \"contentType\": \"data/fasta\",\n \"contentLength\": 554588,\n \"id\": \"_file:36ufKT2Sej22coSEOizpK\",\n \"status\": \"ready\",\n \"uri\": \"s3://foo\",\n \"dateCreated\": \"2024-06-18T14:51:43.876Z\",\n \"dateUpdated\": \"2024-06-18T14:51:43.876Z\",\n \"createdByUserDrn\": \"levins@deeporigin.com\"\n}\n
from deeporigin.data_hub import api\napi.upload_file(\"/path/to/file.fasta\")\n
This will upload the file to your data hub. An example is shown below:
{\n \"name\": \"file.fasta\",\n \"contentType\": \"data/foo\",\n \"contentLength\": 55454688,\n \"id\": \"_file:6Hdhyc3t8xZ6pmyCrQy1t\",\n \"status\": \"ready\",\n \"uri\": \"s3://data.<org-name>/_file:6Hdhyc3t8xZ6pmyCrQy1t\",\n \"dateCreated\": \"2024-06-18T14:18:37.409Z\",\n \"dateUpdated\": \"2024-06-18T14:18:37.409Z\",\n \"createdByUserDrn\": \"haldane@deeporigin.com\",\n}\n
"},{"location":"how-to/data-hub/upload-files.html#upload-a-file-to-an-existing-row","title":"Upload a file to an existing row","text":"To upload a file and assign it to a cell in an existing row, run the following commands:
CLIPythondeeporigin data upload /path/to/test.fasta \\\n --column <column_id> \\\n --database <database_id> \\\n --row <row_id>\n
from deeporigin.data_hub import api\napi.upload_file(\"/path/to/file.fasta\")\n
To assign an uploaded file to a cell in an existing row, run the assign_files_to_cell
function:
api.assign_files_to_cell(\n file_ids=[\"_file:6Hdhyc3t8xZ6pmyCrQy1t\"],\n database_id=\"db-dna\",\n column_id=\"base_sequence_file\",\n row_id=\"row-id\",\n)\n
"},{"location":"how-to/data-hub/upload-files.html#upload-a-file-to-a-new-row-of-a-database","title":"Upload a file to a new row of a database","text":"To upload a file and assign it to a column in a new row, run the following commands:
CLIPythondeeporigin data upload /path/to/test.fasta \\\n --column <column_id> \\\n --database <database_id> \n
This omits the --row
parameter, which would create a new row in the database.
First, upload a file to your data hub by running:
from deeporigin.data_hub import api\napi.upload_file(\"/path/to/file.fasta\")\n
Second, assign the file to a new row by running:
api.assign_files_to_cell(\n file_ids=[\"_file:6Hdhyc3t8xZ6pmyCrQy1t\"],\n database_id=\"db-dna\",\n column_id=\"base_sequence_file\",\n)\n
"},{"location":"how-to/data-hub/view-data.html","title":"View data","text":"This page describes how to describe and show the details of data objects in Deep Origin. To simply list objects, see List data.
"},{"location":"how-to/data-hub/view-data.html#describe-data","title":"Describe data","text":""},{"location":"how-to/data-hub/view-data.html#describe-rows","title":"Describe rows","text":"Describing rows provides metadata about the row, such as its ID, parent, and status.
Describe vs. Show
This does not show you information in that row. To see data contained in that row, use the show
command.
To describe a row in a database in Deep Origin, run:
CLIPythondeeporigin data describe <row-id>\n
This will display a table similar to:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Column \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 id \u2502 _row:WORR9xeGvG6mSg0yyDRlk \u2502\n\u2502 parentId \u2502 _database:kyEws11L4KagGAaqRwONv \u2502\n\u2502 type \u2502 row \u2502\n\u2502 dateCreated \u2502 2024-05-08 17:59:32.512306 \u2502\n\u2502 dateUpdated \u2502 2024-05-08 18:08:13.103 \u2502\n\u2502 createdByUserDrn \u2502 scientist@deeporigin.com \u2502\n\u2502 editedByUserDrn \u2502 scientist@deeporigin.com \u2502\n\u2502 hid \u2502 data-2 \u2502\n\u2502 validationStatus \u2502 valid \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data describe <row-id> --json | jq\n
{\n \"id\": \"_row:WORR9xeGvG6mSg0yyDRlk\",\n \"parentId\": \"_database:kyEws11L4KagGAaqRwONv\",\n \"type\": \"row\",\n \"dateCreated\": \"2024-05-08 17:59:32.512306\",\n \"dateUpdated\": \"2024-05-08 18:08:13.103\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\",\n \"editedByUserDrn\": \"scientist@deeporigin.com\",\n \"hid\": \"data-2\",\n \"validationStatus\": \"valid\"\n}\n
from deeporigin.data_hub import api\napi.describe_row(\"_row:WORR9xeGvG6mSg0yyDRlk\")\n
"},{"location":"how-to/data-hub/view-data.html#describe-files","title":"Describe files","text":"To describe a file in a database in Deep Origin, run:
CLIPythondeeporigin data describe <file-id>\n
This will display a table similar to:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Property \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 id \u2502 _file:gBAK9tzFC5Cegx4NmSETc \u2502\n\u2502 uri \u2502 s3://_file:gBAK9tzFC5Cegx4NmSETc \u2502\n\u2502 name \u2502 db-dna.csv \u2502\n\u2502 status \u2502 ready \u2502\n\u2502 contentLength \u2502 234 \u2502\n\u2502 contentType \u2502 text/csv \u2502\n\u2502 dateCreated \u2502 2024-05-08 01:01:48.925 \u2502\n\u2502 dateUpdated \u2502 2024-05-08 01:01:48.925 \u2502\n\u2502 createdByUserDrn \u2502 scientist@deeporigin.com \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data describe <file-id> --json | jq\n
{\n \"id\": \"_file:gBAK9tzFC5Cegx4NmSETc\",\n \"uri\": \"s3://_file:gBAK9tzFC5Cegx4NmSETc\",\n \"name\": \"db-dna.csv\",\n \"status\": \"ready\",\n \"contentLength\": 234,\n \"contentType\": \"text/csv\",\n \"dateCreated\": \"2024-05-08 01:01:48.925\",\n \"dateUpdated\": \"2024-05-08 01:01:48.925\",\n \"createdByUserDrn\": \"scientist@deeporigin.com\"\n}\n
from deeporigin.data_hub import api\napi.describe_file(\"file-id\")\n
"},{"location":"how-to/data-hub/view-data.html#show-data","title":"Show data","text":""},{"location":"how-to/data-hub/view-data.html#show-rows","title":"Show rows","text":"To show the data in a row in a database in Deep Origin, run:
CLIPythondeeporigin data show <row-id>\n
This will display a table similar to:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Column \u2502 Value \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 File \u2502 _file:hnU7F62xeW8j0l1kR7YP1 \u2502\n\u2502 Float Num \u2502 112 \u2502\n\u2502 selctcol \u2502 sdsd \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data describe <file-id> --json | jq\n
{\n \"File\": \"_file:hnU7F62xeW8j0l1kR7YP1\",\n \"Float Num\": 112,\n \"selctcol\": \"sdsd\"\n}\n
from deeporigin.data_hub import api\napi.get_row_data(\"row-id\")\n
The data will be returned as a dictionary, where the keys are the column names and the values are values of the cells.
"},{"location":"how-to/data-hub/view-data.html#show-databases","title":"Show databases","text":"CLIPythondeeporigin data show <database-id>\n
This will display a table similar to:
\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 Status \u2502 stag-id \u2502 Customer Name \u2502 Status \u2502 Output Files \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 valid \u2502 stag-1 \u2502 Blue Sun Corp \u2502 Processing \u2502 \u2502\n\u2502 valid \u2502 stag-2 \u2502 Veridian Dynamics\u2502 Complete \u2502 report.tar.gz \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n
JSON output with --json
JSON output can be requested by adding --json
, and allows you to pipe out to a JSON processor like jq:
deeporigin data describe <database-id> --json | jq\n
{\n \"Status\": [\n \"valid\",\n \"valid\"\n ],\n \"stag-id\": [\n \"stag-1\",\n \"stag-2\"\n ],\n \"Customer Name\": [\n \"Blue Sun Corp \",\n \"Veridian Dynamics\"\n ],\n \"Status\": [\n \"Processing\",\n \"Complete\"\n ],\n \"Output Files\": [\n null,\n \"report.tar.gz\"\n ]\n}\n
from deeporigin.data_hub import api\napi.get_dataframe(\"database-id\")\n
The data will be returned as a Pandas DataFrame.
"},{"location":"how-to/data-hub/write-data.html","title":"Write data","text":"This page describes how to write data to the Deep Origin data hub.
"},{"location":"how-to/data-hub/write-data.html#write-data-to-a-cell-in-a-database","title":"Write data to a cell in a database","text":""},{"location":"how-to/data-hub/write-data.html#write-text-data","title":"Write text data","text":"Run the following to write a text value to a cell in a database:
CLIPythondeeporigin data write \"some-string\" \\\n --database $database_id \\\n --column $column_id \\\n --row $row_id\n
from deeporigin.data_hub import api\napi.set_cell_data(\n \"some string\",\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
"},{"location":"how-to/data-hub/write-data.html#write-numeric-data","title":"Write numeric data","text":"Run the following to write a numeric value to a cell in a database:
CLIPythondeeporigin data write 123 \\\n --database $database_id \\\n --column $column_id \\\n --row $row_id\n
from deeporigin.data_hub import api\napi.set_cell_data(\n 1,\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
Numeric data will be coerced to the data type of the underlying cell.
"},{"location":"how-to/data-hub/write-data.html#write-select-data","title":"Write select data","text":"This section describes how to write data to a cell in a database that is of type select
. This includes cells where a single option can be selected from a list, and cells where more than one value can be selected from a list of options.
deeporigin data write \"option A\" \\\n --database $database_id \\\n --column $column_id \\\n --row $row_id\n
from deeporigin.data_hub import api\napi.set_cell_data(\n \"option A\",\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
The value must be one of the options in the list. If it is not, an error will be raised showing the list of legal options.
"},{"location":"how-to/data-hub/write-data.html#write-boolean-data","title":"Write Boolean data","text":"Run the following to write a Boolean value to a cell in a database:
CLIPythondeeporigin data write \"True\" \\\n --database $database_id \\\n --column $column_id \\\n --row $row_id\n
from deeporigin.data_hub import api\napi.set_cell_data(\n True,\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
Unsetting Boolean data To unset a cell, so that it contains no data, write None
to the cell as follows:
from deeporigin.data_hub import api\napi.set_cell_data(\n None,\n database_id=\"database ID or name\",\n column_id=\"column ID or programmatic key\",\n row_id=\"row ID\",\n)\n
"},{"location":"how-to/platform/user-info.html","title":"Get user information","text":""},{"location":"how-to/platform/user-info.html#get-info-about-current-user","title":"Get info about current user","text":"To get information about the currently logged in user, including the user ID, use:
from deeporigin.platform import api\napi.whoami()\n
returns information about the current user. A typical response is:
{\n \"data\": {\n \"attributes\": {\n \"company\": null,\n \"expertise\": null,\n \"industries\": null,\n \"pendingInvites\": [],\n \"platform\": \"OS\",\n \"title\": null\n },\n \"id\": \"google-apps|user@deeporigin.com\",\n \"type\": \"User\"\n },\n \"links\": {\n \"self\": \"https://os.deeporigin.io/users/me\"\n }\n}\n
"},{"location":"how-to/platform/user-info.html#get-information-about-a-user","title":"Get information about a user","text":"To get information about a user, use:
from deeporigin.platform import api\napi.resolve_user(\"user-id\")\n
where user-id
is the ID of the user, in the format returned by api.whoami()
. A typical response looks like:
{\n \"data\": {\n \"attributes\": {\n \"avatar\": \"https://...\",\n \"email\": \"user@deeporigin.com\",\n \"name\": \"User Name\"\n },\n \"id\": \"918ddd25-ab97-4400-9a14-7a8be1216754\",\n \"type\": \"User\"\n },\n \"links\": {\n \"self\": \"https://...\"\n }\n}\n
"},{"location":"how-to/platform/workstation-info.html","title":"Get information about workstations","text":"To list all workstations on Deep Origin, use:
from deeporigin.platform import api\napi.get_workstations()\n
This returns a list of objects, where each object correspond to a workstation. A typical entry looks like:
{\n \"attributes\": {\n \"accessMethods\": [\n {\n \"icon\": \"/assets/icons/catalog-items/jupyterlab.svg\",\n \"id\": \"jupyterlab\",\n \"name\": \"JupyterLab\"\n },\n {\n \"icon\": \"/assets/icons/catalog-items/code-server.svg\",\n \"id\": \"code-server\",\n \"name\": \"VS Code (web)\"\n }\n ],\n \"accessSettings\": {\n \"publicKey\": \"ssh-ed25519 ... \",\n \"ssh\": true\n },\n \"autoStopIdleCPUThreshold\": 0,\n \"autoStopIdleDuration\": 30,\n \"blueprint\": \"deeporigin/deeporigin-python:staging\",\n \"cloudProvider\": {\n \"region\": \"us-west-2\",\n \"vendor\": \"aws\"\n },\n \"clusterId\": \"3bb775e4-8be6-4936-a6b9\",\n \"created\": \"2024-10-05T17:01:06.840Z\",\n \"description\": \"dfd\",\n \"drn\": \"drn:...\",\n \"enableAutoStop\": true,\n \"name\": \"forthcoming-tyrannosaurus-8fd\",\n \"nextUserActions\": [\n \"DELETE\"\n ],\n \"orgHandle\": \"deeporigin-com\",\n \"requestedResources\": {\n \"cpu\": 8,\n \"gpu\": 0,\n \"gpuSize\": \"NONE\",\n \"memory\": 32,\n \"storage\": 250\n },\n \"state\": {\n \"error\": \"\",\n \"isError\": false,\n \"stage\": \"READY\",\n \"status\": \"TERMINATED\"\n },\n \"status\": \"TERMINATED\",\n \"summary\": \"\",\n \"templateVersion\": \"v0.1.0\",\n \"updated\": \"2024-10-07T12:46:46.511Z\",\n \"userHandle\": \"google-apps|srinivas@deeporigin.com\",\n \"volumeDrns\": [\n \"...\"\n ],\n \"wasAutoStopped\": false\n },\n \"id\": \"...\",\n \"type\": \"ComputeBench\"\n}\n
"},{"location":"platform/index.html","title":"Platform API","text":"The Deep Origin CLI and python client allows you to control and interact with the Deep Origin platform.
"},{"location":"ref/data-hub/high-level-api.html","title":"API reference: High-level API","text":"How to use this reference
This page contains information about each class and function in this module. This is meant as a detailed reference for this module. If you're looking an introduction, we recommend reviewing the How to section.
The deeporigin.data_hub.api
module contains high-level functions for interacting with your Deep Origin data hub.
add_database_column(\n *,\n database_id: str,\n key: str,\n type: DataType,\n name: str,\n cardinality: Cardinality = \"one\",\n required: bool = False,\n client=None\n)\n
Add a column to a database.
Parameters:
Name Type Description Defaultdatabase_id
str
ID (or human ID) of a database on Deep Origin.
requiredkey
str
key of the column
requiredtype
DataType
type of the column. Should be one of DataType
requiredname
str
name of the column
requiredcardinality
Cardinality
cardinality of the column. Specifies whether cells in this column can contain or many items. Should be one of \"one\" or \"many\"
'one'
required
bool
whether the column is required. If True, cells in this column cannot be empty
False
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.assign_files_to_cell","title":"assign_files_to_cell","text":"assign_files_to_cell(\n *,\n file_ids: list[str],\n database_id: str,\n column_id: str,\n row_id: Optional[str] = None,\n client=None\n)\n
Assign existing file(s) to a cell
Assign files to a cell in a database table, where the cell is identified by the database ID, row ID, and column ID.
If row_id is None
, a new row will be created.
Parameters:
Name Type Description Defaultfile_ids
list[str]
ID of the file
requireddatabase_id
str
ID of database to assign to
requiredcolumn_id
str
ID of the column
requiredrow_id
Optional[str]
ID of the row
None
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.convert_id_format","title":"convert_id_format","text":"convert_id_format(\n *,\n hids: Optional[Union[list[str], set[str]]] = None,\n ids: Optional[Union[list[str], set[str]]] = None,\n client=None\n) -> list[dict]\n
Convert a list of human IDs to IDs or vice versa.
Parameters:
Name Type Description Defaulthids
Optional[Union[list[str], set[str]]]
List of human IDs
None
ids
Optional[Union[list[str], set[str]]]
List of IDs (system IDs)
None
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.create_database","title":"create_database","text":"create_database(\n *,\n name: str,\n client=None,\n parent_id: Optional[str] = None,\n hid: Optional[str] = None,\n hid_prefix: Optional[str] = None\n)\n
Create a new database in the data hub
A database contains rows of data.
Parameters:
Name Type Description Defaultname
str
Name of the database to create
requiredhid
Optional[str]
Human ID. If not specified, the name will be used
None
parent_id
Optional[str]
ID of the parent. If None, the folder is created at the root level
None
hid_prefix
Optional[str]
Human ID prefix to be used for each row. If not specified, the name will be used
None
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.create_workspace","title":"create_workspace","text":"create_workspace(\n *,\n name: str,\n client=None,\n hid: Optional[str] = None,\n parent_id: Optional[str] = None\n)\n
Create a new folder (workspace) in the data hub
A folder contains can contain other rows and databases.
Parameters:
Name Type Description Defaultname
str
Name of the folder to create
requiredhid
Optional[str]
Human ID. If not specified, the name will be used
None
parent_id
Optional[str]
ID of the parent. If None, the folder is created at the root level
None
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.download","title":"download","text":"download(\n source: str,\n destination: str,\n *,\n include_files: bool = False,\n client=None\n) -> None\n
Download resources from Deep Origin and save them to a local destination.
Download databases, objects and other entities from your Deep Origin data hub and save them to local disk.
Work in progressAll features in this function have not been implemented yet.
Parameters:
Name Type Description Defaultsource
str
ID (or human ID) of a resource on Deep Origin.
requireddestination
str
Path to local directory to save resources.
requiredinclude_files
bool
if True
, download files in database.
False
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.download_database","title":"download_database","text":"download_database(\n source: Any,\n destination: str = os.getcwd(),\n *,\n include_files: bool = False,\n client=None\n) -> None\n
Download a database and save it to a CSV file on the local disk.
Download a database from your Deep Origin data hub and save to local disk as a CSV file.
Parameters:
Name Type Description Defaultsource
Any
ID (or human ID) of a resource on Deep Origin.
requireddestination
str
Path to local directory to save resources.
getcwd()
include_files
bool
if True
, download files in database.
False
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.download_file","title":"download_file","text":"download_file(\n file_id: str,\n *,\n destination: str = os.getcwd(),\n client=None\n) -> None\n
Download a file to a destination folder (workspace).
Download a file synchronously from Deep Origin to folder on the local file system.
Parameters:
Name Type Description Defaultfile_id
str
ID of the file on Deep Origin
requireddestination
str
Path to the destination folder
getcwd()
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.download_files","title":"download_files","text":"download_files(\n files: Optional[\n list[ListFilesResponse] | ListFilesResponse\n ] = None,\n *,\n save_to_dir: Path | str = Path(\".\"),\n use_file_names: bool = True,\n client=None\n) -> None\n
download multiple files in parallel to local disk
Parameters:
Name Type Description Defaultfiles
Optional[list[ListFilesResponse] | ListFilesResponse]
list of files to download. These can be of type types.list_files_response.Data
(as returned by api.list_files) or can be a list of strings of file IDs.
None
save_to_dir
Path | str
directory to save files to on local computer
Path('.')
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_cell_data","title":"get_cell_data","text":"get_cell_data(\n *, row_id: str, column_name: str, client=None\n) -> Any\n
Extract data from a cell in a database, referenced by row_id
and column_name
.
Returns the value in a single cell in a database.
CautionThis function internally calls get_row_data, so it is not efficient to write a loop to get all values of cells from a row. It will be faster to call get_row_data directly.
Parameters:
Name Type Description Defaultrow_id
str
ID (or human ID) of a row.
requiredcolumn_name
str
Name of column.
requiredReturns:
Type DescriptionAny
Value of that cell.
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_columns","title":"get_columns","text":"get_columns(row_id: str, *, client=None) -> list[dict]\n
Get information about the columns of a row or database.
If row_id
is a database, then column metadata and names are returned. If row_id
is a row, then a dictionary of human IDs and values are returned.
Parameters:
Name Type Description Defaultrow_id
str
ID (or human ID) of a row or database on Deep Origin.
required"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_dataframe","title":"get_dataframe","text":"get_dataframe(\n database_id: str,\n *,\n use_file_names: bool = True,\n reference_format: IDFormat = \"human-id\",\n return_type: DatabaseReturnType = \"dataframe\",\n client=None\n)\n
Generate a pandas.DataFrame
or dictionary for a database.
Download a database from your Deep Origin data hub and return it as a data frame or dictionary.
Parameters:
Name Type Description Defaultdatabase_id
str
ID (or human ID) of a database on Deep Origin.
requireduse_file_names
bool
If True
, refer to files by name rather than ID.
True
reference_format
IDFormat
Refer to rows on Deep Origin using human IDs or system IDs.
'human-id'
return_type
DatabaseReturnType
Whether to return a pandas.Dataframe
or a dictionary.
'dataframe'
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_notebook","title":"get_notebook","text":"get_notebook(row_id: str, *, client=None) -> list\n
Get the notebook of a row, if it exists
Parameters:
Name Type Description Defaultrow_id
str
ID (or human ID) of a row on Deep Origin.
requiredReturns:
Type Descriptionlist
The notebook of the row, returned as a list
list
of blocks
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_row_data","title":"get_row_data","text":"get_row_data(\n row_id: str,\n *,\n use_column_keys: bool = False,\n client=None\n) -> dict\n
Get the data in a row.
Read data from a row, and return it as a dictionary, where the keys are column names (or keys), and the values are the values of those cells.
Parameters:
Name Type Description Defaultrow_id
str
ID (or human ID) of a row or database on Deep Origin.
requireduse_column_keys
bool
if True
, keys of dictionary are column keys.
False
Raises:
Type DescriptionDeepOriginException
If row_id is not a row
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.get_tree","title":"get_tree","text":"get_tree(*, include_rows: bool = True, client=None) -> list\n
Construct a tree of all folders (workspaces), databases and rows.
Returns a tree that contains all folders, databases and (optionally) rows. The tree is returned as a dictionary, and children of each object are contained in a field called children
.
Parameters:
Name Type Description Defaultinclude_rows
bool
If True
, rows are included in the tree.
True
Returns:
Type Descriptionlist
A dictionary describing the tree structure of all folders
list
and databases.
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.list_files","title":"list_files","text":"list_files(\n *,\n assigned_row_ids: Optional[list[str]] = None,\n is_unassigned: Optional[bool] = None,\n file_ids: Optional[list[str]] = None,\n client=None\n) -> list\n
List files, with option to filter by assigned rows, assigned status
Returns a list of files.
Parameters:
Name Type Description Defaultassigned_row_ids
Optional[list[str]]
List of IDs of rows that files are assigned to
None
is_unassigned
Optional[bool]
If True
only files that are unassigned will be returned
None
Returns:
Type Descriptionlist
A list of files, where each entry is an object that corresponds to a file on Deep Origin
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.list_rows","title":"list_rows","text":"list_rows(\n *,\n parent_id: Optional[str] = None,\n row_type: ObjectType = None,\n parent_is_root: Optional[bool] = None,\n client=None\n) -> list\n
List rows in a database or folder (workspace).
Returns a list of rows from folders and databases, based on the parent, row type, or whether the parent is the root.
Parameters:
Name Type Description Defaultparent_id
Optional[str]
ID (or human ID) or the parent.
None
row_type
ObjectType
One of row
, folder
, or database
.
None
parent_is_root
Optional[bool]
If True
only rows that are children of the root will be returned.
None
Returns:
Type Descriptionlist
A list of objects, where each entry corresponds to a row.
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.make_database_rows","title":"make_database_rows","text":"make_database_rows(\n database_id: str, n_rows: int = 1, client=None\n) -> dict\n
Makes one or several new row(s) in a database table
Parameters:
Name Type Description Defaultdatabase_id
str
ID or Human ID of the database
requiredn_rows
int
Number of rows to create. Must be an integer greater than 0
1
Returns:
Type Descriptiondict
A dictionary that conforms to a EnsureRowsResponse
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.set_cell_data","title":"set_cell_data","text":"set_cell_data(\n value: Any,\n *,\n database_id: str,\n row_id: str,\n column_id: str,\n client=None\n) -> Any\n
Set data in a cell to some value.
Parameters:
Name Type Description Defaultvalue
Any
Value to set in the cell
requireddatabase_id
str
ID (or human ID) of a database
requiredrow_id
str
ID (or human ID) of a row
requiredcolumn_id
str
ID (or human ID) of a column
required"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.set_data_in_cells","title":"set_data_in_cells","text":"set_data_in_cells(\n *,\n values: list,\n row_ids: list[str],\n column_id: str,\n database_id: str,\n columns: Optional[list[dict]] = None,\n client=None\n)\n
Set data in multiple cells to some value.
"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.upload_file","title":"upload_file","text":"upload_file(\n file_path: str,\n client=None,\n *,\n compute_hash: bool = True\n) -> None\n
Upload a file to Deep Origin.
This upload files to your Deep Origin data hub. To assign this file to a cell, next run assign_files_to_cell
Parameters:
Name Type Description Defaultfile_path
str
Path to the file to upload
required"},{"location":"ref/data-hub/high-level-api.html#src.data_hub.api.upload_file_to_new_database_row","title":"upload_file_to_new_database_row","text":"upload_file_to_new_database_row(\n *,\n database_id: str,\n file_path: str,\n column_id: str,\n client=None\n)\n
Upload a file to a new row in a database.
Upload a file to a new row in a database. This utility function wraps two other functions:
Parameters:
Name Type Description Defaultdatabase_id
str
ID (or human ID) of a database.
requiredfile_path
str
Path to the file to upload.
requiredcolumn_id
str
ID (or human ID) of a column in the database.
required"},{"location":"ref/data-hub/low-level-api.html","title":"API reference: Low-level API","text":""},{"location":"ref/data-hub/low-level-api.html#background","title":"Background","text":"We use automatically generated code to implement a low-level Python SDK that connects to the Deep Origin data hub API. This page describes that API. In most cases, you will not need to know how this works, nor will you need to use it.
Using the methods in the DeeporiginData class
The deeporigin.api
module provides wrappers that allow you to use methods in the deeporigin_data.DeeporiginData
class, without needing to instantiate an object and configure it. Each method of this class is exposed as a function with the same name. These functions enable you to easily use the methods of the deeporigin_data.DeeporiginData
class.
For example, to use the list_files method in the DeeporiginData
class, run:
from deeporigin.data_hub import api\napi.list_files()\n
Your IDE should be able to provide information about the arguments and return types of these functions by typing api.list_files(
and then pressing tab.
Bases: AsyncAPIClient
__init__(\n *,\n token: str | None = None,\n org_id: str | None = None,\n base_url: str | URL | None = None,\n timeout: Union[\n float, Timeout, None, NotGiven\n ] = NOT_GIVEN,\n max_retries: int = DEFAULT_MAX_RETRIES,\n default_headers: Mapping[str, str] | None = None,\n default_query: Mapping[str, object] | None = None,\n http_client: AsyncClient | None = None,\n _strict_response_validation: bool = False\n) -> None\n
This automatically infers the following arguments from their corresponding environment variables if they are not provided: - token
from ORG_BEARER_TOKEN
- org_id
from ORG_ID
async
","text":"add_database_column(\n *,\n column: Column,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> AddDatabaseColumnResponse\n
Add a column to a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.archive_files","title":"archive_files async
","text":"archive_files(\n *,\n file_ids: List[str],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> object\n
Archive files by their ids.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.close","title":"close async
","text":"close() -> None\n
Close the underlying HTTPX client.
The client will not be usable after this.
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.configure_column_select_options","title":"configure_column_select_optionsasync
","text":"configure_column_select_options(\n *,\n column_id: str,\n database_id: str,\n option_configuration: Iterable[OptionConfiguration],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ConfigureColumnSelectOptionsResponse\n
Configure column select options.
Supports both adding and removing options.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.convert_id_format","title":"convert_id_format async
","text":"convert_id_format(\n *,\n conversions: Iterable[Conversion],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ConvertIDFormatResponse\n
Converts between system IDs and human IDs (HIDs).
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.copy","title":"copy","text":"copy(\n *,\n token: str | None = None,\n org_id: str | None = None,\n base_url: str | URL | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN,\n http_client: AsyncClient | None = None,\n max_retries: int | NotGiven = NOT_GIVEN,\n default_headers: Mapping[str, str] | None = None,\n set_default_headers: Mapping[str, str] | None = None,\n default_query: Mapping[str, object] | None = None,\n set_default_query: Mapping[str, object] | None = None,\n _extra_kwargs: Mapping[str, Any] = {}\n) -> Self\n
Create a new client instance re-using the same options given to the current client with optional overriding.
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.create_database","title":"create_databaseasync
","text":"create_database(\n *,\n database: Database,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateDatabaseResponse\n
Create a new database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.create_file_download_url","title":"create_file_download_url async
","text":"create_file_download_url(\n *,\n file_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateFileDownloadURLResponse\n
Returns a pre-signed S3 URL.
Parameters:
Name Type Description Defaultfile_id
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.create_file_upload","title":"create_file_upload async
","text":"create_file_upload(\n *,\n content_length: str,\n name: str,\n checksum_sha256: str | NotGiven = NOT_GIVEN,\n content_type: str | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateFileUploadResponse\n
Create a file upload URL.
Typically this is creating a pre-signed S3 URL.
Parameters:
Name Type Description Defaultchecksum_sha256
str | NotGiven
Base64 encoded SHA256 checksum of the file.
NOT_GIVEN
extra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.create_workspace","title":"create_workspace async
","text":"create_workspace(\n *,\n workspace: Workspace,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateWorkspaceResponse\n
Create a new workspace.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.delete_database","title":"delete_database async
","text":"delete_database(\n *,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteDatabaseResponse\n
Permanently deletes a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.delete_database_column","title":"delete_database_column async
","text":"delete_database_column(\n *,\n column_id: str,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteDatabaseColumnResponse\n
Delete a column from a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.delete_rows","title":"delete_rows async
","text":"delete_rows(\n *,\n database_id: str,\n row_ids: List[str],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteRowsResponse\n
Delete rows by their ids.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.delete_workspace","title":"delete_workspace async
","text":"delete_workspace(\n *,\n workspace_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteWorkspaceResponse\n
Permanently deletes a workspace and all its children.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.describe_code_execution","title":"describe_code_execution async
","text":"describe_code_execution(\n *,\n id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeCodeExecutionResponse\n
Returns information about a particular code execution.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.describe_database_stats","title":"describe_database_stats async
","text":"describe_database_stats(\n *,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeDatabaseStatsResponse\n
Returns aggregation information about a particular database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.describe_file","title":"describe_file async
","text":"describe_file(\n *,\n file_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeFileResponse\n
Describe a file by its ID.
Parameters:
Name Type Description Defaultfile_id
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.describe_row","title":"describe_row async
","text":"describe_row(\n *,\n row_id: str,\n column_selection: (\n ColumnSelection | NotGiven\n ) = NOT_GIVEN,\n fields: bool | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeRowResponse\n
Describe a row
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.ensure_rows","title":"ensure_rows async
","text":"ensure_rows(\n *,\n database_id: str,\n rows: Iterable[Row],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> EnsureRowsResponse\n
Either creates or updates an existing row.
Supports updates to both system and user defined columns.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.execute_code_async","title":"execute_code_async async
","text":"execute_code_async(\n *,\n code: str,\n code_language: Literal[\"python\"],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ExecuteCodeAsyncResponse\n
Execute code asynchronously.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.execute_code_sync","title":"execute_code_sync async
","text":"execute_code_sync(\n *,\n code: str,\n code_language: Literal[\"python\"],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ExecuteCodeSyncResponse\n
Execute code synchronously.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.get_code_execution_result","title":"get_code_execution_result async
","text":"get_code_execution_result(\n *,\n id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> object\n
Returns the result of a code execution.
Parameters:
Name Type Description Defaultid
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.import_rows","title":"import_rows async
","text":"import_rows(\n *,\n database_id: str,\n add_columns: Iterable[AddColumn] | NotGiven = NOT_GIVEN,\n creation_block_id: str | NotGiven = NOT_GIVEN,\n creation_parent_id: str | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ImportRowsResponse\n
Creates new rows from CSV data.
Parameters:
Name Type Description Defaultadd_columns
Iterable[AddColumn] | NotGiven
Optionally add additional columns to the database during import.
NOT_GIVEN
extra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_database_rows","title":"list_database_rows async
","text":"list_database_rows(\n *,\n database_row_id: str,\n column_selection: (\n ColumnSelection | NotGiven\n ) = NOT_GIVEN,\n creation_block_id: str | NotGiven = NOT_GIVEN,\n creation_parent_id: str | NotGiven = NOT_GIVEN,\n filter: Filter | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListDatabaseRowsResponse\n
List database rows with full row data.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_files","title":"list_files async
","text":"list_files(\n *,\n filters: Iterable[Filter] | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListFilesResponse\n
Returns a list of files using the filters.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_mentions","title":"list_mentions async
","text":"list_mentions(\n *,\n query: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListMentionsResponse\n
Returns entities that can be mentioned in a notebook.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_row_back_references","title":"list_row_back_references async
","text":"list_row_back_references(\n *,\n row_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListRowBackReferencesResponse\n
Finds all the places a row is referenced.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.list_rows","title":"list_rows async
","text":"list_rows(\n *,\n filters: Iterable[Filter],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListRowsResponse\n
Lists rows at a given depth in the hierarchy.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.update_database","title":"update_database async
","text":"update_database(\n *,\n id: str,\n database: Database,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateDatabaseResponse\n
Update a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.update_database_column","title":"update_database_column async
","text":"update_database_column(\n *,\n column: Column,\n column_id: str,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateDatabaseColumnResponse\n
Update a column in a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.AsyncDeeporiginData.update_workspace","title":"update_workspace async
","text":"update_workspace(\n *,\n id: str,\n workspace: Workspace,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateWorkspaceResponse\n
Update a workspace.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData","title":"DeeporiginData","text":" Bases: SyncAPIClient
__init__(\n *,\n token: str | None = None,\n org_id: str | None = None,\n base_url: str | URL | None = None,\n timeout: Union[\n float, Timeout, None, NotGiven\n ] = NOT_GIVEN,\n max_retries: int = DEFAULT_MAX_RETRIES,\n default_headers: Mapping[str, str] | None = None,\n default_query: Mapping[str, object] | None = None,\n http_client: Client | None = None,\n _strict_response_validation: bool = False\n) -> None\n
This automatically infers the following arguments from their corresponding environment variables if they are not provided: - token
from ORG_BEARER_TOKEN
- org_id
from ORG_ID
add_database_column(\n *,\n column: Column,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> AddDatabaseColumnResponse\n
Add a column to a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.archive_files","title":"archive_files","text":"archive_files(\n *,\n file_ids: List[str],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> object\n
Archive files by their ids.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.close","title":"close","text":"close() -> None\n
Close the underlying HTTPX client.
The client will not be usable after this.
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.configure_column_select_options","title":"configure_column_select_options","text":"configure_column_select_options(\n *,\n column_id: str,\n database_id: str,\n option_configuration: Iterable[OptionConfiguration],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ConfigureColumnSelectOptionsResponse\n
Configure column select options.
Supports both adding and removing options.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.convert_id_format","title":"convert_id_format","text":"convert_id_format(\n *,\n conversions: Iterable[Conversion],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ConvertIDFormatResponse\n
Converts between system IDs and human IDs (HIDs).
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.copy","title":"copy","text":"copy(\n *,\n token: str | None = None,\n org_id: str | None = None,\n base_url: str | URL | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN,\n http_client: Client | None = None,\n max_retries: int | NotGiven = NOT_GIVEN,\n default_headers: Mapping[str, str] | None = None,\n set_default_headers: Mapping[str, str] | None = None,\n default_query: Mapping[str, object] | None = None,\n set_default_query: Mapping[str, object] | None = None,\n _extra_kwargs: Mapping[str, Any] = {}\n) -> Self\n
Create a new client instance re-using the same options given to the current client with optional overriding.
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.create_database","title":"create_database","text":"create_database(\n *,\n database: Database,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateDatabaseResponse\n
Create a new database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.create_file_download_url","title":"create_file_download_url","text":"create_file_download_url(\n *,\n file_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateFileDownloadURLResponse\n
Returns a pre-signed S3 URL.
Parameters:
Name Type Description Defaultfile_id
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.create_file_upload","title":"create_file_upload","text":"create_file_upload(\n *,\n content_length: str,\n name: str,\n checksum_sha256: str | NotGiven = NOT_GIVEN,\n content_type: str | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateFileUploadResponse\n
Create a file upload URL.
Typically this is creating a pre-signed S3 URL.
Parameters:
Name Type Description Defaultchecksum_sha256
str | NotGiven
Base64 encoded SHA256 checksum of the file.
NOT_GIVEN
extra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.create_workspace","title":"create_workspace","text":"create_workspace(\n *,\n workspace: Workspace,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> CreateWorkspaceResponse\n
Create a new workspace.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.delete_database","title":"delete_database","text":"delete_database(\n *,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteDatabaseResponse\n
Permanently deletes a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.delete_database_column","title":"delete_database_column","text":"delete_database_column(\n *,\n column_id: str,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteDatabaseColumnResponse\n
Delete a column from a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.delete_rows","title":"delete_rows","text":"delete_rows(\n *,\n database_id: str,\n row_ids: List[str],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteRowsResponse\n
Delete rows by their ids.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.delete_workspace","title":"delete_workspace","text":"delete_workspace(\n *,\n workspace_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DeleteWorkspaceResponse\n
Permanently deletes a workspace and all its children.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.describe_code_execution","title":"describe_code_execution","text":"describe_code_execution(\n *,\n id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeCodeExecutionResponse\n
Returns information about a particular code execution.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.describe_database_stats","title":"describe_database_stats","text":"describe_database_stats(\n *,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeDatabaseStatsResponse\n
Returns aggregation information about a particular database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.describe_file","title":"describe_file","text":"describe_file(\n *,\n file_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeFileResponse\n
Describe a file by its ID.
Parameters:
Name Type Description Defaultfile_id
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.describe_row","title":"describe_row","text":"describe_row(\n *,\n row_id: str,\n column_selection: (\n ColumnSelection | NotGiven\n ) = NOT_GIVEN,\n fields: bool | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> DescribeRowResponse\n
Describe a row
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.ensure_rows","title":"ensure_rows","text":"ensure_rows(\n *,\n database_id: str,\n rows: Iterable[Row],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> EnsureRowsResponse\n
Either creates or updates an existing row.
Supports updates to both system and user defined columns.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.execute_code_async","title":"execute_code_async","text":"execute_code_async(\n *,\n code: str,\n code_language: Literal[\"python\"],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ExecuteCodeAsyncResponse\n
Execute code asynchronously.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.execute_code_sync","title":"execute_code_sync","text":"execute_code_sync(\n *,\n code: str,\n code_language: Literal[\"python\"],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ExecuteCodeSyncResponse\n
Execute code synchronously.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.get_code_execution_result","title":"get_code_execution_result","text":"get_code_execution_result(\n *,\n id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> object\n
Returns the result of a code execution.
Parameters:
Name Type Description Defaultid
str
Deep Origin system ID.
requiredextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.import_rows","title":"import_rows","text":"import_rows(\n *,\n database_id: str,\n add_columns: Iterable[AddColumn] | NotGiven = NOT_GIVEN,\n creation_block_id: str | NotGiven = NOT_GIVEN,\n creation_parent_id: str | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ImportRowsResponse\n
Creates new rows from CSV data.
Parameters:
Name Type Description Defaultadd_columns
Iterable[AddColumn] | NotGiven
Optionally add additional columns to the database during import.
NOT_GIVEN
extra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_database_rows","title":"list_database_rows","text":"list_database_rows(\n *,\n database_row_id: str,\n column_selection: (\n ColumnSelection | NotGiven\n ) = NOT_GIVEN,\n creation_block_id: str | NotGiven = NOT_GIVEN,\n creation_parent_id: str | NotGiven = NOT_GIVEN,\n filter: Filter | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListDatabaseRowsResponse\n
List database rows with full row data.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_files","title":"list_files","text":"list_files(\n *,\n filters: Iterable[Filter] | NotGiven = NOT_GIVEN,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListFilesResponse\n
Returns a list of files using the filters.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_mentions","title":"list_mentions","text":"list_mentions(\n *,\n query: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListMentionsResponse\n
Returns entities that can be mentioned in a notebook.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_row_back_references","title":"list_row_back_references","text":"list_row_back_references(\n *,\n row_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListRowBackReferencesResponse\n
Finds all the places a row is referenced.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.list_rows","title":"list_rows","text":"list_rows(\n *,\n filters: Iterable[Filter],\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> ListRowsResponse\n
Lists rows at a given depth in the hierarchy.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.update_database","title":"update_database","text":"update_database(\n *,\n id: str,\n database: Database,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateDatabaseResponse\n
Update a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.update_database_column","title":"update_database_column","text":"update_database_column(\n *,\n column: Column,\n column_id: str,\n database_id: str,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateDatabaseColumnResponse\n
Update a column in a database.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/low-level-api.html#deeporigin_data._client.DeeporiginData.update_workspace","title":"update_workspace","text":"update_workspace(\n *,\n id: str,\n workspace: Workspace,\n extra_headers: Headers | None = None,\n extra_query: Query | None = None,\n extra_body: Body | None = None,\n timeout: float | Timeout | None | NotGiven = NOT_GIVEN\n) -> UpdateWorkspaceResponse\n
Update a workspace.
Parameters:
Name Type Description Defaultextra_headers
Headers | None
Send extra headers
None
extra_query
Query | None
Add additional query parameters to the request
None
extra_body
Body | None
Add additional JSON properties to the request
None
timeout
float | Timeout | None | NotGiven
Override the client-level default timeout for this request, in seconds
NOT_GIVEN
"},{"location":"ref/data-hub/types.html","title":"Classes and constants","text":"This page lists some classes, types and constants used in this library.
"},{"location":"ref/data-hub/types.html#src.data_hub.dataframe.DataFrame","title":"src.data_hub.dataframe.DataFrame","text":" Bases: DataFrame
A subclass of pandas DataFrame that allows for easy updating of a Deep Origin database. This can be used as a drop-in replacement for a pandas DataFrame, and should support all methods a pandas DataFrame supports.
The primary method of creating an object of this type is to use the from_deeporigin class method.
"},{"location":"ref/data-hub/types.html#src.data_hub.dataframe.DataFrame.auto_sync","title":"auto_syncclass-attribute
instance-attribute
","text":"auto_sync: bool = False\n
When True
, changes made to the dataframe will be automatically synced to the Deep Origin database this dataframe represents.
classmethod
","text":"from_deeporigin(\n database_id: str,\n *,\n use_file_names: bool = True,\n reference_format: IDFormat = \"human-id\",\n client=None\n)\n
Create a local Deep Origin DataFrame from a Deep Origin database.
Parameters:
Name Type Description Defaultdatabase_id
str
The ID of the Deep Origin database.
requireduse_file_names
bool
Whether to use the file names in the Deep Origin database. Defaults to True.
True
reference_format
IDFormat
The format of the IDs in the Deep Origin database. Defaults to \"human-id\".
'human-id'
"},{"location":"ref/data-hub/types.html#src.data_hub.dataframe.DataFrame.to_deeporigin","title":"to_deeporigin","text":"to_deeporigin()\n
Write data in dataframe to Deep Origin
Deep Origin DataFrames can automatically synchronize
To automatically save changes to local DataFrames to Deep Origin databases, set the auto_sync
attribute of the dataframe True
.
this module contains constants used in the rest of this library
"},{"location":"ref/data-hub/types.html#src.utils.constants.Cardinality","title":"Cardinalitymodule-attribute
","text":"Cardinality = Literal['one', 'many']\n
The cardinality defines whether a cell in a database can contain one or multiple objects
"},{"location":"ref/data-hub/types.html#src.utils.constants.DataType","title":"DataTypemodule-attribute
","text":"DataType = Literal[\n \"integer\",\n \"str\",\n \"select\",\n \"date\",\n \"text\",\n \"file\",\n \"reference\",\n \"editor\",\n \"float\",\n \"boolean\",\n]\n
Type of a column in a Deep Origin database. See this page in the documentation for more information.
"},{"location":"ref/data-hub/types.html#src.utils.constants.DatabaseReturnType","title":"DatabaseReturnTypemodule-attribute
","text":"DatabaseReturnType = Literal['dataframe', 'dict']\n
Return type for api.get_dataframe
"},{"location":"ref/data-hub/types.html#src.utils.constants.FileStatus","title":"FileStatusmodule-attribute
","text":"FileStatus = Literal['ready', 'archived']\n
Status of a file. Ready files are ready to be used, downloaded, and operated on.
"},{"location":"ref/data-hub/types.html#src.utils.constants.IDFormat","title":"IDFormatmodule-attribute
","text":"IDFormat = Literal['human-id', 'system-id']\n
Format of an ID
"},{"location":"ref/data-hub/types.html#src.utils.constants.ObjectType","title":"ObjectTypemodule-attribute
","text":"ObjectType = Literal['row', 'database', 'workspace']\n
Type of a row. In Deep Origin, a row can be a database row, a database or a workspace
"},{"location":"ref/data-hub/types.html#src.utils.constants.PREFIXES","title":"PREFIXESdataclass
","text":"Prefixes for CLI and Python client
"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index cb418da..f8ac58b 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,117 +2,117 @@