# google-auth 2.62.0 (Apache-2.0), harvested by tools/harvest_corpus.py
=== input
Service account credentials

    Usually, you'll create these credentials with one of the helper
    constructors. To create credentials using a Google service account
    private key JSON file::

        credentials = _service_account_async.Credentials.from_service_account_file(
            'service-account.json')

    Or if you already have the service account file loaded::

        service_account_info = json.load(open('service_account.json'))
        credentials = _service_account_async.Credentials.from_service_account_info(
            service_account_info)

    Both helper methods pass on arguments to the constructor, so you can
    specify additional scopes and a subject if necessary::

        credentials = _service_account_async.Credentials.from_service_account_file(
            'service-account.json',
            scopes=['email'],
            subject='user@example.com')

    The credentials are considered immutable. If you want to modify the scopes
    or the subject used for delegation, use :meth:`with_scopes` or
    :meth:`with_subject`::

        scoped_credentials = credentials.with_scopes(['email'])
        delegated_credentials = credentials.with_subject(subject)

    To add a quota project, use :meth:`with_quota_project`::

        credentials = credentials.with_quota_project('myproject-123')
    
=== parse google
short_description: 'Service account credentials'
long_description: |
  Usually, you'll create these credentials with one of the helper
  constructors. To create credentials using a Google service account
  private key JSON file::
  
      credentials = _service_account_async.Credentials.from_service_account_file(
          'service-account.json')
  
  Or if you already have the service account file loaded::
  
      service_account_info = json.load(open('service_account.json'))
      credentials = _service_account_async.Credentials.from_service_account_info(
          service_account_info)
  
  Both helper methods pass on arguments to the constructor, so you can
  specify additional scopes and a subject if necessary::
  
      credentials = _service_account_async.Credentials.from_service_account_file(
          'service-account.json',
          scopes=['email'],
          subject='user@example.com')
  
  The credentials are considered immutable. If you want to modify the scopes
  or the subject used for delegation, use :meth:`with_scopes` or
  :meth:`with_subject`::
  
      scoped_credentials = credentials.with_scopes(['email'])
      delegated_credentials = credentials.with_subject(subject)
  
  To add a quota project, use :meth:`with_quota_project`::
  
      credentials = credentials.with_quota_project('myproject-123')
blank_after_short_description: True
blank_after_long_description: False
style: google
=== detect
rest
=== compose google
Service account credentials

Usually, you'll create these credentials with one of the helper
constructors. To create credentials using a Google service account
private key JSON file::

    credentials = _service_account_async.Credentials.from_service_account_file(
        'service-account.json')

Or if you already have the service account file loaded::

    service_account_info = json.load(open('service_account.json'))
    credentials = _service_account_async.Credentials.from_service_account_info(
        service_account_info)

Both helper methods pass on arguments to the constructor, so you can
specify additional scopes and a subject if necessary::

    credentials = _service_account_async.Credentials.from_service_account_file(
        'service-account.json',
        scopes=['email'],
        subject='user@example.com')

The credentials are considered immutable. If you want to modify the scopes
or the subject used for delegation, use :meth:`with_scopes` or
:meth:`with_subject`::

    scoped_credentials = credentials.with_scopes(['email'])
    delegated_credentials = credentials.with_subject(subject)

To add a quota project, use :meth:`with_quota_project`::

    credentials = credentials.with_quota_project('myproject-123')
