Getting Started

Getting Started with Python

Contents

Introduction

Verizon Personal Cloud Storage SDK for Python allows you to develop apps for Python platform which can access Verizon Personal Cloud Storage user content (subject to the user’s prior approval).

Before You Begin

Before you can start coding, you will need to:

  1. Obtain Key, Secret, and Callback URL.
  2. Make sure you have the right tools.
  3. Install and configure Personal Cloud Storage SDK for Python.

1. Obtain Key, Secret, and Callback URL

Key, Secret, and Callback URL are established during registration. If you have not yet registered, follow the steps on the Getting Credentials to Use the Personal Cloud Storage APIs page in the API Developer Guide to register.

2. Make sure you have the right tools

You will need:

  • Python (one of the following)
    • 2.7 or higher
    • 3.x

3. Install and configure Personal Cloud Storage SDK for Python

In order to download Verizon Personal Cloud Storage SDK for Python, you must log on to ThingSpace Developer Portal and accept Verizon terms and conditions. If you start downloading the file without logging on, the download will stop and you will be redirected to the log on screen. Download will resume after a successful log on.

The Python SDK can be either installed, or embedded in your app.

  1. Install or embed the SDK:

    • To install the SDK, navigate to the thingspace directory and run python setup.py install.
    • To embed the SDK, place the SDK in a sub-directory accessible to your app.

    NOTE: If you place the thingspace inside another module, you must import that module as well.

  2. Import the SDK and instantiate it with Key, Secret, and Callback URL.

    Code Sample

    from thingspace.cloud import Cloud
        
    cloud = Cloud(
                client_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
                client_secret='xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
                callback_url='http://127.0.0.1:8000/token',
    )
    

Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.