Lightweight python package for downloading Google Docs documents in various formats.
Project description
📄 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gdoc_dumper-0.2.2.tar.gz
(18.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gdoc_dumper-0.2.2.tar.gz.
File metadata
- Download URL: gdoc_dumper-0.2.2.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f4ab2e4a29e27ee9e8605424d03e1a079e3b57e174ac9975e8a8f50e8bb5696
|
|
| MD5 |
804818db701622ad6cf8a3f4e5c036ee
|
|
| BLAKE2b-256 |
c41f86896cb533b78842a4dfd08a4197cc4d71882a90de9ae2f83df4a3455137
|
File details
Details for the file gdoc_dumper-0.2.2-py3-none-any.whl.
File metadata
- Download URL: gdoc_dumper-0.2.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bad269136f4258b1a25322f58e220af64b53c5c76f2ba7eafe4bce4e77500aa8
|
|
| MD5 |
c67c7765841461ddacf1642eb01e4e11
|
|
| BLAKE2b-256 |
700a7ec94c059e9c7f4e92786f44bbf85dc5880244469b013adc0afce0eccb55
|