Skip to content

Instantly share code, notes, and snippets.

View haizaar's full-sized avatar
💭
Coding...

Zaar Hai haizaar

💭
Coding...
View GitHub Profile
@haizaar
haizaar / google_auth_utils.py
Last active July 29, 2022 21:23
Google Auth Utils for Directory API
import subprocess
import warnings
from typing import List, Optional
import google.auth
import google.auth.iam
import google.oauth2.credentials
import structlog
from google.auth.credentials import Credentials
from google.auth.transport import requests
@haizaar
haizaar / google-api-utils.py
Last active September 16, 2022 21:09
APIConnector for thread-safe google api python client
from __future__ import annotations
from dataclasses import dataclass, field
from typing import Any, Callable, Hashable, List, Optional
import google.auth
import httplib2
import structlog
from google_auth_httplib2 import AuthorizedHttp
from googleapiclient.http import HttpRequest