Module Import alias ImportFrom alias alias ImportFrom alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Return NameLoad Return BinOpMod Str Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Return NameLoad Return BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore NameLoad Assign NameStore Str Assign NameStore ListLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Dict For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn NameLoad NameLoad body Continue Assign NameStore BinOpAdd SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str BinOpMod NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str BinOpMod NameLoad TupleLoad NameLoad NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpMod Str SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Slice Num Num If CompareNotIn Str NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Str Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Delete SubscriptDel NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMod Str NameLoad Return Dict Str Str Str Str Str Str Str SubscriptLoad NameLoad Index Str BoolOpOr SubscriptLoad NameLoad Index Str Str BoolOpOr SubscriptLoad NameLoad Index Str NameLoad SubscriptLoad NameLoad Index Str BinOpMod Str SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad NameLoad IfExp SubscriptLoad NameLoad Index Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Return BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad For NameStore SubscriptLoad NameLoad Index Str body If CompareIn Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad body Return BinOpMod Str TupleLoad NameLoad NameLoad SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num orelse Return TupleLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A re versions version_sort version_process json_api_client JSONApiClient N/A N/A urllib quote N/A N/A N/A ImportError N/A urllib.parse quote N/A _readme_filenames N/A readme readme.txt readme.md readme.mkd readme.mdown readme.markdown readme.textile readme.creole readme.rst BitBucketClient N/A JSONApiClient N/A make_tags_url N/A N/A self repo N/A N/A N/A 
        Generate the tags URL for a BitBucket repo if the value passed is a BitBucket
        repository URL

        :param repo:
            The repository URL

        :return:
            The tags URL if repo was a BitBucket repo, otherwise False
         N/A match N/A N/A re match https?://bitbucket.org/([^/]+/[^/]+)/?$ repo N/A N/A match N/A N/A False N/A N/A https://bitbucket.org/%s#tags N/A N/A match group 1 N/A make_branch_url N/A N/A self repo branch N/A N/A N/A 
        Generate the branch URL for a BitBucket repo if the value passed is a BitBucket
        repository URL

        :param repo:
            The repository URL

        :param branch:
            The branch name

        :return:
            The branch URL if repo was a BitBucket repo, otherwise False
         N/A match N/A N/A re match https?://bitbucket.org/([^/]+/[^/]+)/?$ repo N/A N/A match N/A N/A False N/A N/A https://bitbucket.org/%s/src/%s N/A N/A N/A match group 1 N/A quote branch N/A download_info N/A N/A self url tag_prefix N/A None N/A N/A 
        Retrieve information about downloading a package

        :param url:
            The URL of the repository, in one of the forms:
              https://bitbucket.org/{user}/{repo}
              https://bitbucket.org/{user}/{repo}/src/{branch}
              https://bitbucket.org/{user}/{repo}/#tags
            If the last option, grabs the info from the newest
            tag that is a valid semver version.

        :param tag_prefix:
            If the URL is a tags URL, only match tags that have this prefix

        :raises:
            DownloaderException: when there is an error downloading
            ClientException: when there is an error parsing the response

        :return:
            None if no match, False if no commit, or a list of dicts with the
            following keys:
              `version` - the version number of the download
              `url` - the download URL of a zip file of the package
              `date` - the ISO-8601 timestamp string when the version was published
         N/A tags_match N/A N/A re match https?://bitbucket.org/([^/]+/[^#/]+)/?#tags$ url N/A version None N/A url_pattern https://bitbucket.org/%s/get/%s.zip N/A output N/A N/A tags_match N/A N/A user_repo N/A N/A tags_match group 1 N/A tags_url N/A N/A self _make_api_url user_repo /tags N/A tags_list N/A N/A self fetch_json tags_url N/A tag_info N/A version_process N/A N/A tags_list keys tag_prefix N/A tag_info N/A version_sort tag_info reverse True N/A N/A tag_info N/A N/A False N/A used_versions N/A N/A info tag_info N/A N/A version N/A info N/A version N/A N/A version used_versions N/A N/A N/A tag N/A N/A info N/A prefix version N/A N/A N/A output append N/A url commit version N/A url_pattern N/A user_repo tag tag version N/A N/A used_versions N/A version True N/A N/A N/A user_repo commit N/A N/A self _user_repo_branch url N/A N/A user_repo N/A N/A user_repo N/A N/A N/A output append N/A url commit N/A url_pattern N/A user_repo commit commit N/A release output N/A N/A changeset_url N/A N/A self _make_api_url user_repo N/A /changesets/%s N/A release N/A commit N/A commit_info N/A N/A self fetch_json changeset_url N/A timestamp N/A N/A commit_info N/A utctimestamp N/A 0 19 N/A N/A version release N/A N/A N/A release N/A version N/A N/A re sub [\-: ] . timestamp N/A N/A release N/A date timestamp N/A N/A release N/A commit N/A output N/A repo_info N/A N/A self url N/A N/A N/A 
        Retrieve general information about a repository

        :param url:
            The URL to the repository, in one of the forms:
              https://bitbucket.org/{user}/{repo}
              https://bitbucket.org/{user}/{repo}/src/{branch}

        :raises:
            DownloaderException: when there is an error downloading
            ClientException: when there is an error parsing the response

        :return:
            None if no match, or a dict with the following keys:
              `name`
              `description`
              `homepage` - URL of the homepage
              `author`
              `readme` - URL of the readme
              `issues` - URL of bug tracker
              `donate` - URL of a donate page
         N/A N/A user_repo branch N/A N/A self _user_repo_branch url N/A N/A user_repo N/A N/A user_repo N/A api_url N/A N/A self _make_api_url user_repo N/A info N/A N/A self fetch_json api_url N/A issues_url N/A https://bitbucket.org/%s/issues user_repo N/A N/A name description homepage author donate readme issues N/A info N/A name N/A N/A info N/A description No description provided N/A N/A info N/A website url N/A info N/A owner N/A https://gratipay.com/on/bitbucket/%s/ N/A info N/A owner N/A N/A self _readme_url user_repo branch N/A N/A info N/A has_issues issues_url None N/A _main_branch_name N/A N/A self user_repo N/A N/A N/A 
        Fetch the name of the default branch

        :param user_repo:
            The user/repo name to get the main branch for

        :raises:
            DownloaderException: when there is an error downloading
            ClientException: when there is an error parsing the response

        :return:
            The name of the main branch - `master` or `default`
         N/A main_branch_url N/A N/A self _make_api_url user_repo /main-branch N/A main_branch_info N/A N/A self fetch_json main_branch_url True N/A N/A main_branch_info N/A name N/A _make_api_url N/A N/A self user_repo suffix N/A N/A N/A 
        Generate a URL for the BitBucket API

        :param user_repo:
            The user/repo of the repository

        :param suffix:
            The extra API path info to add to the URL

        :return:
            The API URL
         N/A N/A https://api.bitbucket.org/1.0/repositories/%s%s N/A user_repo suffix N/A _readme_url N/A N/A self user_repo branch prefer_cached N/A False N/A N/A 
        Parse the root directory listing for the repo and return the URL
        to any file that looks like a readme

        :param user_repo:
            The user/repo string

        :param branch:
            The branch to fetch the readme from

        :param prefer_cached:
            If a cached directory listing should be used instead of a new HTTP request

        :raises:
            DownloaderException: when there is an error downloading
            ClientException: when there is an error parsing the response

        :return:
            The URL to the readme file, or None
         N/A listing_url N/A N/A self _make_api_url user_repo N/A /src/%s/ branch N/A root_dir_info N/A N/A self fetch_json listing_url prefer_cached N/A entry N/A root_dir_info N/A files N/A N/A N/A N/A N/A N/A entry N/A path lower _readme_filenames N/A N/A N/A https://bitbucket.org/%s/raw/%s/%s N/A user_repo branch N/A entry N/A path N/A None N/A _user_repo_branch N/A N/A self url N/A N/A N/A 
        Extract the username/repo and branch name from the URL

        :param url:
            The URL to extract the info from, in one of the forms:
              https://bitbucket.org/{user}/{repo}
              https://bitbucket.org/{user}/{repo}/src/{branch}

        :raises:
            DownloaderException: when there is an error downloading
            ClientException: when there is an error parsing the response

        :return:
            A tuple of (user/repo, branch name) or (None, None) if not matching
         N/A repo_match N/A N/A re match https?://bitbucket.org/([^/]+/[^/]+)/?$ url N/A branch_match N/A N/A re match https?://bitbucket.org/([^/]+/[^/]+)/src/([^/]+)/?$ url N/A repo_match N/A N/A user_repo N/A N/A repo_match group 1 N/A branch N/A N/A self _main_branch_name user_repo N/A N/A branch_match N/A N/A user_repo N/A N/A branch_match group 1 N/A branch N/A N/A branch_match group 2 N/A N/A N/A None None N/A N/A user_repo branch N/A N/A