Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding download_item to file_container_client to download individual …#384

Closed
maximvelichko wants to merge 0 commit into
microsoft:devmicrosoft/azure-devops-python-api:devfrom
maximvelichko:devmaximvelichko/azure-devops-python-api:devCopy head branch name to clipboard
Closed

Adding download_item to file_container_client to download individual …#384
maximvelichko wants to merge 0 commit into
microsoft:devmicrosoft/azure-devops-python-api:devfrom
maximvelichko:devmaximvelichko/azure-devops-python-api:devCopy head branch name to clipboard

Conversation

@maximvelichko

Copy link
Copy Markdown
Contributor

…file from an artifact

To download a single file from a build's artifact:

        artifact = self.build_client.get_artifact(project_name, build_id, 'artifact_name')

        with open('/tmp/out.zip', 'wb') as f:
            for x in self.file_container_client.download_item(artifact.resource.data.split('/')[1], item_path='artifact_name/path/to/out.zip'):
                f.write(x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.