Metadata-Version: 2.1
Name: csv-export-gsheets
Version: 0.0.10
Summary: Export CSV files to Google Spreadsheets
Home-page: https://github.com/dlancer/csv-export-gsheets
Author: dlancer
Author-email: dmdpost@gmail.com
Maintainer: dlancer
Maintainer-email: dmdpost@gmail.com
License: BSD
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.6
Requires-Dist: certifi
Requires-Dist: chardet
Requires-Dist: gspread
Requires-Dist: httplib2
Requires-Dist: idna
Requires-Dist: oauth2client
Requires-Dist: pyasn1
Requires-Dist: pyasn1-modules
Requires-Dist: requests
Requires-Dist: rsa
Requires-Dist: six
Requires-Dist: urllib3
Provides-Extra: test
Requires-Dist: atomicwrites ; extra == 'test'
Requires-Dist: attrs ; extra == 'test'
Requires-Dist: coverage ; extra == 'test'
Requires-Dist: entrypoints ; extra == 'test'
Requires-Dist: flake8 ; extra == 'test'
Requires-Dist: isort ; extra == 'test'
Requires-Dist: mccabe ; extra == 'test'
Requires-Dist: more-itertools ; extra == 'test'
Requires-Dist: pluggy ; extra == 'test'
Requires-Dist: py ; extra == 'test'
Requires-Dist: pycodestyle ; extra == 'test'
Requires-Dist: pyflakes ; extra == 'test'
Requires-Dist: pygments ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: six ; extra == 'test'
Requires-Dist: v ; extra == 'test'

Import/Export CSV files to Google Spreadsheets
==============================================

Simple CSV import/export wrapper for gspread_ package.

.. _gspread: https://gspread.readthedocs.io.

.. image:: https://travis-ci.org/dlancer/csv-export-gsheets.svg?branch=master
    :target: https://travis-ci.org/dlancer/csv-export-gsheets/
    :alt: Build status

.. image:: https://img.shields.io/pypi/v/csv-export-gsheets.svg
    :target: https://pypi.python.org/pypi/csv-export-gsheets/
    :alt: Latest PyPI version

.. image:: https://img.shields.io/pypi/format/csv-export-gsheets.svg
    :target: https://pypi.python.org/pypi/csv-export-gsheets/
    :alt: Download format

.. image:: https://img.shields.io/pypi/l/csv-export-gsheets.svg
    :target: https://pypi.python.org/pypi/csv-export-gsheets/
    :alt: License

Installation
============


PIP
---

You can install the latest stable package running this command::

    $ pip install csv_export_gsheets


Also you can install the development version running this command::

    $ pip install git+http://github.com/dlancer/csv_export_gsheets.git@dev


Usage
=====

Before you start you should:

1. Create Google Service Account key (use JSON format):

   https://gspread.readthedocs.io/en/latest/oauth2.html

2. Create new spreadsheet in the Google Spreadsheets.

3. Share this spreadsheet with email from created service account file.

From command line::

    $ csv2gsheets --help


From python code:

.. code-block:: python

    from csv_export_gsheets.gsheet import import_csv

    # src - path to source CSV file or StringIO object
    # url - destination sheet url
    # cell - destination sheet cell (can include tab name: 'MyTab!A1')
    # credentials - path to service account credentials or dict
    # config - path to config file or dict
    import_csv(source=src, url=url, cell=cell, credentials=credentials, config=config)

..

Please note: destination sheet will be cleared before import.

TODO
====

- export from google spreadsheet to CSV


