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
cdffs
package
from cognite import cdffs
Follow instructions from Authentication to authenticate.
Read/write the files from/to CDF using
fsspec
supported 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
CdfFileSystem
CdfFileSystem.protocol
CdfFileSystem.cdf_list_cache
CdfFileSystem.cdf_list_expiry_time
CdfFileSystem.file_metadata
CdfFileSystem.file_cache
CdfFileSystem.file_handler
CdfFileSystem.max_download_retries
CdfFileSystem.download_retries
CdfFileSystem.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()
CdfFile
FileHandler
FsCredentials
FsOAuthCredentials
FsToken