MCPcopy Index your code
hub / github.com/aws/aws-cli / random_chars

Function random_chars

awscli/testutils.py:256–262  ·  view source on GitHub ↗

Returns random hex characters. Useful for creating resources with random names.

(num_chars)

Source from the content-addressed store, hash-verified

254
255
256def random_chars(num_chars):
257 """Returns random hex characters.
258
259 Useful for creating resources with random names.
260
261 """
262 return binascii.hexlify(os.urandom(int(num_chars / 2))).decode('ascii')
263
264
265def random_bucket_name(prefix='awscli-s3integ', num_random=15):

Callers 8

random_nameMethod · 0.90
wait_for_assume_roleMethod · 0.90
test_copy_metadataMethod · 0.90
temporary_fileFunction · 0.70
random_bucket_nameFunction · 0.70

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected