diff --git a/.gitignore b/.gitignore index f7f177e..5373233 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ pydrive/test/credentials/* *.egg-info dist +build/ +.cache + +client_secrets.json diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..20ac893 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,27 @@ +Contributing guidelines +======================= + +How to become a contributor and submit your own code +---------------------------------------------------- + +Contributor License Agreements +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement (CLA). + +* If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an `individual CLA `_. +* If you work for a company that wants to allow you to contribute your + work, then you'll need to sign a `corporate CLA `_. + +Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests. + +***NOTE***: Only original source code from you and other people that have signed the CLA can be accepted into the main repository. + +Contributing code +~~~~~~~~~~~~~~~~~ + +If you have improvements to PyDrive, send us your pull requests! For those +just getting started, Github has a `howto `_. \ No newline at end of file diff --git a/README.rst b/README.rst index a13c3fd..b016782 100644 --- a/README.rst +++ b/README.rst @@ -8,8 +8,8 @@ that simplifies many common Google Drive API tasks. Project Info ------------ -- Homepage: `https://pypi.python.org/pypi/PyDrive `_ -- Documentation: `Official documentation on GitHub pages `_ +- Homepage: `https://pypi.python.org/pypi/PyDrive `_ +- Documentation: `Official documentation on GitHub pages `_ - Github: `https://github.com/googledrive/PyDrive `_ Features of PyDrive @@ -48,15 +48,15 @@ file *settings.yaml*. from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive - + gauth = GoogleAuth() gauth.LocalWebserverAuth() - + drive = GoogleDrive(gauth) File management made easy ------------------------- - + Upload/update the file with one method. PyDrive will do it in the most efficient way. diff --git a/TODO b/TODO new file mode 100644 index 0000000..e69de29 diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 7961847..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,216 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - -.PHONY: clean -clean: - rm -rf $(BUILDDIR)/* - -.PHONY: html -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -.PHONY: dirhtml -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -.PHONY: singlehtml -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -.PHONY: pickle -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -.PHONY: json -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -.PHONY: htmlhelp -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -.PHONY: qthelp -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PyDrive.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PyDrive.qhc" - -.PHONY: applehelp -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -.PHONY: devhelp -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/PyDrive" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PyDrive" - @echo "# devhelp" - -.PHONY: epub -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -.PHONY: latex -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -.PHONY: latexpdf -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: latexpdfja -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: text -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -.PHONY: man -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -.PHONY: texinfo -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -.PHONY: info -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -.PHONY: gettext -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -.PHONY: changes -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -.PHONY: linkcheck -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -.PHONY: doctest -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -.PHONY: coverage -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -.PHONY: xml -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -.PHONY: pseudoxml -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/docs/README b/docs/README index a2e6df4..b9f7325 100644 --- a/docs/README +++ b/docs/README @@ -1,8 +1,9 @@ This document outlines how to rebuild the documentation. General setup: -- Install Sphinx, `pip install sphinx` -- run `make html` in this folder, to update the documentation. +- Install Sphinx, `pip install sphinx` or `apt-get install python-sphinx` +- Install the theme used for the docs: `pip install sphinx_rtd_theme` +- Run `python setup.py build_sphinx --source-dir=docs/ --build-dir=docs/build --all-files` If code files were added, the easiest way to reflect code changes in the documentation by referencing the file from within pydrive.rst. diff --git a/docs/_build/doctrees/filemanagement.doctree b/docs/_build/doctrees/filemanagement.doctree deleted file mode 100644 index 972d69d..0000000 Binary files a/docs/_build/doctrees/filemanagement.doctree and /dev/null differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree deleted file mode 100644 index 5aadd03..0000000 Binary files a/docs/_build/doctrees/index.doctree and /dev/null differ diff --git a/docs/_build/doctrees/modules.doctree b/docs/_build/doctrees/modules.doctree deleted file mode 100644 index 323f1be..0000000 Binary files a/docs/_build/doctrees/modules.doctree and /dev/null differ diff --git a/docs/_build/doctrees/pydrive.doctree b/docs/_build/doctrees/pydrive.doctree deleted file mode 100644 index c8af434..0000000 Binary files a/docs/_build/doctrees/pydrive.doctree and /dev/null differ diff --git a/docs/_build/doctrees/pydrive.test.doctree b/docs/_build/doctrees/pydrive.test.doctree deleted file mode 100644 index 29be81f..0000000 Binary files a/docs/_build/doctrees/pydrive.test.doctree and /dev/null differ diff --git a/docs/_build/doctrees/setup.doctree b/docs/_build/doctrees/setup.doctree deleted file mode 100644 index 1b09aa4..0000000 Binary files a/docs/_build/doctrees/setup.doctree and /dev/null differ diff --git a/docs/_build/html/_sources/modules.txt b/docs/_build/html/_sources/modules.txt deleted file mode 100644 index 4b161a4..0000000 --- a/docs/_build/html/_sources/modules.txt +++ /dev/null @@ -1,7 +0,0 @@ -pydrive -======= - -.. toctree:: - :maxdepth: 4 - - pydrive diff --git a/docs/_build/html/_sources/pydrive.test.txt b/docs/_build/html/_sources/pydrive.test.txt deleted file mode 100644 index ca3b9c4..0000000 --- a/docs/_build/html/_sources/pydrive.test.txt +++ /dev/null @@ -1,62 +0,0 @@ -pydrive.test package -==================== - -Submodules ----------- - -pydrive.test.test_apiattr module --------------------------------- - -.. automodule:: pydrive.test.test_apiattr - :members: - :undoc-members: - :show-inheritance: - -pydrive.test.test_drive module ------------------------------- - -.. automodule:: pydrive.test.test_drive - :members: - :undoc-members: - :show-inheritance: - -pydrive.test.test_file module ------------------------------ - -.. automodule:: pydrive.test.test_file - :members: - :undoc-members: - :show-inheritance: - -pydrive.test.test_filelist module ---------------------------------- - -.. automodule:: pydrive.test.test_filelist - :members: - :undoc-members: - :show-inheritance: - -pydrive.test.test_oauth module ------------------------------- - -.. automodule:: pydrive.test.test_oauth - :members: - :undoc-members: - :show-inheritance: - -pydrive.test.test_util module ------------------------------ - -.. automodule:: pydrive.test.test_util - :members: - :undoc-members: - :show-inheritance: - - -Module contents ---------------- - -.. automodule:: pydrive.test - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/_build/html/_sources/setup.txt b/docs/_build/html/_sources/setup.txt deleted file mode 100644 index 31789b1..0000000 --- a/docs/_build/html/_sources/setup.txt +++ /dev/null @@ -1,7 +0,0 @@ -setup module -============ - -.. automodule:: setup - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/_build/html/_static/alabaster.css b/docs/_build/html/_static/alabaster.css deleted file mode 100644 index a88ce29..0000000 --- a/docs/_build/html/_static/alabaster.css +++ /dev/null @@ -1,693 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif; - font-size: 17px; - background-color: #fff; - color: #000; - margin: 0; - padding: 0; -} - - -div.document { - width: 940px; - margin: 30px auto 0 auto; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 220px; -} - -div.sphinxsidebar { - width: 220px; - font-size: 14px; - line-height: 1.5; -} - -hr { - border: 1px solid #B1B4B6; -} - -div.body { - background-color: #fff; - color: #3E4349; - padding: 0 30px 0 30px; -} - -div.body > .section { - text-align: left; -} - -div.footer { - width: 940px; - margin: 20px auto 30px auto; - font-size: 14px; - color: #888; - text-align: right; -} - -div.footer a { - color: #888; -} - -p.caption { - font-family: inherit; - font-size: inherit; -} - - -div.relations { - display: none; -} - - -div.sphinxsidebar a { - color: #444; - text-decoration: none; - border-bottom: 1px dotted #999; -} - -div.sphinxsidebar a:hover { - border-bottom: 1px solid #999; -} - -div.sphinxsidebarwrapper { - padding: 18px 10px; -} - -div.sphinxsidebarwrapper p.logo { - padding: 0; - margin: -10px 0 0 0px; - text-align: center; -} - -div.sphinxsidebarwrapper h1.logo { - margin-top: -10px; - text-align: center; - margin-bottom: 5px; - text-align: left; -} - -div.sphinxsidebarwrapper h1.logo-name { - margin-top: 0px; -} - -div.sphinxsidebarwrapper p.blurb { - margin-top: 0; - font-style: normal; -} - -div.sphinxsidebar h3, -div.sphinxsidebar h4 { - font-family: 'Garamond', 'Georgia', serif; - color: #444; - font-size: 24px; - font-weight: normal; - margin: 0 0 5px 0; - padding: 0; -} - -div.sphinxsidebar h4 { - font-size: 20px; -} - -div.sphinxsidebar h3 a { - color: #444; -} - -div.sphinxsidebar p.logo a, -div.sphinxsidebar h3 a, -div.sphinxsidebar p.logo a:hover, -div.sphinxsidebar h3 a:hover { - border: none; -} - -div.sphinxsidebar p { - color: #555; - margin: 10px 0; -} - -div.sphinxsidebar ul { - margin: 10px 0; - padding: 0; - color: #000; -} - -div.sphinxsidebar ul li.toctree-l1 > a { - font-size: 120%; -} - -div.sphinxsidebar ul li.toctree-l2 > a { - font-size: 110%; -} - -div.sphinxsidebar input { - border: 1px solid #CCC; - font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif; - font-size: 1em; -} - -div.sphinxsidebar hr { - border: none; - height: 1px; - color: #AAA; - background: #AAA; - - text-align: left; - margin-left: 0; - width: 50%; -} - -/* -- body styles ----------------------------------------------------------- */ - -a { - color: #004B6B; - text-decoration: underline; -} - -a:hover { - color: #6D4100; - text-decoration: underline; -} - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - margin: 30px 0px 10px 0px; - padding: 0; -} - -div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } -div.body h2 { font-size: 180%; } -div.body h3 { font-size: 150%; } -div.body h4 { font-size: 130%; } -div.body h5 { font-size: 100%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #DDD; - padding: 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - color: #444; - background: #EAEAEA; -} - -div.body p, div.body dd, div.body li { - line-height: 1.4em; -} - -div.admonition { - margin: 20px 0px; - padding: 10px 30px; - background-color: #EEE; - border: 1px solid #CCC; -} - -div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { - background-color: ; - border-bottom: 1px solid #fafafa; -} - -dd div.admonition { - margin-left: -60px; - padding-left: 60px; -} - -div.admonition p.admonition-title { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - font-size: 24px; - margin: 0 0 10px 0; - padding: 0; - line-height: 1; -} - -div.admonition p.last { - margin-bottom: 0; -} - -div.highlight { - background-color: #fff; -} - -dt:target, .highlight { - background: #FAF3E8; -} - -div.warning { - background-color: #FCC; - border: 1px solid #FAA; -} - -div.danger { - background-color: #FCC; - border: 1px solid #FAA; - -moz-box-shadow: 2px 2px 4px #D52C2C; - -webkit-box-shadow: 2px 2px 4px #D52C2C; - box-shadow: 2px 2px 4px #D52C2C; -} - -div.error { - background-color: #FCC; - border: 1px solid #FAA; - -moz-box-shadow: 2px 2px 4px #D52C2C; - -webkit-box-shadow: 2px 2px 4px #D52C2C; - box-shadow: 2px 2px 4px #D52C2C; -} - -div.caution { - background-color: #FCC; - border: 1px solid #FAA; -} - -div.attention { - background-color: #FCC; - border: 1px solid #FAA; -} - -div.important { - background-color: #EEE; - border: 1px solid #CCC; -} - -div.note { - background-color: #EEE; - border: 1px solid #CCC; -} - -div.tip { - background-color: #EEE; - border: 1px solid #CCC; -} - -div.hint { - background-color: #EEE; - border: 1px solid #CCC; -} - -div.seealso { - background-color: #EEE; - border: 1px solid #CCC; -} - -div.topic { - background-color: #EEE; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre, tt, code { - font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 0.9em; -} - -.hll { - background-color: #FFC; - margin: 0 -12px; - padding: 0 12px; - display: block; -} - -img.screenshot { -} - -tt.descname, tt.descclassname, code.descname, code.descclassname { - font-size: 0.95em; -} - -tt.descname, code.descname { - padding-right: 0.08em; -} - -img.screenshot { - -moz-box-shadow: 2px 2px 4px #EEE; - -webkit-box-shadow: 2px 2px 4px #EEE; - box-shadow: 2px 2px 4px #EEE; -} - -table.docutils { - border: 1px solid #888; - -moz-box-shadow: 2px 2px 4px #EEE; - -webkit-box-shadow: 2px 2px 4px #EEE; - box-shadow: 2px 2px 4px #EEE; -} - -table.docutils td, table.docutils th { - border: 1px solid #888; - padding: 0.25em 0.7em; -} - -table.field-list, table.footnote { - border: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -table.footnote { - margin: 15px 0; - width: 100%; - border: 1px solid #EEE; - background: #FDFDFD; - font-size: 0.9em; -} - -table.footnote + table.footnote { - margin-top: -15px; - border-top: none; -} - -table.field-list th { - padding: 0 0.8em 0 0; -} - -table.field-list td { - padding: 0; -} - -table.field-list p { - margin-bottom: 0.8em; -} - -table.footnote td.label { - width: .1px; - padding: 0.3em 0 0.3em 0.5em; -} - -table.footnote td { - padding: 0.3em 0.5em; -} - -dl { - margin: 0; - padding: 0; -} - -dl dd { - margin-left: 30px; -} - -blockquote { - margin: 0 0 0 30px; - padding: 0; -} - -ul, ol { - /* Matches the 30px from the narrow-screen "li > ul" selector below */ - margin: 10px 0 10px 30px; - padding: 0; -} - -pre { - background: #EEE; - padding: 7px 30px; - margin: 15px 0px; - line-height: 1.3em; -} - -div.viewcode-block:target { - background: #ffd; -} - -dl pre, blockquote pre, li pre { - margin-left: 0; - padding-left: 30px; -} - -dl dl pre { - margin-left: -90px; - padding-left: 90px; -} - -tt, code { - background-color: #ecf0f3; - color: #222; - /* padding: 1px 2px; */ -} - -tt.xref, code.xref, a tt { - background-color: #FBFBFB; - border-bottom: 1px solid #fff; -} - -a.reference { - text-decoration: none; - border-bottom: 1px dotted #004B6B; -} - -/* Don't put an underline on images */ -a.image-reference, a.image-reference:hover { - border-bottom: none; -} - -a.reference:hover { - border-bottom: 1px solid #6D4100; -} - -a.footnote-reference { - text-decoration: none; - font-size: 0.7em; - vertical-align: top; - border-bottom: 1px dotted #004B6B; -} - -a.footnote-reference:hover { - border-bottom: 1px solid #6D4100; -} - -a:hover tt, a:hover code { - background: #EEE; -} - - -@media screen and (max-width: 870px) { - - div.sphinxsidebar { - display: none; - } - - div.document { - width: 100%; - - } - - div.documentwrapper { - margin-left: 0; - margin-top: 0; - margin-right: 0; - margin-bottom: 0; - } - - div.bodywrapper { - margin-top: 0; - margin-right: 0; - margin-bottom: 0; - margin-left: 0; - } - - ul { - margin-left: 0; - } - - li > ul { - /* Matches the 30px from the "ul, ol" selector above */ - margin-left: 30px; - } - - .document { - width: auto; - } - - .footer { - width: auto; - } - - .bodywrapper { - margin: 0; - } - - .footer { - width: auto; - } - - .github { - display: none; - } - - - -} - - - -@media screen and (max-width: 875px) { - - body { - margin: 0; - padding: 20px 30px; - } - - div.documentwrapper { - float: none; - background: #fff; - } - - div.sphinxsidebar { - display: block; - float: none; - width: 102.5%; - margin: 50px -30px -20px -30px; - padding: 10px 20px; - background: #333; - color: #FFF; - } - - div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, - div.sphinxsidebar h3 a { - color: #fff; - } - - div.sphinxsidebar a { - color: #AAA; - } - - div.sphinxsidebar p.logo { - display: none; - } - - div.document { - width: 100%; - margin: 0; - } - - div.footer { - display: none; - } - - div.bodywrapper { - margin: 0; - } - - div.body { - min-height: 0; - padding: 0; - } - - .rtd_doc_footer { - display: none; - } - - .document { - width: auto; - } - - .footer { - width: auto; - } - - .footer { - width: auto; - } - - .github { - display: none; - } -} - - -/* misc. */ - -.revsys-inline { - display: none!important; -} - -/* Make nested-list/multi-paragraph items look better in Releases changelog - * pages. Without this, docutils' magical list fuckery causes inconsistent - * formatting between different release sub-lists. - */ -div#changelog > div.section > ul > li > p:only-child { - margin-bottom: 0; -} - -/* Hide fugly table cell borders in ..bibliography:: directive output */ -table.docutils.citation, table.docutils.citation td, table.docutils.citation th { - border: none; - /* Below needed in some edge cases; if not applied, bottom shadows appear */ - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} \ No newline at end of file diff --git a/docs/_build/html/_static/custom.css b/docs/_build/html/_static/custom.css deleted file mode 100644 index 2a924f1..0000000 --- a/docs/_build/html/_static/custom.css +++ /dev/null @@ -1 +0,0 @@ -/* This file intentionally left blank. */ diff --git a/docs/_build/html/modules.html b/docs/_build/html/modules.html deleted file mode 100644 index 305240a..0000000 --- a/docs/_build/html/modules.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - pydrive — PyDrive 1.1.1 documentation - - - - - - - - - - - - - - - - - - -
- - -
-
- - - - - - - \ No newline at end of file diff --git a/docs/_build/html/pydrive.test.html b/docs/_build/html/pydrive.test.html deleted file mode 100644 index 3aed94c..0000000 --- a/docs/_build/html/pydrive.test.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - - - pydrive.test package — PyDrive 1.1.1 documentation - - - - - - - - - - - - - - - - -
-
-
-
- -
-

pydrive.test package

-
-

Submodules

-
-
-

pydrive.test.test_apiattr module

-
-
-class pydrive.test.test_apiattr.ApiAttributeTest(methodName='runTest')
-

Bases: unittest.case.TestCase

-

Test ApiAttr functions.

-
-
-first_file = 'a.png'
-
- -
-
-ga = <pydrive.auth.GoogleAuth object>
-
- -
-
-second_file = 'b.png'
-
- -
-
-setUp()
-
- -
-
-tearDown()
-
- -
-
-test_UpdateMetadataNotInfinitelyNesting()
-
- -
- -
-
-

pydrive.test.test_drive module

-
-
-

pydrive.test.test_file module

-
-
-class pydrive.test.test_file.GoogleDriveFileTest(methodName='runTest')
-

Bases: unittest.case.TestCase

-

Tests basic file operations of files.GoogleDriveFile. -Mainly upload and download of contents and metadata. -Equivalent to Files.insert, Files.update, Files.patch in Google Drive API.

-
-
-DeleteOldFile(file_name)
-
- -
-
-DeleteUploadedFiles(drive, ids)
-
- -
-
-class UploadWorker(gdrive_file, generate_http=False)
-
-
-run()
-
- -
- -
-
-GoogleDriveFileTest.first_file = 'a.png'
-
- -
-
-GoogleDriveFileTest.ga = <pydrive.auth.GoogleAuth object>
-
- -
-
-GoogleDriveFileTest.second_file = 'b.png'
-
- -
-
-GoogleDriveFileTest.test_01_Files_Insert()
-
- -
-
-GoogleDriveFileTest.test_02_Files_Insert_Unicode()
-
- -
-
-GoogleDriveFileTest.test_03_Files_Insert_Content_String()
-
- -
-
-GoogleDriveFileTest.test_04_Files_Insert_Content_Unicode_String()
-
- -
-
-GoogleDriveFileTest.test_05_Files_Insert_Content_File()
-
- -
-
-GoogleDriveFileTest.test_06_Files_Patch()
-
- -
-
-GoogleDriveFileTest.test_07_Files_Patch_Skipping_Content()
-
- -
-
-GoogleDriveFileTest.test_08_Files_Update_String()
-
- -
-
-GoogleDriveFileTest.test_09_Files_Update_File()
-
- -
-
-GoogleDriveFileTest.test_Files_Create_Parameter_UserPermission()
-
- -
-
-GoogleDriveFileTest.test_Files_Delete_File()
-
- -
-
-GoogleDriveFileTest.test_Files_Delete_File_Just_ID()
-
- -
-
-GoogleDriveFileTest.test_Files_Trash_File()
-
- -
-
-GoogleDriveFileTest.test_Files_Trash_File_Just_ID()
-
- -
-
-GoogleDriveFileTest.test_Files_UnTrash_File()
-
- -
-
-GoogleDriveFileTest.test_Files_UnTrash_File_Just_ID()
-
- -
-
-GoogleDriveFileTest.test_Parallel_Files_Insert_File_Auto_Generated_HTTP(*args, **kwargs)
-
- -
-
-GoogleDriveFileTest.test_Parallel_Insert_File_Passed_HTTP(*args, **kwargs)
-
- -
- -
-
-

pydrive.test.test_filelist module

-
-
-class pydrive.test.test_filelist.GoogleDriveFileListTest(methodName='runTest')
-

Bases: unittest.case.TestCase

-

Tests operations of files.GoogleDriveFileList class. -Equivalent to Files.list in Google Drive API.

-
-
-DeleteOldFile(file_name)
-
- -
-
-assertFileInFileList(file_object)
-
- -
-
-drive = <pydrive.drive.GoogleDrive object>
-
- -
-
-ga = <pydrive.auth.GoogleAuth object>
-
- -
-
-setUp()
-
- -
-
-tearDown()
-
- -
-
-test_01_Files_List_GetList()
-
- -
-
-test_02_Files_List_ForLoop()
-
- -
-
-test_03_Files_List_GetList_Iterate()
-
- -
-
-test_File_List_Folders()
-
- -
- -
-
-

pydrive.test.test_oauth module

-
-
-class pydrive.test.test_oauth.GoogleAuthTest(methodName='runTest')
-

Bases: unittest.case.TestCase

-

Tests basic OAuth2 operations of auth.GoogleAuth.

-
-
-CheckCredentialsFile(credentials, no_file=False)
-
- -
-
-DeleteOldCredentialsFile(credentials)
-
- -
-
-test_01_LocalWebserverAuthWithClientConfigFromFile()
-
- -
-
-test_02_LocalWebserverAuthWithClientConfigFromSettings()
-
- -
-
-test_03_LocalWebServerAuthWithNoCredentialsSaving()
-
- -
-
-test_04_CommandLineAuthWithClientConfigFromFile()
-
- -
-
-test_05_ConfigFromSettingsWithoutOauthScope()
-
- -
- -
-
-

pydrive.test.test_util module

-
-
-pydrive.test.test_util.CreateRandomFileName()
-
- -
-
-

Module contents

-
-
- - -
-
-
- -
-
- - - - - - - \ No newline at end of file diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js deleted file mode 100644 index fc0018a..0000000 --- a/docs/_build/html/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({envversion:49,filenames:["filelist","filemanagement","index","oauth","pydrive","quickstart"],objects:{"pydrive.apiattr":{ApiAttribute:[4,1,1,""],ApiAttributeMixin:[4,1,1,""],ApiResource:[4,1,1,""],ApiResourceList:[4,1,1,""]},"pydrive.apiattr.ApiResource":{GetChanges:[4,2,1,""],UpdateMetadata:[4,2,1,""],auth:[4,3,1,""],update:[4,2,1,""]},"pydrive.apiattr.ApiResourceList":{GetList:[4,2,1,""],Reset:[4,2,1,""],metadata:[4,3,1,""]},"pydrive.auth":{AuthError:[4,4,1,""],AuthenticationError:[4,4,1,""],AuthenticationRejected:[4,4,1,""],CheckAuth:[4,5,1,""],CheckServiceAuth:[4,5,1,""],GoogleAuth:[4,1,1,""],InvalidCredentialsError:[4,4,1,""],LoadAuth:[4,5,1,""],RefreshError:[4,4,1,""]},"pydrive.auth.GoogleAuth":{Auth:[4,2,1,""],Authenticate:[4,2,1,""],Authorize:[4,2,1,""],CLIENT_CONFIGS_LIST:[4,3,1,""],CommandLineAuth:[4,2,1,""],DEFAULT_SETTINGS:[4,3,1,""],GetAuthUrl:[4,2,1,""],GetFlow:[4,2,1,""],Get_Http_Object:[4,2,1,""],LoadClientConfig:[4,2,1,""],LoadClientConfigFile:[4,2,1,""],LoadClientConfigSettings:[4,2,1,""],LoadCredentials:[4,2,1,""],LoadCredentialsFile:[4,2,1,""],LoadServiceConfigSettings:[4,2,1,""],LocalWebserverAuth:[4,2,1,""],Refresh:[4,2,1,""],SERVICE_CONFIGS_LIST:[4,3,1,""],SaveCredentials:[4,2,1,""],SaveCredentialsFile:[4,2,1,""],ServiceAuth:[4,2,1,""],access_token_expired:[4,3,1,""],auth_method:[4,3,1,""],client_config:[4,3,1,""],credentials:[4,3,1,""],flow:[4,3,1,""],http:[4,3,1,""],service:[4,3,1,""],settings:[4,3,1,""]},"pydrive.drive":{GoogleDrive:[4,1,1,""]},"pydrive.drive.GoogleDrive":{CreateFile:[4,2,1,""],GetAbout:[4,2,1,""],ListFile:[4,2,1,""]},"pydrive.files":{ApiRequestError:[4,4,1,""],FileNotDownloadableError:[4,4,1,""],FileNotUploadedError:[4,4,1,""],GoogleDriveFile:[4,1,1,""],GoogleDriveFileList:[4,1,1,""],LoadMetadata:[4,5,1,""]},"pydrive.files.GoogleDriveFile":{Delete:[4,2,1,""],DeletePermission:[4,2,1,""],FetchContent:[4,2,1,""],FetchMetadata:[4,2,1,""],GetContentFile:[4,2,1,""],GetContentString:[4,2,1,""],GetPermissions:[4,2,1,""],InsertPermission:[4,2,1,""],SetContentFile:[4,2,1,""],SetContentString:[4,2,1,""],Trash:[4,2,1,""],UnTrash:[4,2,1,""],Upload:[4,2,1,""],content:[4,3,1,""],metadata:[4,3,1,""],uploaded:[4,3,1,""]},"pydrive.settings":{InvalidConfigError:[4,4,1,""],LoadSettingsFile:[4,5,1,""],SettingsError:[4,4,1,""],ValidateSettings:[4,5,1,""]},pydrive:{apiattr:[4,0,0,"-"],auth:[4,0,0,"-"],drive:[4,0,0,"-"],files:[4,0,0,"-"],settings:[4,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","attribute","Python attribute"],"4":["py","exception","Python exception"],"5":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:attribute","4":"py:exception","5":"py:function"},terms:{"abstract":4,"byte":[],"case":[1,3],"class":4,"default":[3,4],"function":[1,4],"import":[0,1,3,5],"long":5,"return":4,"super":4,"true":[0,1,3,4],"try":4,"while":[3,4],about:[1,4],abov:[0,1],accept:5,access:[1,3,4],access_token:4,access_token_expir:4,accord:4,account:[3,4],actual:1,add:5,addit:4,addition:4,advanc:1,afshar:1,after:[1,4],again:5,allow:1,along:3,alreadi:1,also:[1,3],alternatelink:1,ani:[1,3,4],anyon:1,api:[0,1,2,3,4,5],apiattr:[],apiattribut:4,apiattributemixin:4,apirequesterror:4,apiresourc:4,apiresourcelist:4,app:3,appdata:1,applic:[1,3,4,5],applicat:5,appropri:5,arg:4,arrai:1,ask:[3,5],askusertovisitlinkandgivecod:3,auth:[],auth_method:4,auth_uri:[3,4],auth_url:3,authent:[],authenticationerror:4,authenticationreject:4,autherror:4,author:[3,4,5],auto:[0,3,5],automat:[],avail:[1,4],back:4,backend:[3,4],base:4,basic:1,behav:4,behavior:3,bool:[3,4],browser:5,build:[],built:3,bytesio:4,call:[0,1,3,4,5],can:[0,1,2,3,4,5],care:1,cat:1,catlov:1,chang:[1,4],check:[1,4],checkauth:4,checkserviceauth:4,choos:4,claudio:1,clean:[3,4],click:5,client:[2,3,4,5],client_config:[3,4],client_config_backend:[3,4],client_config_fil:[3,4],client_configs_list:4,client_id:[3,4],client_pkcs12_file_path:4,client_secret:[3,4,5],client_secret_:5,client_service_email:4,client_user_email:4,close:4,code:[0,1,3,4,5],com:[2,3,4],comma:4,command:[2,3,4],commandlin:4,commandlineauth:[3,4],common:[2,4],complex:[3,5],complic:3,config:4,configur:[3,4,5],consent:5,consist:1,consol:[3,4,5],contain:[3,4],content:[],continu:[0,1],copi:[4,5],correspond:4,creat:[],createfil:[1,4,5],credenti:[3,4,5],credentials_fil:4,current:4,custom:[],data:4,date:2,decod:4,decor:4,decorate:4,default_settings:4,deletepermiss:[1,4],describ:1,descriptor:4,destin:[3,4],detail:[3,4,5],dict:[0,1,3,4],dictionari:[3,4],did:1,differ:1,difficult:3,directori:[3,5],displai:1,document:[],doesn:4,don:[1,3,4],done:5,download_url:4,drive:[],each:[0,4],easier:5,effici:4,egg:2,either:1,element:4,email:4,empti:4,enabl:5,encod:4,endpoint:3,enter:5,entri:[4,5],equival:4,error:4,etc:[1,4],everi:4,exampl:3,except:4,exception:4,execut:5,exist:[3,4],expir:4,explain:3,fals:[0,3,4,5],familynam:1,fetch:[1,4],fetch_al:[1,4],fetchcont:4,fetchmetadata:[1,4],field:[1,3,4],file1:[0,1,5],file2:1,file4:1,file5:1,file6:1,file7:1,file_id:1,file_list:[0,5],file_object:1,filelist:4,filenam:[1,4],filenotdownloadableerror:4,filenotuploadederror:4,find:1,finish:5,firstnam:1,flow:[],folder:[0,5],follow:5,follw:3,format:[1,4],found:1,from:[],further:1,gauth:[0,1,3,5],gener:4,get_http_object:4,get_refresh_token:3,getabout:4,getauthurl:[3,4],getchang:4,getcontentfil:[1,4],getcontentstr:[1,4],getflow:4,getlist:[0,4,5],getpermiss:[1,4],git:2,github:2,give:1,given:[4,5],global:4,googl:[1,2,3,4,5],googleapi:[3,4],googleauth:[0,1,3,4,5],googledr:[0,1,2,4,5],googledrivefil:[0,1,4,5],googledrivefilelist:[0,4],googleusercont:3,grant:[3,4],guid:4,handl:[],hard:4,have:[0,1,3,4,5],hello:[1,5],helloworld:1,here:[1,3],hold:3,homepag:2,host:4,host_nam:4,howev:[1,3],http:[2,3,4,5],http_timeout:4,httplib2:4,ietf:3,illustr:1,imag:1,immedi:1,includ:[1,4],index:2,inform:[1,4,5],inherit:4,initi:[1,4],initial:1,input:5,insertpermiss:[1,4],instanc:[0,1,4,5],instruct:[3,5],integr:3,interfac:1,invalidconfigerror:4,invalidcredentialserror:4,ioerror:4,iterat:4,itself:[1,3],javascript:5,john:1,json:[1,3,4,5],just:[1,3],keep:1,kei:4,know:5,kwarg:4,label:[1,4],last:1,lastnam:1,left:5,len:0,let:5,librari:[2,4],life:5,like:[1,4],limit:0,line:[],link:1,listfil:[0,4,5],load:4,loadauth:4,loadclientconfig:4,loadclientconfigfil:4,loadclientconfigset:4,loadcredenti:4,loadcredentialsfil:4,loadmetadata:4,loadserviceconfigset:4,loadsettingsfil:4,local:[3,4,5],localhost:5,localwebserverauth:[3,4,5],look:[1,3,5],loop:0,lot:3,machin:3,mai:1,main:4,maintain:3,make:[1,3,4,5],mani:[1,2,5],manipul:1,manual:3,mark:4,max:0,maxresult:[0,4],menu:5,metadata:[],method:[1,3,4,5],might:[1,3],mimetyp:[1,4],mind:4,mixin:4,modifi:[1,4],modul:[],more:[1,3,5],most:[2,3,4],move:[1,4],much:5,name:[4,5],necessari:4,need:[0,3,5],new_permiss:4,none:[3,4],note:1,now:[1,3,5],number:[0,4],oauth2:[3,4,5],oauth2callback:3,oauth2client:4,oauth:[],oauth_scop:[3,4],object:[1,4],offici:[1,4],onc:4,once:5,onli:3,oob:3,open:[1,4,5],optim:[1,5],option:1,order:1,org:2,origin:5,otherwis:4,out:[1,4],overwritten:4,own:[],p12:4,packag:[],page:2,pagetoken:4,param:4,paramet:[0,1,4],parent:[0,5],pars:[0,5],past:5,path:[3,4],perform:4,perman:1,permission_id:[1,4],permit:1,pip:2,place:[3,5],plain:[1,4],pleas:4,png:1,port:4,port_numb:4,possibl:3,print:[0,1,4,5],privat:4,product:5,provid:[0,1,3,4],psdskoowr1p602pxrthi:3,pydriv:[],pypi:2,python:[0,2,4,5],pythonhost:2,quickstart:[],quota:4,rais:4,read:[1,3,4],readabl:1,reader:1,realli:5,receiv:[0,3],recommend:1,recov:1,redirect:[3,5],redirect_uri:[3,4],refresh:[3,4],refresherror:4,regular:2,reject:4,relat:4,remot:3,remove_bom:[],renam:5,replac:1,request:4,requir:[3,4,5],reset:4,resourc:[1,4],respons:[0,5],result:0,retriev:[0,1,3,4],revok:3,revoke_uri:[3,4],right:5,role:1,root:[0,5],rtype:4,run:5,runtimeerror:4,safeti:4,sampl:[],save:[3,4,5],save_credenti:[3,4],save_credentials_backend:3,save_credentials_fil:3,savecredenti:4,savecredentialsfil:4,scope:3,screen:5,search:[2,5],secret:3,section:3,see:[4,5],select:5,self:4,sent:4,separ:4,server:[3,4],servic:[3,4],service_configs_list:4,serviceauth:4,set:[],setcontentfil:[1,4],setcontentstr:[1,4,5],settings_fil:4,settingserror:4,setup:3,sharabl:1,share:1,shorthand:1,side:5,silent:3,simpl:3,simplifi:2,six:4,size:1,smith:1,some:[1,3],specif:[1,4],specifi:[0,4],standalon:4,start:3,step:[3,5],str:[3,4],string:[4,5],succe:4,successfulli:1,take:[3,5],target:4,task:2,text:[1,4],them:4,thi:[1,3,4,5],thread:4,time:1,titl:[0,1,4,5],token:[3,4],token_uri:[3,4],too:3,trash:[],tri:4,two:[],txt:[1,5],type:[1,4,5],untrash:[1,4],updat:[],updatemetadata:4,uri:[3,5],url:[3,4],urn:3,usag:4,user:[1,3,4],utf:4,valid:[3,4],validateset:4,valu:[1,3,4],variabl:4,version:2,view:1,visit:[3,4],wai:0,want:[1,3,4,5],web:[1,4,5],webserv:[3,5],websit:3,what:1,when:3,where:[3,4],whether:[1,4],who:1,work:[3,5],world:[1,5],would:4,wrapper:[2,4],write:4,www:[3,4],yaml:[],you:[0,1,2,3,4,5],your:[]},titles:["File listing made easy","File management made easy","Welcome to PyDrive’s documentation!","OAuth made easy","pydrive package","Quickstart"],titleterms:{"new":1,all:0,apiattr:4,auth:4,authent:[3,5],automat:3,build:3,content:[1,2],creat:5,custom:3,delet:1,document:2,download:1,drive:4,easi:[0,1,3],file:[0,1,4,5],flow:3,from:1,get:[0,5],handl:1,how:2,indice:2,info:2,insert:1,instal:2,iter:0,line:3,list:[0,1,5],made:[0,1,3],manag:1,match:0,metadata:1,modul:4,oauth:3,own:3,packag:4,pagin:0,permiss:1,project:2,pydriv:[2,4],queri:0,quickstart:5,remov:1,sampl:3,set:[3,4],special:1,tabl:2,through:0,trash:1,two:3,updat:[1,5],update:1,upload:1,welcom:2,which:0,yaml:3,your:3}}) \ No newline at end of file diff --git a/docs/_build/html/setup.html b/docs/_build/html/setup.html deleted file mode 100644 index 4b83872..0000000 --- a/docs/_build/html/setup.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - setup module — PyDrive 1.1.1 documentation - - - - - - - - - - - - - - - - -
-
-
-
- -
-

setup module

-
- - -
-
-
- -
-
- - - - - - - \ No newline at end of file diff --git a/docs/_build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle similarity index 61% rename from docs/_build/doctrees/environment.pickle rename to docs/build/doctrees/environment.pickle index 2277996..88afa55 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/filelist.doctree b/docs/build/doctrees/filelist.doctree similarity index 96% rename from docs/_build/doctrees/filelist.doctree rename to docs/build/doctrees/filelist.doctree index fc58a7d..036c41e 100644 Binary files a/docs/_build/doctrees/filelist.doctree and b/docs/build/doctrees/filelist.doctree differ diff --git a/docs/build/doctrees/filemanagement.doctree b/docs/build/doctrees/filemanagement.doctree new file mode 100644 index 0000000..751a743 Binary files /dev/null and b/docs/build/doctrees/filemanagement.doctree differ diff --git a/docs/build/doctrees/index.doctree b/docs/build/doctrees/index.doctree new file mode 100644 index 0000000..09264c9 Binary files /dev/null and b/docs/build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/oauth.doctree b/docs/build/doctrees/oauth.doctree similarity index 86% rename from docs/_build/doctrees/oauth.doctree rename to docs/build/doctrees/oauth.doctree index f8a90ac..0a5347b 100644 Binary files a/docs/_build/doctrees/oauth.doctree and b/docs/build/doctrees/oauth.doctree differ diff --git a/docs/build/doctrees/pydrive.doctree b/docs/build/doctrees/pydrive.doctree new file mode 100644 index 0000000..4fafa64 Binary files /dev/null and b/docs/build/doctrees/pydrive.doctree differ diff --git a/docs/_build/doctrees/quickstart.doctree b/docs/build/doctrees/quickstart.doctree similarity index 97% rename from docs/_build/doctrees/quickstart.doctree rename to docs/build/doctrees/quickstart.doctree index 2c55ec3..ef4b8e7 100644 Binary files a/docs/_build/doctrees/quickstart.doctree and b/docs/build/doctrees/quickstart.doctree differ diff --git a/docs/_build/html/.buildinfo b/docs/build/html/.buildinfo similarity index 65% rename from docs/_build/html/.buildinfo rename to docs/build/html/.buildinfo index 6695516..0885fbe 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: d7d056e061b972c3f17132d52909fda2 -tags: 645f666f9bcd5a90fca523b33c5a78b7 +config: +tags: diff --git a/docs/_build/html/_sources/filelist.txt b/docs/build/html/_sources/filelist.txt similarity index 100% rename from docs/_build/html/_sources/filelist.txt rename to docs/build/html/_sources/filelist.txt diff --git a/docs/_build/html/_sources/filemanagement.txt b/docs/build/html/_sources/filemanagement.txt similarity index 89% rename from docs/_build/html/_sources/filemanagement.txt rename to docs/build/html/_sources/filemanagement.txt index 5686b7b..68bbb74 100644 --- a/docs/_build/html/_sources/filemanagement.txt +++ b/docs/build/html/_sources/filemanagement.txt @@ -196,6 +196,18 @@ Sample code continues from `Download file metadata from file ID`_: print('title: %s, mimeType: %s' % (file5['title'], file5['mimeType'])) # title: cat.png, mimeType: image/png +**Advanced Users:** If you call SetContentFile and GetContentFile you can can +define which character encoding is to be used by using the optional +parameter `encoding`. + +If you, for example, are retrieving a file which is stored on your Google +Drive which is encoded with ISO-8859-1, then you can get the content string +like so: + +.. code-block:: python + + content_string = file4.GetContentString(encoding='ISO-8859-1') + Download file content --------------------- @@ -219,6 +231,15 @@ Sample code continues from above: file7.Upload() # Uploaded content: '{"firstname": "Claudio", "familyname": "Afshar"}' +**Advanced users**: Google Drive is `known`_ to add BOM (Byte Order Marks) to +the beginning of some files, such as Google Documents downloaded as text files. +In some cases confuses parsers and leads to corrupt files. +PyDrive can remove the BOM from the beginning of a file when it +is downloaded. Just set the `remove_bom` parameter in `GetContentString()` or +`GetContentFile()` - see `examples/strip_bom_example.py` in the GitHub +repository for an example. + + .. _`GoogleDriveFile`: ./pydrive.html#pydrive.files.GoogleDriveFile .. _`Upload()`: ./pydrive.html#pydrive.files.GoogleDriveFile.Upload .. _`GoogleAuth`: ./pydrive.html#pydrive.auth.GoogleAuth @@ -228,4 +249,5 @@ Sample code continues from above: .. _`SetContentString(content)`: ./pydrive.html#pydrive.files.GoogleDriveFile.SetContentString .. _`GetContentFile(filename)`: ./pydrive.html#pydrive.files.GoogleDriveFile.GetContentFile .. _`GetContentString()`: ./pydrive.html#pydrive.files.GoogleDriveFile.GetContentString -.. _`official documentation`: https://developers.google.com/drive/v2/reference/files#resource-representations \ No newline at end of file +.. _`official documentation`: https://developers.google.com/drive/v2/reference/files#resource-representations +.. _`known`: https://productforums.google.com/forum/#!topic/docs/BJLimQDGtjQ \ No newline at end of file diff --git a/docs/_build/html/_sources/index.txt b/docs/build/html/_sources/index.txt similarity index 80% rename from docs/_build/html/_sources/index.txt rename to docs/build/html/_sources/index.txt index 7a075b7..d758992 100644 --- a/docs/_build/html/_sources/index.txt +++ b/docs/build/html/_sources/index.txt @@ -12,9 +12,7 @@ Project Info ============ - Homepage: `https://pypi.python.org/pypi/PyDrive `_ -- Documentation: - - Version 1.0.0 (PyPI): `http://pythonhosted.org/PyDrive `_ - - Version 1.2.1: `GitHub pages `_ +- Documentation: `Official documentation on GitHub pages `_ - Github: `https://github.com/googledrive/PyDrive `_ How to install @@ -26,7 +24,7 @@ You can install PyDrive with regular ``pip`` command. $ pip install PyDrive -To install the most up-to-date version from GitHub, use: +To install the current development version from GitHub, use: :: diff --git a/docs/_build/html/_sources/oauth.txt b/docs/build/html/_sources/oauth.txt similarity index 93% rename from docs/_build/html/_sources/oauth.txt rename to docs/build/html/_sources/oauth.txt index 9136b76..4d5f7a3 100644 --- a/docs/_build/html/_sources/oauth.txt +++ b/docs/build/html/_sources/oauth.txt @@ -10,11 +10,19 @@ OAuth2.0 is complex and difficult to start with. To make it more simple, .. code-block:: python from pydrive.auth import GoogleAuth - + gauth = GoogleAuth() # Create local webserver and auto handles authentication. gauth.LocalWebserverAuth() + # Or use the CommandLineAuth(), which provides you with a link to paste + # into your browser. The site it leads to then provides you with an + # authentication token which you paste into the command line. + # Commented out as it is an alternative to the LocalWebserverAuth() above, + # and someone will just copy-paste the entire thing into their editor. + + # gauth.CommandLineAuth() + To make this code work, you need to download the application configurations file from APIs Console. Take a look at quickstart_ for detailed instructions. @@ -126,7 +134,7 @@ Here is a sample code for your customized authentication flow .. code-block:: python from pydrive.auth import GoogleAuth - + gauth = GoogleAuth() auth_url = gauth.GetAuthUrl() # Create authentication url user needs to visit code = AskUserToVisitLinkAndGiveCode(auth_url) # Your customized authentication flow diff --git a/docs/_build/html/_sources/pydrive.txt b/docs/build/html/_sources/pydrive.txt similarity index 100% rename from docs/_build/html/_sources/pydrive.txt rename to docs/build/html/_sources/pydrive.txt diff --git a/docs/_build/html/_sources/quickstart.txt b/docs/build/html/_sources/quickstart.txt similarity index 98% rename from docs/_build/html/_sources/quickstart.txt rename to docs/build/html/_sources/quickstart.txt index 511fa81..2cd8c78 100644 --- a/docs/_build/html/_sources/quickstart.txt +++ b/docs/build/html/_sources/quickstart.txt @@ -14,7 +14,7 @@ Drive API requires OAuth2.0 for authentication. *PyDrive* makes your life much e b. Enter an appropriate name. c. Input *http://localhost:8080* for 'Authorized JavaScript origins'. d. Input *http://localhost:8080/* for 'Authorized redirect URIs'. - e. Click 'Save'. + e. Click 'Create'. 5. Click 'Download JSON' on the right side of Client ID to download **client_secret_.json**. @@ -26,11 +26,11 @@ Create *quickstart.py* file and copy and paste the following code. .. code-block:: python from pydrive.auth import GoogleAuth - + gauth = GoogleAuth() gauth.LocalWebserverAuth() # Creates local webserver and auto handles authentication. -Run this code with *python quickstart.py* and you will see a web browser asking you for authentication. Click *Accept* and you are done with authentication. For more details, take a look at documentation: `OAuth made easy`_ +Run this code with *python quickstart.py* and you will see a web browser asking you for authentication. Click *Accept* and you are done with authentication. For more details, take a look at documentation: `OAuth made easy`_ .. _`APIs Console`: https://console.developers.google.com/iam-admin/projects .. _`OAuth made easy`: ./oauth.html diff --git a/docs/_build/html/_static/ajax-loader.gif b/docs/build/html/_static/ajax-loader.gif similarity index 100% rename from docs/_build/html/_static/ajax-loader.gif rename to docs/build/html/_static/ajax-loader.gif diff --git a/docs/_build/html/_static/basic.css b/docs/build/html/_static/basic.css similarity index 100% rename from docs/_build/html/_static/basic.css rename to docs/build/html/_static/basic.css diff --git a/docs/_build/html/_static/comment-bright.png b/docs/build/html/_static/comment-bright.png similarity index 100% rename from docs/_build/html/_static/comment-bright.png rename to docs/build/html/_static/comment-bright.png diff --git a/docs/_build/html/_static/comment-close.png b/docs/build/html/_static/comment-close.png similarity index 100% rename from docs/_build/html/_static/comment-close.png rename to docs/build/html/_static/comment-close.png diff --git a/docs/_build/html/_static/comment.png b/docs/build/html/_static/comment.png similarity index 100% rename from docs/_build/html/_static/comment.png rename to docs/build/html/_static/comment.png diff --git a/docs/_build/html/_static/css/badge_only.css b/docs/build/html/_static/css/badge_only.css similarity index 100% rename from docs/_build/html/_static/css/badge_only.css rename to docs/build/html/_static/css/badge_only.css diff --git a/docs/_build/html/_static/css/theme.css b/docs/build/html/_static/css/theme.css similarity index 100% rename from docs/_build/html/_static/css/theme.css rename to docs/build/html/_static/css/theme.css diff --git a/docs/_build/html/_static/doctools.js b/docs/build/html/_static/doctools.js similarity index 100% rename from docs/_build/html/_static/doctools.js rename to docs/build/html/_static/doctools.js diff --git a/docs/_build/html/_static/down-pressed.png b/docs/build/html/_static/down-pressed.png similarity index 100% rename from docs/_build/html/_static/down-pressed.png rename to docs/build/html/_static/down-pressed.png diff --git a/docs/_build/html/_static/down.png b/docs/build/html/_static/down.png similarity index 100% rename from docs/_build/html/_static/down.png rename to docs/build/html/_static/down.png diff --git a/docs/_build/html/_static/file.png b/docs/build/html/_static/file.png similarity index 100% rename from docs/_build/html/_static/file.png rename to docs/build/html/_static/file.png diff --git a/docs/_build/html/_static/fonts/Inconsolata-Bold.ttf b/docs/build/html/_static/fonts/Inconsolata-Bold.ttf similarity index 100% rename from docs/_build/html/_static/fonts/Inconsolata-Bold.ttf rename to docs/build/html/_static/fonts/Inconsolata-Bold.ttf diff --git a/docs/_build/html/_static/fonts/Inconsolata-Regular.ttf b/docs/build/html/_static/fonts/Inconsolata-Regular.ttf similarity index 100% rename from docs/_build/html/_static/fonts/Inconsolata-Regular.ttf rename to docs/build/html/_static/fonts/Inconsolata-Regular.ttf diff --git a/docs/_build/html/_static/fonts/Lato-Bold.ttf b/docs/build/html/_static/fonts/Lato-Bold.ttf similarity index 100% rename from docs/_build/html/_static/fonts/Lato-Bold.ttf rename to docs/build/html/_static/fonts/Lato-Bold.ttf diff --git a/docs/_build/html/_static/fonts/Lato-Regular.ttf b/docs/build/html/_static/fonts/Lato-Regular.ttf similarity index 100% rename from docs/_build/html/_static/fonts/Lato-Regular.ttf rename to docs/build/html/_static/fonts/Lato-Regular.ttf diff --git a/docs/_build/html/_static/fonts/RobotoSlab-Bold.ttf b/docs/build/html/_static/fonts/RobotoSlab-Bold.ttf similarity index 100% rename from docs/_build/html/_static/fonts/RobotoSlab-Bold.ttf rename to docs/build/html/_static/fonts/RobotoSlab-Bold.ttf diff --git a/docs/_build/html/_static/fonts/RobotoSlab-Regular.ttf b/docs/build/html/_static/fonts/RobotoSlab-Regular.ttf similarity index 100% rename from docs/_build/html/_static/fonts/RobotoSlab-Regular.ttf rename to docs/build/html/_static/fonts/RobotoSlab-Regular.ttf diff --git a/docs/_build/html/_static/fonts/fontawesome-webfont.eot b/docs/build/html/_static/fonts/fontawesome-webfont.eot similarity index 100% rename from docs/_build/html/_static/fonts/fontawesome-webfont.eot rename to docs/build/html/_static/fonts/fontawesome-webfont.eot diff --git a/docs/_build/html/_static/fonts/fontawesome-webfont.svg b/docs/build/html/_static/fonts/fontawesome-webfont.svg similarity index 100% rename from docs/_build/html/_static/fonts/fontawesome-webfont.svg rename to docs/build/html/_static/fonts/fontawesome-webfont.svg diff --git a/docs/_build/html/_static/fonts/fontawesome-webfont.ttf b/docs/build/html/_static/fonts/fontawesome-webfont.ttf similarity index 100% rename from docs/_build/html/_static/fonts/fontawesome-webfont.ttf rename to docs/build/html/_static/fonts/fontawesome-webfont.ttf diff --git a/docs/_build/html/_static/fonts/fontawesome-webfont.woff b/docs/build/html/_static/fonts/fontawesome-webfont.woff similarity index 100% rename from docs/_build/html/_static/fonts/fontawesome-webfont.woff rename to docs/build/html/_static/fonts/fontawesome-webfont.woff diff --git a/docs/_build/html/_static/jquery-1.11.1.js b/docs/build/html/_static/jquery-1.11.1.js similarity index 100% rename from docs/_build/html/_static/jquery-1.11.1.js rename to docs/build/html/_static/jquery-1.11.1.js diff --git a/docs/_build/html/_static/jquery.js b/docs/build/html/_static/jquery.js similarity index 100% rename from docs/_build/html/_static/jquery.js rename to docs/build/html/_static/jquery.js diff --git a/docs/_build/html/_static/js/modernizr.min.js b/docs/build/html/_static/js/modernizr.min.js similarity index 100% rename from docs/_build/html/_static/js/modernizr.min.js rename to docs/build/html/_static/js/modernizr.min.js diff --git a/docs/_build/html/_static/js/theme.js b/docs/build/html/_static/js/theme.js similarity index 100% rename from docs/_build/html/_static/js/theme.js rename to docs/build/html/_static/js/theme.js diff --git a/docs/_build/html/_static/minus.png b/docs/build/html/_static/minus.png similarity index 100% rename from docs/_build/html/_static/minus.png rename to docs/build/html/_static/minus.png diff --git a/docs/_build/html/_static/plus.png b/docs/build/html/_static/plus.png similarity index 100% rename from docs/_build/html/_static/plus.png rename to docs/build/html/_static/plus.png diff --git a/docs/_build/html/_static/pygments.css b/docs/build/html/_static/pygments.css similarity index 100% rename from docs/_build/html/_static/pygments.css rename to docs/build/html/_static/pygments.css diff --git a/docs/_build/html/_static/searchtools.js b/docs/build/html/_static/searchtools.js similarity index 100% rename from docs/_build/html/_static/searchtools.js rename to docs/build/html/_static/searchtools.js diff --git a/docs/_build/html/_static/underscore-1.3.1.js b/docs/build/html/_static/underscore-1.3.1.js similarity index 100% rename from docs/_build/html/_static/underscore-1.3.1.js rename to docs/build/html/_static/underscore-1.3.1.js diff --git a/docs/_build/html/_static/underscore.js b/docs/build/html/_static/underscore.js similarity index 100% rename from docs/_build/html/_static/underscore.js rename to docs/build/html/_static/underscore.js diff --git a/docs/_build/html/_static/up-pressed.png b/docs/build/html/_static/up-pressed.png similarity index 100% rename from docs/_build/html/_static/up-pressed.png rename to docs/build/html/_static/up-pressed.png diff --git a/docs/_build/html/_static/up.png b/docs/build/html/_static/up.png similarity index 100% rename from docs/_build/html/_static/up.png rename to docs/build/html/_static/up.png diff --git a/docs/_build/html/_static/websupport.js b/docs/build/html/_static/websupport.js similarity index 100% rename from docs/_build/html/_static/websupport.js rename to docs/build/html/_static/websupport.js diff --git a/docs/_build/html/filelist.html b/docs/build/html/filelist.html similarity index 98% rename from docs/_build/html/filelist.html rename to docs/build/html/filelist.html index 271301a..83ddbce 100644 --- a/docs/_build/html/filelist.html +++ b/docs/build/html/filelist.html @@ -8,7 +8,7 @@ - File listing made easy — PyDrive 1.2.1 documentation + File listing made easy — PyDrive 1.3.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 1.2.1 + 1.3.0
@@ -208,7 +208,7 @@

Paginate and iterate through files var DOCUMENTATION_OPTIONS = { URL_ROOT:'./', - VERSION:'1.2.1', + VERSION:'1.3.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/_build/html/filemanagement.html b/docs/build/html/filemanagement.html similarity index 94% rename from docs/_build/html/filemanagement.html rename to docs/build/html/filemanagement.html index 8a10dce..b264ca4 100644 --- a/docs/_build/html/filemanagement.html +++ b/docs/build/html/filemanagement.html @@ -8,7 +8,7 @@ - File management made easy — PyDrive 1.2.1 documentation + File management made easy — PyDrive 1.3.0 documentation @@ -30,7 +30,7 @@ - + @@ -60,7 +60,7 @@
- 1.2.1 + 1.3.0
@@ -313,6 +313,15 @@

Upload and update file content# title: cat.png, mimeType: image/png +

Advanced Users: If you call SetContentFile and GetContentFile you can can +define which character encoding is to be used by using the optional +parameter encoding.

+

If you, for example, are retrieving a file which is stored on your Google +Drive which is encoded with ISO-8859-1, then you can get the content string +like so:

+
content_string = file4.GetContentString(encoding='ISO-8859-1')
+
+
+

Advanced users: Google Drive is known to add BOM (Byte Order Marks) to +the beginning of some files, such as Google Documents downloaded as text files. +In some cases confuses parsers and leads to corrupt files. +PyDrive can remove the BOM from the beginning of a file when it +is downloaded. Just set the remove_bom parameter in GetContentString() or +GetContentFile() - see examples/strip_bom_example.py in the GitHub +repository for an example.

@@ -377,7 +393,7 @@

Download file content var DOCUMENTATION_OPTIONS = { URL_ROOT:'./', - VERSION:'1.2.1', + VERSION:'1.3.0', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true diff --git a/docs/_build/html/genindex.html b/docs/build/html/genindex.html similarity index 99% rename from docs/_build/html/genindex.html rename to docs/build/html/genindex.html index 4427c68..39d98f6 100644 --- a/docs/_build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -9,7 +9,7 @@ - Index — PyDrive 1.2.1 documentation + Index — PyDrive 1.3.0 documentation @@ -31,7 +31,7 @@ - + @@ -59,7 +59,7 @@
- 1.2.1 + 1.3.0
@@ -632,7 +632,7 @@

V

@@ -58,7 +58,7 @@
- 1.2.1 + 1.3.0
@@ -170,7 +170,7 @@