Metadata-Version: 1.1
Name: salesforce-oauth-request
Version: 1.0.2
Summary: Util package to drive Salesforce Oauth Web flow for testing.
Home-page: https://github.com/heroku/salesforce-oauth-request
Author: Scott Persinger
Author-email: scottp@heroku.com
License: Copyright (c) 2013 Scott Persinger

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Description: # Salesforce Oauth Request
        
        A bit of Requests driven utility code to drive the Salesforce.com Oauth2 Web flow. Use this module to login to a Salesforce account using just the username and password. Good for tests and scripts which need
        Salesforce access_token access.
        
        ## Installation
        
        ```pip install salesforce-oauth-request```
        
        ## Usage
        
        You need a Connected App defined in Salesforce so that you have all these pieces of info:
        
        1. `client ID`
        2. `client secret`
        3. `redirect uri`
        
        Now you can get an `access_token` and `instance_url` like this:
        
        ```
        import salesforce_oauth_request
        
        result = salesforce_oauth_request.login(username=username,
        										password=password,
        										client_id=client_id,
        										client_secret=client_secret,
        										redirect_uri=redirect_uri)
        
        print "Access token:  %s" + result['access_token']
        print "Refresh token: %s" + result['refresh_token']
        print "Instance URL:  %s" + result['instance_url']
        
        # Now use access_token, instance_url for REST, SOAP, or BULK API access.
        ```
        ## Options
        
        ```
        cache_session=True/False - default False
        ```
        
        Pass the option `cache_session=true` to save the access token to `~.sf_oauth`
        to save time on repeated runs.
        
        ```
        sandbox=True/False - default False
        ```
        
        Pass `sandbox=True` to use a sandbox login.
        ## Testing
        
        You can run the simple test script like this:
        
        ```python test.py```
        
        It will prompt you for all the values, drive the login, and print the results.
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
