# coding=utf-8
from atlassian import Bitbucket

bitbucket = Bitbucket(url="http://localhost:7990", username="admin", password="admin")

with open("archive.tgz", mode="wb") as dest_fd:
    bitbucket.download_repo_archive(
        project_key="DEMO",
        repository_slug="example-repository",
        at="master",
        format="tar.gz",
    )

4e63b77fe533b5f1c201b49ed4efa55f87fb2a81
<mask token>

<mask token>
with open('archive.tgz', mode='wb') as dest_fd:
    bitbucket.download_repo_archive(project_key='DEMO', repository_slug=
        'example-repository', at='master', format='tar.gz')

<mask token>
bitbucket = Bitbucket(url='http://localhost:7990', username='admin',
    password='admin')
with open('archive.tgz', mode='wb') as dest_fd:
    bitbucket.download_repo_archive(project_key='DEMO', repository_slug=
        'example-repository', at='master', format='tar.gz')

from atlassian import Bitbucket
bitbucket = Bitbucket(url='http://localhost:7990', username='admin',
    password='admin')
with open('archive.tgz', mode='wb') as dest_fd:
    bitbucket.download_repo_archive(project_key='DEMO', repository_slug=
        'example-repository', at='master', format='tar.gz')

# coding=utf-8
from atlassian import Bitbucket

bitbucket = Bitbucket(url="http://localhost:7990", username="admin", password="admin")

with open("archive.tgz", mode="wb") as dest_fd:
    bitbucket.download_repo_archive(
        project_key="DEMO",
        repository_slug="example-repository",
        at="master",
        format="tar.gz",
    )
