Skip to content

Commit

Permalink
feat: add _async_resumable_media experimental support (#179)
Browse files Browse the repository at this point in the history
Merge long-lived async branch

* refactor: use named consts for session Python versions

* chore(deps): pin 'google-crc32c < 0.2dev' (#160)

* feat: async changes to resumable upload/download (#153)

* chore(deps): use google-auth >= 1.22.0, 2.0dev which includes google.auth.default_async, aiohttp_requests (#176)

* fix: move `async_resumable_media` to `_async_resumable_media` (#178)

Co-authored-by: Chris Cotter <cjcotter@google.com>
Co-authored-by: Takashi Matsuo <tmatsuo@google.com>
Co-authored-by: Tres Seaver <tseaver@palladion.com>
Co-authored-by: Anirudh Baddepudi <43104821+anibadde@users.noreply.github.com>
Co-authored-by: Anirudh Baddepuddi <anibadde@google.com>
  • Loading branch information
6 people authored Oct 5, 2020
1 parent b412e9f commit 03c11ba
Show file tree
Hide file tree
Showing 35 changed files with 9,001 additions and 43 deletions.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ See the `docs`_ for examples and usage.

.. _docs: https://googleapis.dev/python/google-resumable-media/latest/index.html

Experimental `asyncio` Support
------------------------------
While still in development and subject to change, this library has `asyncio`
support at `google._async_resumable_media`.

Supported Python Versions
-------------------------
Python >= 3.5
Expand Down
61 changes: 61 additions & 0 deletions google/_async_resumable_media/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Utilities for Google Media Downloads and Resumable Uploads.
This package has some general purposes modules, e.g.
:mod:`~google.resumable_media.common`, but the majority of the
public interface will be contained in subpackages.
===========
Subpackages
===========
Each subpackage is tailored to a specific transport library:
* the :mod:`~google.resumable_media.requests` subpackage uses the ``requests``
transport library.
.. _requests: http://docs.python-requests.org/
==========
Installing
==========
To install with `pip`_:
.. code-block:: console
$ pip install --upgrade google-resumable-media
.. _pip: https://pip.pypa.io/
"""


from google.resumable_media.common import DataCorruption
from google.resumable_media.common import InvalidResponse
from google.resumable_media.common import PERMANENT_REDIRECT
from google.resumable_media.common import RetryStrategy
from google.resumable_media.common import TOO_MANY_REQUESTS
from google.resumable_media.common import UPLOAD_CHUNK_SIZE


__all__ = [
u"DataCorruption",
u"InvalidResponse",
u"PERMANENT_REDIRECT",
u"RetryStrategy",
u"TOO_MANY_REQUESTS",
u"UPLOAD_CHUNK_SIZE",
]
Loading

0 comments on commit 03c11ba

Please sign in to comment.