Skip to content

Commit 8c92573

Browse files
author
Kit Cambridge
committed
Add missing docstrings; bump version to 1.0.0.
1 parent 5916513 commit 8c92573

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

python/py_vapid/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818

1919
def b64urldecode(data):
20+
"""Decodes an unpadded Base64url-encoded string."""
2021
return base64.urlsafe_b64decode(data + "===="[:len(data) % 4])
2122

2223

@@ -48,6 +49,13 @@ def __init__(self, private_key=None):
4849

4950
@classmethod
5051
def from_raw(cls, private_key):
52+
"""Initialize VAPID using a private key point in "raw" or
53+
"uncompressed" form.
54+
55+
:param private_key: A private key point in uncompressed form.
56+
:type private_key: str
57+
58+
"""
5159
key = ecdsa.SigningKey.from_string(b64urldecode(private_key),
5260
curve=cls._curve,
5361
hashfunc=cls._hasher)

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from setuptools import setup, find_packages
55

6-
__version__ = "0.8.1"
6+
__version__ = "1.0.0"
77

88

99
def read_from(file):

0 commit comments

Comments
 (0)