Welcome to cognite-cdffs’s documentation!
A file-system interface (cdffs) that allow users to work with CDF (Cognite Data Fusion) Files using fsspec supported/compatible python packages (pandas, xarray etc). cdffs uses cognite-sdk-python to work with CDF Files.
Refer fsspec documentation to get the list of all supported/compatible python packages.
Installation
To install this package:
pip install cognite-cdffs
Quickstart
Important steps to follow when working with CDF Files using the fsspec supported python packages.
Import
cdffspackage
from cognite import cdffs
Follow instructions from Authentication to authenticate.
Read/write the files from/to CDF using
fsspecsupported packages.
Read zarr files using using xarray. (Environment variables are used to authenticate)
ds = xarray.open_zarr("cdffs://sample_data/test.zarr")Write zarr files using xarray.
metadata = FileMetadata(source="sample", data_set_id=1234567890) ds.to_zarr("cdffs://sample_data/test.zarr", storage_options={"file_metadata": metadata})
Contents
- cdffs
- Authentication
- Guidelines
- Examples
- API
CdfFileSystemCdfFileSystem.protocolCdfFileSystem.cdf_list_cacheCdfFileSystem.cdf_list_expiry_timeCdfFileSystem.file_metadataCdfFileSystem.file_cacheCdfFileSystem.file_handlerCdfFileSystem.max_download_retriesCdfFileSystem.download_retriesCdfFileSystem.do_connect()CdfFileSystem.split_path()CdfFileSystem.cache_path()CdfFileSystem.ls()CdfFileSystem.makedirs()CdfFileSystem.mkdir()CdfFileSystem.makedir()CdfFileSystem.rm_file()CdfFileSystem.rm_files()CdfFileSystem.exists()CdfFileSystem.mv()CdfFileSystem.cd()CdfFileSystem.open()CdfFileSystem.read_file()CdfFileSystem.cat()
CdfFileFileHandlerFsCredentialsFsOAuthCredentialsFsToken