Skip to content

Commit 932397e

Browse files
committed
add release notes and password example
1 parent c157788 commit 932397e

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

example/example.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,31 @@ async def main():
130130
# [developer-docs.sdk.python.update-item]-end
131131

132132
print(dict(updated_item))
133+
134+
pin_password = Secrets.generate_password(PasswordRecipePin(parameters=PasswordRecipePinInner(length=8)))
135+
print(pin_password)
136+
137+
memorable_password = Secrets.generate_password(
138+
PasswordRecipeMemorable(parameters=PasswordRecipeMemorableInner(
139+
separatorType=SeparatorType.UNDERSCORES,
140+
wordListType=WordListType.SYLLABLES,
141+
capitalize=False,
142+
wordCount=3,
143+
)
144+
),
145+
)
146+
print(memorable_password)
147+
148+
random_password = Secrets.generate_password(
149+
PasswordRecipeRandom(parameters=PasswordRecipeRandomInner(
150+
length=10,
151+
includeDigits=False,
152+
includeSymbols=False,
153+
)
154+
),
155+
)
156+
print(random_password)
157+
133158
# [developer-docs.sdk.python.delete-item]-start
134159
# Delete a item from your vault.
135160
await client.items.delete(created_item.vault_id, updated_item.id)

src/release/RELEASE-NOTES

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
The v0.1.4 release of the Python SDK brings:
2-
* Support for validating secret references. You can now check that a secret reference is formatted correctly without having to resolve it or even authenticate, using the 'ValidateSecretReference' function.
1+
Version 0.1.5 of the 1Password Python SDK brings:
2+
Support for generating passwords. You can now generate random, PIN, and memorable passwords using the onepassword.Secrets.generate_password function.
3+
Support for item subtitles. Creating and editing an item now sets the subtitle correctly, which is visible in the item preview in all client apps.
4+
Support for the Credit Card Number field type. You can now retrieve, create, and edit items containing credit card numbers.

0 commit comments

Comments
 (0)