fedn.common.storage.s3 package

Submodules

fedn.common.storage.s3.base module

class fedn.common.storage.s3.base.Repository[source]

Bases: object

abstract get_artifact(instance_name)[source]
Parameters:

instance_name

abstract set_artifact(instance_name, instance)[source]
Parameters:
  • instance_name

  • instance

fedn.common.storage.s3.miniorepo module

class fedn.common.storage.s3.miniorepo.MINIORepository(config)[source]

Bases: Repository

client = None
create_bucket(bucket_name)[source]
Parameters:

bucket_name

delete_artifact(instance_name, bucket=[])[source]
Parameters:
  • instance_name

  • bucket

delete_objects()[source]
get_artifact(instance_name, bucket='')[source]
Parameters:
  • instance_name

  • bucket

Returns:

get_artifact_stream(instance_name)[source]
Parameters:

instance_name

Returns:

list_artifacts()[source]
Returns:

set_artifact(instance_name, instance, is_file=False, bucket='')[source]

Instance must be a byte-like object.

fedn.common.storage.s3.s3repo module

class fedn.common.storage.s3.s3repo.S3ModelRepository(config)[source]

Bases: MINIORepository

delete_compute_context(compute_package)[source]
Parameters:

compute_package

get_compute_package(compute_package)[source]
Parameters:

compute_package

Returns:

get_model(model_id)[source]
Parameters:

model_id

Returns:

get_model_stream(model_id)[source]
Parameters:

model_id

Returns:

set_compute_context(name, compute_package, is_file=True)[source]
Parameters:
  • name

  • compute_package

  • is_file

set_model(model, is_file=True)[source]
Parameters:
  • model

  • is_file

Returns:

Module contents