Skip to content

Commit

Permalink
Add digits method in module rand
Browse files Browse the repository at this point in the history
  • Loading branch information
rnv812 committed Jun 11, 2024
1 parent d520afc commit b0ca6e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions eventum_plugins/event/jinja_modules/rand.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ def letters(size: int) -> str:
"""
return ''.join(random.choices(ascii_letters, k=size))

@staticmethod
def digits(size: int) -> str:
"""Return string of specified `size` that contains random digits
characters.
"""
return ''.join(random.choices(digits, k=size))

@staticmethod
def punctuation(size: int) -> str:
"""Return string of specified `size` that contains random ASCII
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "eventum-plugins"
version = "1.0.6"
version = "1.0.7"
description = "Plugins for Eventum"
license = "Apache-2.0"
authors = ["Nikita Reznikov <[email protected]>"]
Expand Down

0 comments on commit b0ca6e5

Please sign in to comment.