granicus_archiver.googledrive.types

class granicus_archiver.googledrive.types.FileId

A unique id for a file or directory in Drive

alias of str

class granicus_archiver.googledrive.types.DriveFileMeta[source]

Bases: TypedDict

Metadata for a Drive file or folder

name: str

The file or folder name

id: NotRequired[FileId]

The item id (not required for uploads)

mimeType: NotRequired[str]

Content type

parents: NotRequired[list[FileId]]

Parent folder(s)

size: NotRequired[str]

Size in bytes

Sharable link to the item

Download link

class granicus_archiver.googledrive.types.DriveFileMetaFull[source]

Bases: TypedDict

Similar to DriveFileMeta but with all fields required

name: str

The file or folder name

id: FileId

The item id

mimeType: str

Content type

parents: list[FileId]

Parent folder(s)

size: str

Size in bytes

Sharable link to the item

Download link

md5Checksum: MD5Hash

MD5 Checksum

sha1Checksum: SHA1Hash

SHA1 Checksum

sha256Checksum: SHA256Hash

SHA256 Checksum

class granicus_archiver.googledrive.types.FileUploadResponse[source]

Bases: TypedDict

Response type for a Drive upload

id: FileId

The file id

granicus_archiver.googledrive.types.FileListResponse

Response type for file lists as an asynchronous generator yielding FilePageResponse objects

alias of AsyncGenerator[FilePageResponse[T], None]

class granicus_archiver.googledrive.types.DriveResource(discovery_document, validate=False)[source]

Bases: GoogleAPI

Overload for aiogoogle.resource.GoogleAPI as a Drive resource

This wraps the response of aiogoogle.resource.GoogleAPI.discover() with api_name and api_version arguments set to ("drive", "v3")

files: DriveFiles

A DriveFiles resource

class granicus_archiver.googledrive.types.DriveFiles(name, resource_specs, global_parameters, schemas, root_url, service_path, batch_path, validate)[source]

Bases: Resource

Resource for Drive files

granicus_archiver.googledrive.types.FolderCache

Mapping of paths to FileId to aid in caching Drive folders

alias of dict[Path, FileId]