# Trying to export branch to local pc using python

**URL:** <https://community.developer.atlassian.com/t/trying-to-export-branch-to-local-pc-using-python/55949>\
**Category:** Bitbucket Cloud\
**Tags:** bitbucket, export, python, api\
**Created:** [February 15, 2022, 12:41pm UTC](https://community.developer.atlassian.com/t/trying-to-export-branch-to-local-pc-using-python/55949 "2022-02-15T12:41:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon44907228](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@anon44907228](https://community.developer.atlassian.com/u/anon44907228)\
**Post date:** [February 15, 2022, 12:41pm UTC](https://community.developer.atlassian.com/t/trying-to-export-branch-to-local-pc-using-python/55949/1 "2022-02-15T12:41:34Z")

</div>

Hey im new here and im trying to export\clone my branches to my local pc using python, how can i do it? this is how i connect to bitbucket for now

```auto
    url = 'https://bitbucket.org/api/2.0/user/'
    headers = {'Content-Type': 'application/json'}

    r = requests.get(url, auth=('Username', 'Apppaswoord'), headers=headers)
    print(r.status_code)
    print(r.text)
    #print(r.content)

```
