Skip to main content

Export data from Django tp Google Sheets

Project description

# Django-Sheets

Django-GSheets is a library to export data fron Django to Google Sheets

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install foobar.

`bash pip install django_sheets `

## Usage

Add GOOGLE_APPLICATION_CREDENTIALS_PATH key in setup.py

GOOGLE_APPLICATION_CREDENTIALS_PATH point to google credentials file, for more information of how to authenticate https://developers.google.com/identity/protocols/oauth2?hl https://developers.google.com/identity/protocols/oauth2/service-account

from django_sheets.gsheets import GoogleSheets

g = GoogleSheets()

#Name of spreadsheet g.create(f’{name}’) #Name of spreadsheet

# Fill spreadsheet with data g.update_values(data) # Fill spreadsheet with data

#Share to email user g.share(email)

data: must be a Queryset, a dictionary or a list

Queryset and dictionary create a row with titles name.

## License

MIT License

Copyright (c) 2024 Nicolas Candela Alvarez

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

django_gsheets_export-0.1.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file django_gsheets_export-0.1.tar.gz.

File metadata

  • Download URL: django_gsheets_export-0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for django_gsheets_export-0.1.tar.gz
Algorithm Hash digest
SHA256 d6a8d8abd8364ddba1f768048527d1b94429cc110859699451ed3cc791e4d75c
MD5 30305027479cbae9815d0c42ae7ebf1b
BLAKE2b-256 88c6d27add51f86411d7f4a2e321ac26cfc3d7a7f08f02ee0ee5e105bf82bd96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page