RAPP Platform API
Main Page
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
RandStrGen.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
5
# Copyright 2015 RAPP
6
7
# Licensed under the Apache License, Version 2.0 (the "License");
8
# you may not use this file except in compliance with the License.
9
# You may obtain a copy of the License at
10
11
#http://www.apache.org/licenses/LICENSE-2.0
12
13
# Unless required by applicable law or agreed to in writing, software
14
# distributed under the License is distributed on an "AS IS" BASIS,
15
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
# See the License for the specific language governing permissions and
17
# limitations under the License.
18
19
# Authors: Konstantinos Panayiotou, Manos Tsardoulias
20
# contact: klpanagi@gmail.com, etsardou@iti.gr
21
22
23
## @file RandStrGen/RandStrGen.py
24
#
25
# @copyright Rapp Projecty EU 2015
26
# @author Konstantinos Panayiotou, [klpanagi@gmail.com]
27
#
28
29
30
import
random
31
import
string
32
33
34
class
RandStrGen
:
35
""" Random String Generator static class (Namespace).
36
37
Generates random string boundaries.
38
"""
39
40
@staticmethod
41
def
create
(size):
42
"""! Generate a nwe random string
43
44
@param size string - Number of characters for the random string to generate
45
"""
46
randStr =
''
.join(
47
random.SystemRandom().choice(
48
string.ascii_uppercase + string.ascii_lowercase + string.digits)
49
for
_
in
range(size))
50
51
return
randStr
RappCloud.Utils.RandStrGen.RandStrGen.create
def create
Generate a nwe random string.
Definition:
RandStrGen.py:41
RappCloud.Utils.RandStrGen.RandStrGen
Definition:
RandStrGen.py:34
python
RappCloud
Utils
RandStrGen.py
Generated on Fri Jul 29 2016 18:45:01 for RAPP Platform API by
1.8.6