Skip to content

Commit c4dd831

Browse files
committed
Update example and release notes
1 parent eb2f17e commit c4dd831

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

example/example.py

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,30 +130,40 @@ 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)))
133+
134+
# [developer-docs.sdk.python.generate-pin-password]-start
135+
pin_password = Secrets.generate_password(
136+
PasswordRecipePin(parameters=PasswordRecipePinInner(length=8))
137+
)
135138
print(pin_password)
139+
# [developer-docs.sdk.python.generate-pin-password]-end
136140

141+
# [developer-docs.sdk.python.generate-memorable-password]-start
137142
memorable_password = Secrets.generate_password(
138-
PasswordRecipeMemorable(parameters=PasswordRecipeMemorableInner(
139-
separatorType=SeparatorType.UNDERSCORES,
143+
PasswordRecipeMemorable(
144+
parameters=PasswordRecipeMemorableInner(
145+
separatorType=SeparatorType.UNDERSCORES,
140146
wordListType=WordListType.SYLLABLES,
141147
capitalize=False,
142148
wordCount=3,
143-
)
144-
),
145-
)
149+
)
150+
),
151+
)
146152
print(memorable_password)
153+
# [developer-docs.sdk.python.generate-memorable-password]-end
147154

155+
# [developer-docs.sdk.python.generate-random-password]-start
148156
random_password = Secrets.generate_password(
149-
PasswordRecipeRandom(parameters=PasswordRecipeRandomInner(
157+
PasswordRecipeRandom(
158+
parameters=PasswordRecipeRandomInner(
150159
length=10,
151160
includeDigits=False,
152161
includeSymbols=False,
153-
)
154-
),
155-
)
162+
)
163+
),
164+
)
156165
print(random_password)
166+
# [developer-docs.sdk.python.generate-random-password]-end
157167

158168
# [developer-docs.sdk.python.delete-item]-start
159169
# Delete a item from your vault.

src/release/RELEASE-NOTES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Version 0.1.5 of the 1Password Python SDK brings:
22
* Support for generating passwords. You can now generate random, PIN, and memorable passwords using the `onepassword.Secrets.generate_password` function.
33
* 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.
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)