-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
108 lines (87 loc) · 3.54 KB
/
setup.py
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
import setuptools
import os
here = os.path.abspath(os.path.dirname(__file__))
long_description = ""
try:
with open("README.md", "r") as fh:
long_description = fh.read()
except:
long_description = """
WsseHeaders: WSSE for Python™
==========================
WsseHeaders is the only WSSE Token generation library for Python, safe for human
consumption.
Initialize the WsseHeader module
``` {.sourceCode .python}
>>> import WsseHeaders
>>> WsseTokenObject = WsseHeaders.WsseToken(username="yodebu", orgName="yodebuOrg", token="base64tokenstring")
```
Generate the Header String as required :
``` {.sourceCode .python}
>>> WsseTokenObject.generateHeaderString()
'UsernameToken Username="yodebu", PasswordDigest="SXoO32oqIKFOl63mvsMoW+HPcHo=", Nonce="/lruYfbC12FfjiqFLgJxVw==", Created="2018-11-11T10:50:49+00:00", Organization="yodebuOrg"'
```
Get the Authentication Headers as Dictionary which can be easily converted to JSON:
``` {.sourceCode .python}
>>> WsseTokenObject.generateHeader()
{
'Authorization': 'WSSE profile="UsernameToken"',
'X-WSSE': 'UsernameToken Username="yodebu", PasswordDigest="SXoO32oqIKFOl63mvsMoW+HPcHo=", Nonce="/lruYfbC12FfjiqFLgJxVw==", Created="2018-11-11T10:50:49+00:00", Organization="yodebuOrg"',
'Accept': 'Application/json'
}
```
WsseHeaders officially supports Python 3.0 and above. Python 2.7 support coming soon.
Installation
------------
To install WsseHeaders, simply use [pipenv](http://pipenv.org/) (or pip, of
course):
``` {.sourceCode .bash}
$ pipenv install WsseHeaders
✨🍰✨
```
Documentation
-------------
Fantastic documentation to be available shortly at
<http://docs.python.org/>, for a limited time only.
How to Contribute
-----------------
1. Check for open issues or open a fresh issue to start a discussion
around a feature idea or a bug.
2. Fork [the repository](https://github.com/light-bringer/wsse-headers) on
GitHub to start making your changes to the **master** branch (or
branch off of it).
3. Write a test which shows that the bug was fixed or that the feature
works as expected.
4. Send a pull request and bug the maintainer until it gets merged and
published. :) Make sure to add yourself to
[AUTHORS](https://github.com/light-bringer/wsse-headers/blob/master/AUTHORS.rst).
"""
packages = ['WsseHeaders']
requires = [
'pycryptodome>=3.7.0',
'pytz>=2018.5'
]
setuptools.setup(
name="WsseHeaders",
version="0.0.16",
author="Debapriya Das",
author_email="yodebu@gmail.com",
description="A package to generate WSSE Headers",
long_description=long_description,
long_description_content_type="text/markdown",
license='MIT',
url="https://github.com/light-bringer/wsse-headers",
# packages=setuptools.find_packages(),
keywords='WSSE Headers generation',
packages = packages,
python_requires=">=3.0, <4",
install_requires=requires,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development',
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)