Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add beta samples in its own directory
  • Loading branch information
dizcology committed Dec 4, 2017
commit e4233c8c2e6c44e147d77121ef35333a624a8fbc
100 changes: 100 additions & 0 deletions vision/cloud-client/beta/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.. This file is automatically generated. Do not edit this file directly.

Google Cloud Vision API Python Samples
===============================================================================

This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.

- See the `migration guide`_ for information about migrating to Python client library v0.25.1.

.. _migration guide: https://cloud.google.com/vision/docs/python-client-migration




.. _Google Cloud Vision API: https://cloud.google.com/vision/docs

Setup
-------------------------------------------------------------------------------


Authentication
++++++++++++++

This sample requires you to have authentication setup. Refer to the
`Authentication Getting Started Guide`_ for instructions on setting up
credentials for applications.

.. _Authentication Getting Started Guide:
https://cloud.google.com/docs/authentication/getting-started

Install Dependencies
++++++++++++++++++++

#. Install `pip`_ and `virtualenv`_ if you do not already have them.

#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.

.. code-block:: bash

$ virtualenv env
$ source env/bin/activate

#. Install the dependencies needed to run the samples.

.. code-block:: bash

$ pip install -r requirements.txt

.. _pip: https://pip.pypa.io/
.. _virtualenv: https://virtualenv.pypa.io/

Samples
-------------------------------------------------------------------------------

Web
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



To run this sample:

.. code-block:: bash

$ python web_detect.py

usage: web_detect.py [-h] image_url

Demonstrates web detection using the Google Cloud Vision API.

Example usage:
python web_detect.py https://goo.gl/X4qcB6
python web_detect.py ../detect/resources/landmark.jpg
python web_detect.py gs://your-bucket/image.png

positional arguments:
image_url The image to detect, can be web URI, Google Cloud Storage, or
path to local file.

optional arguments:
-h, --help show this help message and exit




The client library
-------------------------------------------------------------------------------

This sample uses the `Google Cloud Client Library for Python`_.
You can read the documentation for more details on API usage and use GitHub
to `browse the source`_ and `report issues`_.

.. _Google Cloud Client Library for Python:
https://googlecloudplatform.github.io/google-cloud-python/
.. _browse the source:
https://github.com/GoogleCloudPlatform/google-cloud-python
.. _report issues:
https://github.com/GoogleCloudPlatform/google-cloud-python/issues


.. _Google Cloud SDK: https://cloud.google.com/sdk/
28 changes: 28 additions & 0 deletions vision/cloud-client/beta/README.rst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file is used to generate README.rst

product:
name: Google Cloud Vision API
short_name: Cloud Vision API
url: https://cloud.google.com/vision/docs
description: >
`Google Cloud Vision API`_ allows developers to easily integrate vision
detection features within applications, including image labeling, face and
landmark detection, optical character recognition (OCR), and tagging of
explicit content.


- See the `migration guide`_ for information about migrating to Python client library v0.25.1.


.. _migration guide: https://cloud.google.com/vision/docs/python-client-migration

setup:
- auth
- install_deps

samples:
- name: Web
file: web_detect.py
show_help: True

cloud_client_library: true
Loading