Skip to content

Add support for exposing File Streams #220

@Peter-Lande

Description

@Peter-Lande

Is your feature request related to a problem? Please describe.
I have been working with this library professionally and have found that being unable to report progress of file downloads to be problematic for end users. I also have a use case for keeping the downloaded files in memory as it is more efficient for my use cases.

Describe the solution you'd like
Expose the stream produced by the object._get function in the artifact module so users can process the file info as they would like. This could return a filter(lambda packet: packet, self._get(f"{urllib.parse.quote(artifactory_file_path)}", stream=True).iter_content(chunk_size=8192)) (such as done in _download ) which would give an iterable stream of the file data that could then be used for in memory processing. Could also have a custom model for this.

Describe alternatives you've considered
Could register callbacks for usage in the iterator of the content, for reporting to logger objects or for moving data elsewhere. Maybe have a default callback for writing to a file location.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions