oio.content package

Submodules

oio.content.content module

class oio.content.content.Chunk(chunk)[source]

Bases: object

checksum
data
ec
host
id
metapos
pos
raw()[source]
size
subpos
url
class oio.content.content.ChunksHelper(chunks, raw_chunk=True)[source]

Bases: object

all()[source]
exclude(id=None, pos=None, metapos=None, subpos=None, host=None)[source]
filter(id=None, pos=None, metapos=None, subpos=None, host=None)[source]
one()[source]
raw()[source]
class oio.content.content.Content(conf, container_id, metadata, chunks, storage_method, account, container_name, blob_client=None, container_client=None, logger=None)[source]

Bases: object

create(stream, **kwargs)[source]
delete(**kwargs)[source]
fetch()[source]
mime_type
move_chunk(chunk_id)[source]
move_linked_chunk(chunk_id, from_url)[source]
policy
properties
rebuild_chunk(chunk_id, allow_same_rawx=False, chunk_pos=None)[source]

oio.content.ec module

class oio.content.ec.ECContent(conf, container_id, metadata, chunks, storage_method, account, container_name, blob_client=None, container_client=None, logger=None)[source]

Bases: oio.content.content.Content

create(stream, **kwargs)[source]
fetch()[source]
rebuild_chunk(chunk_id, allow_same_rawx=False, chunk_pos=None)[source]

oio.content.factory module

class oio.content.factory.ContentFactory(conf, container_client=None, logger=None, **kwargs)[source]

Bases: object

DEFAULT_DATASEC = ('plain', {'nb_copy': '1', 'distance': '0'})
change_policy(container_id, content_id, new_policy)[source]
copy(origin, policy=None)[source]
get(container_id, content_id, account=None, container_name=None)[source]
get_by_path_and_version(container_id, path, version, account=None, container_name=None)[source]
new(container_id, path, size, policy, account=None, container_name=None, **kwargs)[source]

oio.content.plain module

class oio.content.plain.PlainContent(conf, container_id, metadata, chunks, storage_method, account, container_name, blob_client=None, container_client=None, logger=None)[source]

Bases: oio.content.content.Content

create(stream, **kwargs)[source]
fetch()[source]
rebuild_chunk(chunk_id, allow_same_rawx=False, chunk_pos=None)[source]

Module contents