Lines Matching refs:rstr

2 Name: rstr
5 Home-page: https://github.com/leapfrogonline/rstr
9 Maintainer-email: rstr@mccoll.am
27 rstr = Random Strings in Python
30 rstr is a helper module for easily generating random strings of various types.
39 By default, rstr uses the Python ``random`` module to generate pseudorandom text. This module is ba…
41 **If you wish to use rstr for password-generation or other cryptographic
48 >> from rstr import Rstr
56 The basic method of rstr is ``rstr()``. At a minimum, it requires one argument,
61 >>> import rstr
62 >>> rstr.rstr('ABC')
70 >>> rstr.rstr('ABC', 4)
74 case, rstr will return a string with a randomly selected length between 5 and 10
79 >>> rstr.rstr('ABC', 5, 10)
89 >>> rstr.rstr('ABC', include='&')
98 >>> rstr.rstr(string.digits, exclude='5')
106 >>> rstr.rstr(['A', 'B', 'C'], include = ['@'], exclude=('C',))
112 The other methods provided by rstr, besides ``rstr()`` and ``xeger()``, are convenience
114 They accept the same arguments as ``rstr()`` for purposes of
176 >>> import rstr
177 >>> rstr.xeger(r'[A-Z]\d[A-Z] \d[A-Z]\d')
189 >>> from rstr import Rstr
203 You can combine rstr with Python's built-in string formatting to produce strings
210 '{0}@{1}.{2}'.format(rstr.nonwhitespace(exclude='@'),
211 rstr.domainsafe()
212 rstr.letters(3))
218 'http://{0}.{1}/{2}/?{3}'.format(rstr.domainsafe(),
219 rstr.letters(3),
220 rstr.urlsafe(),
221 rstr.urlsafe())
230 """.format(rstr.letters(4, 8).title(),
231 rstr.letters(4, 8).title(),
232 rstr.digits(3, 5),
233 rstr.letters(4, 10).title(),
234 rstr.letters(4, 15).title(),
235 rstr.uppercase(2),
236 rstr.digits(5),