forked from ashishkumar-tudip/python-demandware-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
117 lines (68 loc) · 2.05 KB
/
README
File metadata and controls
117 lines (68 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Python Demandware SDK
========
Description
-----------
Python Demandware SDK provides access to the OCAPI services.
https://documentation.demandware.com/display/DOC131/Open+Commerce+API
Installation
-------------
::
$ pip install https://github.com/weareconflict/python-demandware-sdk/tarball/master
Basic usage
-----------
::
from dw.client import Demandware
# Set a config file
DW_API = {
'client_id': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'hostname': 'changeme.demandware.net',
'site': 'SiteGenesis',
'version': 'v13_1',
}
# Instance a client
conn = Demandware(DW_API)
# Make an API call
product = conn.get_product('008884303989')
print product.name
Client ID
-------------
How to set client_id parameter
https://documentation.demandware.com/display/DOC133/Client+application+identification
https://documentation.demandware.com/display/DOC133/Client+permissions
Developers: Running tests
-----------
::
Need to install nose
$ pip install nose
Rename client.json.template
$ cp tests/fixtures/client.json.template tests/fixtures/client.json
Ensure
Settings/key: ok_valid in tests/client.json are correct
User tester@weareconflict.com exists, after run tests you can delete it
Run
$ python setup.py nosetests --tests tests
or
$ python setup.py nosetests --verbosity=4 --detailed-errors --tests tests
or run explicit test
$ python setup.py nosetests --tests tests.client_test:DemandwareTest.test_register_correct_user
Developers: Running coverage
-----------
::
Need to install plugin
$ pip install coverage
Run
$ python setup.py nosetests --tests tests --with-coverage --cover-html --cover-html-dir=coverage/html
Developers: Generate documentation
-----------
::
Need to install sphinx
$ pip install sphinx
Run
$ sphinx-build -b html -c docs/source docs/source docs/build
Contributors
-------------
* Moises Brenes <https://github.com/gin>
* Conflict <https://github.com/weareconflict>
Documentation
-------------
* http://dw.readthedocs.org/