Skip to main content

Objetivo

Lib para recuperar informações de planilhas do Google Spreadsheets através de API

Utilização

  1. Habilitar a API do Google Spreadsheets no console do GCP > APIs & Services > Libraries > Google Sheets API > Enable

  2. Criar uma key no console do GCP para autenticação na API através de IAM & Admin > Service Accounts > Create Key 2.1. Baixar o arquivo no formato JSON e armazenar em uma das pastas do projeto

  3. Instanciar a classe Sheets, informando 2 parâmetros:

    keyPath: Caminho e nome do arquivo que contém a chave de acesso para a API do Google Sheets Exemplo: 'credentials/project-0456d0f0cd6a.json'

    spreadsheetId: Id da planilha que será consultada Exemplo: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms'

  4. Executar o método getRangeData, passando como parâmetro o range de células que deseja recuperar.

    Exemplo: res = getRangeData('Class Data!A2:E')

Requisitos

Instalar as libs abaixo:

pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib pip install oauth2client

Manutenção

Após executar o clone deste código, executar o comando abaixo, para baixar todas as dependências:

make install

Release files for sdsheets 1.0.3

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

Source distribution (sdist)

Source distribution for sdsheets 1.0.3
File Size Uploaded
sdsheets-1.0.3.tar.gz 2.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sdsheets 1.0.3
File Interpreter ABI Platform
sdsheets-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 kB

Release files / sdsheets-1.0.3.tar.gz

Download URL sdsheets-1.0.3.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f3eca925c077bdd3a934766799a9d9d66d9c9fc461d31546e72c1032af69100c
BLAKE2b-256 checksum
How to use checksums
702cae1fea9e5d3997a7c3a06f5dc4228e165f9780141763c4cf92632fa8b45f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

Release files / sdsheets-1.0.3-py3-none-any.whl

Download URL sdsheets-1.0.3-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39b6d4eff61f8dd41630c004d5a0ffead48c22ba73ecf7312abb9298f8a814d2
BLAKE2b-256 checksum
How to use checksums
24234ea1519cb6f99dfc09e1aa3caad82a18eb13f92a74c7f5b7f0b8037fe9ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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