beamds.beam.path package#

Submodules#

beamds.beam.path.core module#

class beamds.beam.path.core.BeamFile(data, timestamp)#

Bases: tuple

data#

Alias for field number 0

timestamp#

Alias for field number 1

class beamds.beam.path.core.BeamKey(config_path=None, **kwargs)[source]#

Bases: object

property config_file#
property config_path#
set_hparams(hparams)[source]#
store(name=None, value=None, store_to_env=True)[source]#
class beamds.beam.path.core.DictBasedPath(*pathsegments, scheme=None, client=None, data=None, **kwargs)[source]#

Bases: PureBeamPath

property data#
exists()[source]#
get_data()[source]#
is_dir()[source]#
is_file()[source]#
iterdir()[source]#
mkdir(*args, parents=True, exist_ok=True, **kwargs)[source]#
rename(target)[source]#
replace(target)[source]#
rmdir()[source]#
set_data(data)[source]#
class beamds.beam.path.core.DictPath(*pathsegments, client=None, data=None, **kwargs)[source]#

Bases: DictBasedPath

is_file()[source]#
read(ext=None, **kwargs)[source]#

@param ext: @param kwargs: @return:

Supports the following formats: - .fea: Feather - .csv: CSV - .pkl, .pickle: Pickle - .dill: Dill - .npy: Numpy - .json: JSON - .ndjson: Newline delimited JSON - .orc: ORC - .txt, ‘.text’, ‘.py’, ‘.sh’, ‘.c’, ‘.cpp’, ‘.h’, ‘.hpp’, ‘.java’, ‘.js’, ‘.css’,

‘.html’, ‘.md’: Text

  • .npz: Numpy zip

  • .scipy_npz: Scipy sparse matrix

  • .flac: Soundfile

  • .parquet: Parquet

  • .pt: PyTorch

  • .xls, .xlsx, .xlsm, .xlsb, .odf, .ods, .odt: Excel

  • .avro: Avro

  • .adjlist, .gexf, .gml, .pajek, .graphml: NetworkX

  • .ini: ConfigParser

  • .h5, .hdf5: HDF5

  • .yaml, .yml: YAML

  • .xml: XML

  • .mat: MAT

  • .zip: ZIP

  • .msgpack: MessagePack

  • .cloudpickle: Cloudpickle

  • .geojson: GeoJSON

  • .wav: Soundfile

  • .joblib, .z, .gz, .bz2, .xz, .lzma: Joblib

  • .safetensors: SafeTensors

  • .bin: Bytes

write(*args, ext=None, **kwargs)[source]#
class beamds.beam.path.core.IOPath(*pathsegments, client=None, data=None, **kwargs)[source]#

Bases: DictBasedPath

is_file()[source]#
class beamds.beam.path.core.PureBeamPath(*pathsegments, scheme=None, client=None, **kwargs)[source]#

Bases: BeamResource

absolute()[source]#
property anchor#
as_posix()[source]#
clean(ignore=None, include=None)[source]#
close()[source]#
close_at_exit()[source]#
copy(dst, ignore=None, include=None)[source]#
property drive#
exists()[source]#
feather_index_mark = 'feather_index:'#
gen(path)[source]#
getatime()[source]#
getctime()[source]#
getmtime()[source]#
glob(pattern, case_sensitive=None)[source]#
is_absolute()[source]#
is_dir()[source]#
is_file()[source]#
property is_local#
is_relative_to(*other)[source]#
is_reserved()[source]#
is_root()[source]#
iter_content(ext=None, **kwargs)[source]#
iterdir()[source]#
joinpath(*other)[source]#
property list#
match(pattern)[source]#
mkdir(*args, **kwargs)[source]#
static mode(op, ext)[source]#
property name#
not_empty(filter_pattern=None)[source]#
open(mode='rb', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)[source]#
property parent#
property parents#
property parts#
read(ext=None, target=None, **kwargs)[source]#

@param ext: @param kwargs: @return:

Supports the following formats: - .fea: Feather - .csv: CSV - .pkl, .pickle: Pickle - .dill: Dill - .npy: Numpy - .json: JSON - .ndjson: Newline delimited JSON - .orc: ORC - .txt, ‘.text’, ‘.py’, ‘.sh’, ‘.c’, ‘.cpp’, ‘.h’, ‘.hpp’, ‘.java’, ‘.js’, ‘.css’,

‘.html’, ‘.md’: Text

  • .npz: Numpy zip

  • .scipy_npz: Scipy sparse matrix

  • .flac: Soundfile

  • .parquet: Parquet

  • .pt: PyTorch

  • .xls, .xlsx, .xlsm, .xlsb, .odf, .ods, .odt: Excel

  • .avro: Avro

  • .adjlist, .gexf, .gml, .pajek, .graphml: NetworkX

  • .ini: ConfigParser

  • .h5, .hdf5: HDF5

  • .yaml, .yml: YAML

  • .xml: XML

  • .mat: MAT

  • .zip: ZIP

  • .msgpack: MessagePack

  • .cloudpickle: Cloudpickle

  • .geojson: GeoJSON

  • .wav: Soundfile

  • .joblib, .z, .gz, .bz2, .xz, .lzma: Joblib

  • .safetensors: SafeTensors

  • .bin: Bytes

read_bytes()[source]#
read_inner_content(content, inner_ext=None, **kwargs)[source]#
read_text()[source]#
readlines()[source]#
relative_to(*other)[source]#
rename(target)[source]#
replace(target)[source]#
resolve(strict=False)[source]#
rglob(*args, **kwargs)[source]#
rmdir()[source]#
rmtree(ignore=None, include=None)[source]#
property root#
samefile(other)[source]#
serialize_inner_content(content, inner_ext=None, **kwargs)[source]#
stat()[source]#
property stem#
property str#
property suffix#
property suffixes#
text_based_extensions = ['.txt', '.text', '.py', '.sh', '.c', '.cpp', '.h', '.hpp', '.java', '.js', '.css', '.html', '.md', '.json', '.orc', '.yaml', '.yml', '.ndjson', '.csv', '.ini']#
textual_extensions = ['.txt', '.text', '.py', '.sh', '.c', '.cpp', '.h', '.hpp', '.java', '.js', '.css', '.html', '.md']#
touch(mode=438, exist_ok=True)[source]#
walk()[source]#
with_name(name)[source]#
with_stem(stem)[source]#
with_suffix(suffix)[source]#
write(*args, ext=None, **kwargs)[source]#
write_bytes(x)[source]#
write_text(x, encoding=None, errors=None, newline=None)[source]#
beamds.beam.path.core.get_target(path, deep=1, target=None)[source]#
beamds.beam.path.core.normalize_host(hostname, port=None, default='localhost')[source]#
beamds.beam.path.core.strip_prefix(text, prefix)[source]#

beamds.beam.path.models module#

class beamds.beam.path.models.BeamPath(*pathsegments, **kwargs)[source]#

Bases: PureBeamPath

absolute()[source]#
chmod(mode)[source]#
classmethod cwd()[source]#
exists()[source]#
expanduser()[source]#
getatime()[source]#
getctime()[source]#
getmtime()[source]#
glob(pattern, case_sensitive=None)[source]#
group()[source]#
classmethod home()[source]#
is_block_device()[source]#
is_char_device()[source]#
is_dir()[source]#
is_fifo()[source]#
is_file()[source]#
is_mount()[source]#
is_socket()[source]#
iterdir()[source]#
lchmod(mode)[source]#
lstat()[source]#
mkdir(parents=True, exist_ok=True)[source]#
owner()[source]#
read(ext=None, **kwargs)[source]#

@param ext: @param kwargs: @return:

Supports the following formats: - .fea: Feather - .csv: CSV - .pkl, .pickle: Pickle - .dill: Dill - .npy: Numpy - .json: JSON - .ndjson: Newline delimited JSON - .orc: ORC - .txt, ‘.text’, ‘.py’, ‘.sh’, ‘.c’, ‘.cpp’, ‘.h’, ‘.hpp’, ‘.java’, ‘.js’, ‘.css’,

‘.html’, ‘.md’: Text

  • .npz: Numpy zip

  • .scipy_npz: Scipy sparse matrix

  • .flac: Soundfile

  • .parquet: Parquet

  • .pt: PyTorch

  • .xls, .xlsx, .xlsm, .xlsb, .odf, .ods, .odt: Excel

  • .avro: Avro

  • .adjlist, .gexf, .gml, .pajek, .graphml: NetworkX

  • .ini: ConfigParser

  • .h5, .hdf5: HDF5

  • .yaml, .yml: YAML

  • .xml: XML

  • .mat: MAT

  • .zip: ZIP

  • .msgpack: MessagePack

  • .cloudpickle: Cloudpickle

  • .geojson: GeoJSON

  • .wav: Soundfile

  • .joblib, .z, .gz, .bz2, .xz, .lzma: Joblib

  • .safetensors: SafeTensors

  • .bin: Bytes

read_bytes()[source]#
read_text(*args, **kwargs)[source]#
relative_to(*other)[source]#
rename(target)[source]#
replace(target)[source]#
rmdir()[source]#
samefile(other)[source]#
stat()[source]#
touch(*args, **kwargs)[source]#
write(*args, ext=None, **kwargs)[source]#
write_bytes(data)[source]#
write_text(data, *args, **kwargs)[source]#
class beamds.beam.path.models.CometAsset(*pathsegments, client=None, hostname=None, port=None, access_key=None, secret_key=None, tls=True, **kwargs)[source]#

Bases: PureBeamPath

property assets_map#
exists()[source]#
property experiment#
property experiment_key#
is_dir()[source]#
is_file()[source]#
iterdir()[source]#
mkdir(*args, **kwargs)[source]#
property next_level#
rename(target)[source]#
replace(target)[source]#
rmdir()[source]#
class beamds.beam.path.models.HDFSPAPath(*pathsegments, client=None, hostname=None, port=None, username=None, buffer_size=0, replication=3, kerb_ticket=None, extra_conf=None, default_block_size=None, **kwargs)[source]#

Bases: PyArrowPath

class beamds.beam.path.models.HDFSPath(*pathsegments, client=None, hostname=None, port=None, timeout=None, username=None, skip_trash=False, n_threads=0, temp_dir=None, chunk_size=65536, progress=None, cleanup=True, tls=True, **kwargs)[source]#

Bases: PureBeamPath

exists()[source]#
is_dir()[source]#
is_file()[source]#
iterdir()[source]#
mkdir(mode=511, parents=True, exist_ok=True)[source]#
read(ext=None, **kwargs)[source]#

@param ext: @param kwargs: @return:

Supports the following formats: - .fea: Feather - .csv: CSV - .pkl, .pickle: Pickle - .dill: Dill - .npy: Numpy - .json: JSON - .ndjson: Newline delimited JSON - .orc: ORC - .txt, ‘.text’, ‘.py’, ‘.sh’, ‘.c’, ‘.cpp’, ‘.h’, ‘.hpp’, ‘.java’, ‘.js’, ‘.css’,

‘.html’, ‘.md’: Text

  • .npz: Numpy zip

  • .scipy_npz: Scipy sparse matrix

  • .flac: Soundfile

  • .parquet: Parquet

  • .pt: PyTorch

  • .xls, .xlsx, .xlsm, .xlsb, .odf, .ods, .odt: Excel

  • .avro: Avro

  • .adjlist, .gexf, .gml, .pajek, .graphml: NetworkX

  • .ini: ConfigParser

  • .h5, .hdf5: HDF5

  • .yaml, .yml: YAML

  • .xml: XML

  • .mat: MAT

  • .zip: ZIP

  • .msgpack: MessagePack

  • .cloudpickle: Cloudpickle

  • .geojson: GeoJSON

  • .wav: Soundfile

  • .joblib, .z, .gz, .bz2, .xz, .lzma: Joblib

  • .safetensors: SafeTensors

  • .bin: Bytes

rename(target)[source]#
replace(target)[source]#
rmdir()[source]#
samefile(other)[source]#
write(*args, ext=None, **kwargs)[source]#
class beamds.beam.path.models.MLFlowPath(*pathsegments, client=None, hostname=None, port=None, access_key=None, secret_key=None, tls=False, **kwargs)[source]#

Bases: PureBeamPath

property artifact_info#
exists()[source]#
property experiment#
property experiment_id#
is_dir()[source]#
is_file()[source]#
iterdir()[source]#
mkdir(*args, parents=True, exist_ok=True)[source]#
rename(target)[source]#
rmdir()[source]#
property run#
property run_id#
stat()[source]#
class beamds.beam.path.models.PyArrowPath(*args, strip_path=False, **kwargs)[source]#

Bases: PureBeamPath

exists()[source]#
property file_info#
is_dir()[source]#
is_file()[source]#
iterdir()[source]#
mkdir(parents=True, exist_ok=True)[source]#
read(ext=None, **kwargs)[source]#

@param ext: @param kwargs: @return:

Supports the following formats: - .fea: Feather - .csv: CSV - .pkl, .pickle: Pickle - .dill: Dill - .npy: Numpy - .json: JSON - .ndjson: Newline delimited JSON - .orc: ORC - .txt, ‘.text’, ‘.py’, ‘.sh’, ‘.c’, ‘.cpp’, ‘.h’, ‘.hpp’, ‘.java’, ‘.js’, ‘.css’,

‘.html’, ‘.md’: Text

  • .npz: Numpy zip

  • .scipy_npz: Scipy sparse matrix

  • .flac: Soundfile

  • .parquet: Parquet

  • .pt: PyTorch

  • .xls, .xlsx, .xlsm, .xlsb, .odf, .ods, .odt: Excel

  • .avro: Avro

  • .adjlist, .gexf, .gml, .pajek, .graphml: NetworkX

  • .ini: ConfigParser

  • .h5, .hdf5: HDF5

  • .yaml, .yml: YAML

  • .xml: XML

  • .mat: MAT

  • .zip: ZIP

  • .msgpack: MessagePack

  • .cloudpickle: Cloudpickle

  • .geojson: GeoJSON

  • .wav: Soundfile

  • .joblib, .z, .gz, .bz2, .xz, .lzma: Joblib

  • .safetensors: SafeTensors

  • .bin: Bytes

rename(target)[source]#
replace(target)[source]#
rmdir()[source]#
rmtree()[source]#
property str_path#
write(*args, ext=None, **kwargs)[source]#
class beamds.beam.path.models.RedisPath(*pathsegments, client=None, hostname=None, port=None, password=None, username=None, data=None, tls=False, db=0, **kwargs)[source]#

Bases: PureBeamPath

property directory_key#
exists()[source]#
glob(pattern, case_sensitive=None)[source]#
is_dir()[source]#
is_empty()[source]#
is_file()[source]#
iterdir()[source]#
property key#
mkdir(*args, parents=True, exist_ok=True)[source]#
normalize_directory_key(key=None)[source]#
rename(target)[source]#
replace(target)[source]#
rmdir()[source]#
static write_to_redis(client, key, content, timestamp=None)[source]#
class beamds.beam.path.models.S3PAPath(*pathsegments, client=None, hostname=None, port=None, access_key=None, secret_key=None, tls=True, **kwargs)[source]#

Bases: PyArrowPath

class beamds.beam.path.models.S3Path(*pathsegments, client=None, hostname=None, port=None, access_key=None, secret_key=None, tls=True, storage_class=None, **kwargs)[source]#

Bases: PureBeamPath

property bucket#
exists()[source]#
getmtime()[source]#
is_dir()[source]#
is_file()[source]#
iterdir()[source]#
key_depth(key=None)[source]#
mkdir(parents=True, exist_ok=True)[source]#
normalize_directory_key(key=None)[source]#
property object#
read_bytes()[source]#
read_text(encoding=None, errors=None)[source]#
rename(target)[source]#
replace(target)[source]#
rmdir()[source]#
stat()[source]#
class beamds.beam.path.models.SFTPPath(*pathsegments, client=None, hostname=None, username=None, private_key=None, password=None, port=None, private_key_pass=None, ciphers=None, log=False, cnopts=None, default_path=None, disable_hostkey=True, **kwargs)[source]#

Bases: PureBeamPath

exists()[source]#
is_dir()[source]#
is_file()[source]#
iterdir()[source]#
mkdir(*args, mode=777, **kwargs)[source]#
rename(target)[source]#
rmdir()[source]#
samefile(other)[source]#
class beamds.beam.path.models.SMBPath(*pathsegments, client=None, hostname=None, username=None, password=None, port=None, connection_timeout=60, **kwargs)[source]#

Bases: PureBeamPath

exists()[source]#
is_dir()[source]#
is_file()[source]#
iterdir()[source]#
mkdir(parents=True, exist_ok=True, **kwargs)[source]#
register_smb_session()[source]#
rename(target)[source]#
replace(target)[source]#
rmdir()[source]#
property smb_path#

beamds.beam.path.resource module#

beamds.beam.path.resource.beam_path(path, username=None, hostname=None, port=None, private_key=None, access_key=None, secret_key=None, password=None, **kwargs) BeamPath | Any[source]#

@param port: @param hostname: @param username: @param protocol: @param private_key: @param secret_key: AWS secret key @param access_key: AWS access key @param path: URI syntax: [protocol://][username@][hostname][:port][/path/to/file] @return: BeamPath object

beamds.beam.path.resource.in_memory_storage(mode=None, data=None)[source]#

beamds.beam.path.utils module#

class beamds.beam.path.utils.FileSystem(path)[source]#

Bases: object

copy(path)[source]#
exists()[source]#
is_dir()[source]#
is_file()[source]#
iterdir()[source]#
joinpath(path)[source]#
mkdir(exist_ok=True, parents=True)[source]#
open(mode='r')[source]#
rmtree()[source]#
root()[source]#
beamds.beam.path.utils.local_copy(path, tmp_path='/tmp', as_beam_path=False, override=False, disable=None)[source]#
beamds.beam.path.utils.temp_local_file(content, tmp_path='/tmp', name=None, ext=None, binary=True, as_beam_path=True)[source]#

Module contents#