epygram.formats
— Formats¶
Module contains:
all formats classes.
utilities to play with resource formats:
guess the format of an existing resource in a given container;
create a Resource instance with a generic function, eventually (if already existing) without knowing its format a priori;
FA field names recognition
epygram.formats.FA
— Interface-Class to the FA formatepygram.formats.LFA
— Interface-Class to the LFA formatepygram.formats.DDHLFA
— Interface-Class to the DDHLFA formatepygram.formats.LFI
— Interface-Class to the LFI formatepygram.formats.GeoPoints
— Interface-Class to the GeoPoints formatepygram.formats.TIFFMF
— Interface-Class to the TIFFMF formatepygram.formats.netCDF
— Interface-Class to the netCDF formatepygram.formats.GRIB
— Interface-Class to the GRIB format
- epygram.formats.guess(filename)[source]¶
Returns the name of the format of the resource located at a given filename, if succeeded.
- epygram.formats.resource(filename, openmode, fmt=None, **kwargs)[source]¶
Returns an instance of Resource of the requested fmt format, located at the given filename, open with the given openmode.
- Parameters
filename – name (path) of the file to open
openmode – opening mode (‘r’, ‘a’, ‘w’)
fmt – format of the resource; with openmode ‘r’ or ‘a’, fmt is optional and can be guessed from the existing resource
Other kwargs are passed to the resource constructor.