Skip to main content

📄 gdoc-dumper

Lightweight python package for downloading Google Docs documents in various formats

🚀 Installation

Simply install with pip or another package manager:

pip install gdoc-dumper

🔨 Usage

🅰 Async

import asyncio

from gdoc_dumper import Downloader, Formats, FileManager

# Asynchronously download google document as bytes
async def main() -> None:
    content: bytes = await Downloader.adownload(url="<GDOC URL>", file_format=Formats.PDF)
    # You also can save file after downloading it using FileManager
    await FileManager.asave_bytes(content, path="<DESIRED PATH as PATH or String>")

asyncio.run(main())

You also can stream download file and save it

import asyncio
from typing import AsyncGenerator

from gdoc_dumper import Downloader, Formats, FileManager


async def main() -> None:
    stream: AsyncGenerator[bytes, None] = Downloader.astream_download(
        url="<GDOC URL>",
        file_format=Formats.PDF,
    )
    await FileManager.asave_stream(stream, path="file.pdf")


asyncio.run(main())

🔁 Sync

from gdoc_dumper import Downloader, Formats, FileManager

# Download google document as bytes
content: bytes = Downloader.download(url="<GDOC URL>", file_format=Formats.PDF)

# You also can save file after downloading it using FileManager
path = FileManager.save_bytes(content, path="<DESIRED PATH as PATH or String>")

✅ Available formats

from gdoc_dumper import Formats

print(Formats.TXT.value) # txt
print(Formats.PDF.value) # pdf
print(Formats.DOCX.value) # docx
print(Formats.EPUB.value) # epub
print(Formats.HTML.value) # html
print(Formats.OPEN_DOCUMENT_TEXT.value) # odt
print(Formats.RICH_TEXT.value) # rtf
print(Formats.ZIP.value) # zip

⭐ License

MIT License

Metadata

Release files for gdoc-dumper 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gdoc-dumper 0.3.0
File Size Uploaded Provenance Actions
gdoc_dumper-0.3.0.tar.gz 3.8 kB Without provenance Details for gdoc_dumper-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gdoc-dumper 0.3.0
File Interpreter ABI Platform Actions
gdoc_dumper-0.3.0-py3-none-any.whl Python 3 none any Details for gdoc_dumper-0.3.0-py3-none-any.whl

Total release size: 9.7 kB

Release files / gdoc_dumper-0.3.0.tar.gz

Download URL gdoc_dumper-0.3.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f8567f1e56648116dc7fcc1f0bc795e95bf286e3610efa7b9f5d4de528663373
BLAKE2b-256 checksum
How to use checksums
3b243bdc6346c4c02d1a3aaf554a987cab9d2b72f62ba08fe1e4836ea0775eea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Release files / gdoc_dumper-0.3.0-py3-none-any.whl

Download URL gdoc_dumper-0.3.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb92252e46937c914ad1bf1ab4ba2d930a8e96733079c9a0cb588a58846b6235
BLAKE2b-256 checksum
How to use checksums
46b3cce0ce71470b39995ae7228d36b5daaa91047d1085d3aff3282f55eee8db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Security for gdoc-dumper 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page