{ "cells": [ { "cell_type": "markdown", "id": "adac961d-4e63-40e0-a660-314840baf196", "metadata": {}, "source": [ "# Dataspace\n", "\n", "
\n", "\n", "[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/simphony/docs/v4.0.0?filepath=docs%2Fusage%2Fwrappers%2Fdataspace.ipynb \"Click to run this tutorial yourself!\")\n", " \n", "
" ] }, { "cell_type": "markdown", "id": "d2616b4a-a2c9-4fca-a600-4f4aee48c488", "metadata": {}, "source": [ "| **Capability** \t| **Support** \t|\n", "|:-----------:\t|:-----------:\t|\n", "| Persistence \t| ✓ \t|\n", "| Files \t| ✓ \t|\n", "| Simulation \t| ✗ \t|\n", "| Cache \t| ✗ \t|" ] }, { "cell_type": "markdown", "id": "3374e864-787b-4c38-94b1-5a98323dcfb3", "metadata": {}, "source": [ "The Dataspace wrapper combines the functionality of the [SQLite](sqlite.ipynb) wrapper with support for files. Given a path on your computer, it creates an SQLite database file where the ontology individual data is stored, as well as a `files` subfolder where raw files associated with \"File\" individuals are stored. " ] }, { "cell_type": "markdown", "id": "71c97194-337c-441b-9837-00e0b0ecede8", "metadata": {}, "source": [ "
\n", "
Tip
\n", " \n", "Head to the [assertional knowledge](../assertional_knowledge.ipynb#Operations) section for an example on how to work with files.\n", " \n", "
" ] }, { "cell_type": "markdown", "id": "f94d11d6-4300-44ae-b584-ae7eb7c753ba", "metadata": {}, "source": [ "The Dataspace wrapper is included with SimPhoNy and located under `simphony_osp.wrappers.Dataspace`." ] }, { "cell_type": "code", "execution_count": 1, "id": "1bbf781c-fbcb-49e9-9fd1-fd7274d0ace5", "metadata": {}, "outputs": [], "source": [ "from simphony_osp.wrappers import Dataspace" ] }, { "cell_type": "markdown", "id": "d676ceed-1682-4611-a75f-cc1bd4a112a3", "metadata": {}, "source": [ "⠀" ] }, { "cell_type": "markdown", "id": "b00f9ca6-0e08-4d2a-9a4e-1f92cc88e4b2", "metadata": {}, "source": [ "**Configuration**" ] }, { "cell_type": "markdown", "id": "ed7977ed-1a71-4c19-bda6-79524450cc65", "metadata": {}, "source": [ "The [configuration string](introduction.ipynb) for the Dataspace wrapper is a path to a folder in your computer. To use the wrapper, just call it providing the [two arguments that SimPhoNy wrappers require](introduction.ipynb): the configuration string and the `create` argument." ] }, { "cell_type": "code", "execution_count": 4, "id": "d8eda9b6-1acb-45f5-9ee5-666e74f9821b", "metadata": {}, "outputs": [], "source": [ "dataspace = Dataspace('dataspace', True)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.12" } }, "nbformat": 4, "nbformat_minor": 5 }