Add media_mime_type keyword argument

Sometimes the Python mimetypes module cannot automatically detect the
MIME type of a media upload file, and the user would want to explicitly
specify it. An example is audio/x-raw.

This commit adds a media_mime_type keyword argument to media upload
methods. If the caller does not specify this argument, a warning is
logged to teach the user about it in case they need to explicitly
specify a MIME type.
3 files changed
tree: 5c7d6dced357a08d24bdf61d45a2898cea361a8f
  1. .github/
  2. apiclient/
  3. docs/
  4. googleapiclient/
  5. samples/
  6. static/
  7. tests/
  8. tools/
  9. .coveragerc
  10. .gitignore
  11. .gitmodules
  12. .hgignore
  13. .travis.yml
  14. CHANGELOG
  15. describe.py
  16. expandsymlinks.py
  17. LICENSE
  18. Makefile
  19. MANIFEST.in
  20. README.md
  21. samples-index.py
  22. setup.py
  23. sitecustomize.py
  24. tox.ini
README.md

About

This is the Python client library for Google's discovery based APIs. To get started, please see the full documentation for this library. Additionally, dynamically generated documentation is available for all of the APIs supported by this library.

Installation

To install, simply use pip or easy_install:

$ pip install --upgrade google-api-python-client

or

$ easy_install --upgrade google-api-python-client

See the Developers Guide for more detailed instructions and additional documentation.

Python Version

Python 2.6 or 2.7 are fully supported.

Python 3.3+ is also now supported! However, this library has not yet been used as thoroughly with Python 3, so we'd recommend testing before deploying with Python 3 in production.

Third Party Libraries and Dependencies

The following libraries will be installed when you install the client library:

For development you will also need the following libraries:

Contributing

Please see the contributing page for more information. In particular, we love pull requests - but please make sure to sign the contributor license agreement.