Google Documents
Work with Google Documents simply without any boring stuff regarding Credentials Account etc.
Find the file in 2 lines:
>from google_documents.entities import GoogleDriveFile
>GoogleDriveFile.filter(name="Foo")
[<GoogleDriveFile: FILE_ID - Foo file>]
Read from the Google Sheet just in 3 lines:
>from google_documents.entities import GoogleDriveSpreadsheet
>sh = GoogleDriveSpreadsheet.get(id="YOUR_SPREADSHEET_ID")
>sh.read(range_name="Sheet 1!A1:B4")
[['Your', 'Awesome'], ['Data'], ['.']]
># Or using indexers
>sh["Sheet 1!A1:B4"]
[['Your', 'Awesome'], ['Data'], ['.']]
Export Google Document to word in 3 lines as well:
>from google_documents.entities import GoogleDriveDocument
>doc = GoogleDriveDocument.get(id="YOUR_DOCUMENT_ID")
>doc.export("my_file.docx")
Installation
- Install the module via pip:
pip install google-documents
-
Issue service account file via Google Cloud Console
-
Put the path to your file in the GOOGLE_DOCUMENT_SERVICE_JSON environment varialbe:
export GOOGLE_DOCUMENT_SERVICE_JSON=PATH_TO_YOUR_SERVICE_ACCOUNT_FILE
That's it. Now you can start using this package
Metadata
Release files for google-documents 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| google_documents-0.0.8.tar.gz | 9.3 kB | Without provenance | Details for google_documents-0.0.8.tar.gz |
Release files / google_documents-0.0.8.tar.gz
| Download URL | google_documents-0.0.8.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fa8d8535f7451698033950a005eb98f811c5662b47664f79418d98ee77f099b
|
|
BLAKE2b-256 checksum How to use checksums |
bdf37512b4fd287e5ab1c5b3e99599efeab4195048fb2fc5260265426a3c2408
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1
|
Security for google-documents 0.0.8
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.