1- # adobe-umapi.py
1+ # adobe-umapi-client .py
22
3- Python client for the Adobe User Management API, aka the
4- [ Adobe UMAPI] ( https://www.adobe.io/products/usermanagement/docs/gettingstarted.html )
3+ This is a Python client for the Adobe User Management API, aka the
4+ [ Adobe UMAPI] ( https://www.adobe.io/products/usermanagement/docs/gettingstarted.html ) .
5+
6+ The Adobe User Management API is an Adobe-hosted network service
7+ which provides Adobe Enterprise customers the ability to manage their users. This
8+ client makes it easy to access the Adobe UMAPI from a local Python application.
9+
10+ This client is open source, maintained by Adobe, and distributed under the terms
11+ of the OSI-approved MIT license. Copyright (c) 2016 Adobe Systems Incorporated.
512
613# Installation
714
8- You can get this package from PyPI: ` pip install adobe-umapi ` .
15+ You can get this package from PyPI: ` pip install adobe-umapi-client ` .
916Or you can download the posted package from GitHub and use pip
1017to install from the download.
1118
12- (Note: as of 13 Dec 2016, there was an issue with the PyPI posting.
13- We are working to fix that problem.)
14-
1519# Building
1620
17211 . Clone this repository or download the latest stable release.
18- 2 . From the command line, change to the ` adobe-umapi.py ` directory.
22+ 2 . From the command line, change to the ` adobe-umapi-client .py ` directory.
19233 . To install, run the command ` python setup.py install ` .
2024[ ** NOTE** : You may need admin/root privileges to install new packages in your environment.
2125It is recommended that you use ` virtualenv ` to make a virtual python environment.
@@ -62,7 +66,7 @@ The JSON Web Token (JWT) is used to get an authorization token for using the API
6266The ` JWT ` object will build the JWT for use with the ` AccessRequest ` object.
6367
6468``` python
65- from adobe_umapi .auth import JWT
69+ from adobe_umapi_client .auth import JWT
6670
6771jwt = JWT(
6872 org_id, # Organization ID
@@ -79,7 +83,7 @@ The `AccessRequest` object uses the JWT to call an IMS endpoint to obtain an acc
7983token is then used in all later UMAPI calls to authenticate and authorize the request.
8084
8185``` python
82- from adobe_umapi .auth import AccessRequest
86+ from adobe_umapi_client .auth import AccessRequest
8387
8488token = AccessRequest(
8589 " https://" + ims_host + ims_endpoint_jwt, # Access Request Endpoint (IMS Host + JWT Endpoint)
@@ -103,7 +107,7 @@ Once you have an access `token`, you use it to create an Auth object. This Auth
103107is used to build the necessary authentication headers for making an API call.
104108
105109``` python
106- from adobe_umapi .auth import Auth
110+ from adobe_umapi_client .auth import Auth
107111
108112auth = Auth(api_key, token())
109113```
@@ -114,7 +118,7 @@ Once the `auth` object is built, you use it to construct a UMAPI object. This U
114118object can then be used over and over to make your desired API calls.
115119
116120``` python
117- from adobe_umapi import UMAPI
121+ from adobe_umapi_client import UMAPI
118122
119123api_endpoint = ' https://usermanagement.adobe.io/v2/usermanagement'
120124api = UMAPI(api_endpoint, auth)
@@ -124,15 +128,15 @@ api = UMAPI(api_endpoint, auth)
124128
125129These snippets presume you have constructed a UMAPI object named ` api ` as detailed in the last section.
126130The query APIs return data in paginated form, each page contaning up to 200 results.
127- The ` adobe_umapi .helper`
131+ The ` adobe_umapi_client .helper`
128132module has a ` paginate ` utility which can will concatenate and return the results from all pages.
129133
130134## Get a List of Users
131135
132136``` python
133137users = api.users(org_id, page = 0 ) # optional arg page defaults to 0
134138
135- from adobe_umapi .helper import paginate
139+ from adobe_umapi_client .helper import paginate
136140all_users = paginate(api.users, org_id) # optional args for max_pages and max_records
137141```
138142
@@ -158,7 +162,7 @@ To create the action object, we name the user we wish to operate on.
158162(As above, ` api ` here in a UMAPI object.)
159163
160164``` python
161- from adobe_umapi import Action
165+ from adobe_umapi_client import Action
162166
163167action
= Action(
user = " [email protected] " )
164168```
@@ -443,9 +447,9 @@ The "add" portion of the JSON looks like this:
443447"add" : {"product" : [" product1" ]}
444448```
445449
446- ## adobe_umapi .auth
450+ ## adobe_umapi_client .auth
447451
448- The submodule ` adobe_umapi .auth` contains the components needed to build
452+ The submodule ` adobe_umapi_client .auth` contains the components needed to build
449453the authentication headers needed for API communication.
450454
451455### JWT
@@ -466,7 +470,7 @@ The `JWT` object is callable. Calling it returns the encoded JWT.
466470Example:
467471
468472``` python
469- from adobe_umapi .auth import JWT
473+ from adobe_umapi_client .auth import JWT
470474
471475jwt = JWT(
472476 org_id, # Organization ID
@@ -495,7 +499,7 @@ Like the `JWT` object, the `AccessRequest` object is callable. Calling it retur
495499Basic Usage Example:
496500
497501``` python
498- from adobe_umapi .auth import AccessRequest
502+ from adobe_umapi_client .auth import AccessRequest
499503
500504token = AccessRequest(
501505 " https://" + ims_host + ims_endpoint_jwt, # Access Request Endpoint (IMS Host + JWT Endpoint)
@@ -529,15 +533,15 @@ It is a subclass of the
529533Example:
530534
531535``` python
532- from adobe_umapi .auth import Auth
536+ from adobe_umapi_client .auth import Auth
533537
534538token = AccessRequest( ... )
535539auth = Auth(api_key, token())
536540```
537541
538- ## adobe_umapi .error
542+ ## adobe_umapi_client .error
539543
540- The ` adobe_umapi .error` submodule contains all custom Exceptions for the UMAPI library.
544+ The ` adobe_umapi_client .error` submodule contains all custom Exceptions for the UMAPI library.
541545
542546### UMAPIError
543547
0 commit comments