Usage
S3 Usage
DASI can be configured to use any object stores that support S3 API.
A complete example can be found in example Simple S3.
Configuration
schema: ./schema
catalogue: toc
spaces:
- roots:
- path: ./database
store: s3
s3:
endpoint: "127.0.0.1:9000"
credential: ./s3credentials.yml
bucketPrefix: "dasi-"
Python Usage
The Python interface to DASI is called pydasi.
Note
Please refer to DASI Python on how to install pydasi.
Simple Archive
We use the dasi.dasi.Dasi.archive()
function to save example data SIMPLE_DATA
using the metadata key
as:
from dasi import Dasi
dasi = Dasi("config.yaml")
key=["User":"muster", "Project":"simple", "Date":"16-03-23", "Type":"text"]
data="SIMPLE_DATA"
dasi.archive(key, data)
where, the example schema is:
[ User, Project
[ Date
[ Type ]]]
See Configuration for config yaml..
Reference
- class dasi.dasi.Key(key=None)
Container for keyword:value.
- dasi.dasi.Dasi.archive(self, key, data)
Write data to be stored according to Dasi configuration.
- Parameters:
key – The metadata description of the data to store and index
data – A pointer to a (read-only) copy of the data