smartrandom 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- smartrandom-0.0.1/LICENSE +28 -0
- smartrandom-0.0.1/PKG-INFO +71 -0
- smartrandom-0.0.1/README.md +49 -0
- smartrandom-0.0.1/setup.cfg +44 -0
- smartrandom-0.0.1/setup.py +5 -0
- smartrandom-0.0.1/smartrandom/__init__.py +0 -0
- smartrandom-0.0.1/smartrandom/random_master.py +73 -0
- smartrandom-0.0.1/smartrandom.egg-info/PKG-INFO +71 -0
- smartrandom-0.0.1/smartrandom.egg-info/SOURCES.txt +11 -0
- smartrandom-0.0.1/smartrandom.egg-info/dependency_links.txt +1 -0
- smartrandom-0.0.1/smartrandom.egg-info/not-zip-safe +1 -0
- smartrandom-0.0.1/smartrandom.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, A.A Suvorov
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: smartrandom
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Random Data Generators
|
|
5
|
+
Home-page: https://github.com/smartlegionlab/smartrandom/
|
|
6
|
+
Author: A.A Suvorov
|
|
7
|
+
Author-email: smartlegiondev@gmail.com
|
|
8
|
+
License: BSD 3-Clause License
|
|
9
|
+
Project-URL: Documentation, https://github.com/smartlegionlab/smartrandom/blob/master/README.md
|
|
10
|
+
Project-URL: Release notes, https://github.com/smartlegionlab/smartrandom/releases
|
|
11
|
+
Keywords: password generator,smartrandom,smartlegionlab
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
14
|
+
Classifier: Natural Language :: English
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.6
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
|
|
23
|
+
# smartrandom
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Random Data Generators:
|
|
28
|
+
|
|
29
|
+
Allows you to generate random strings of a given length from letters, numbers, symbols.
|
|
30
|
+
Helps to generate passwords, service codes (for example, for sending via SMS), hashes and much more.
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Help:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from smartrandom.random_master import RandomMaster
|
|
37
|
+
|
|
38
|
+
random_string = RandomMaster.string.get(length=10)
|
|
39
|
+
random_number_string = RandomMaster.number.get(length=10)
|
|
40
|
+
password = RandomMaster.password.get(length=10)
|
|
41
|
+
random_hash = RandomMaster.hash.get(text='give me hash')
|
|
42
|
+
random_number_code = RandomMaster.get_code(length=10, number_flag=True)
|
|
43
|
+
random_string_code = RandomMaster.get_code(length=10, string_flag=True)
|
|
44
|
+
random_symbol_code = RandomMaster.get_code(length=10, symbol_flag=True)
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
***
|
|
49
|
+
|
|
50
|
+
## Disclaimer of liability:
|
|
51
|
+
|
|
52
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
53
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
54
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
55
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
56
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
57
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
58
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
59
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
60
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
61
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
## Copyright:
|
|
66
|
+
--------------------------------------------------------
|
|
67
|
+
Licensed under the terms of the BSD 3-Clause License
|
|
68
|
+
(see LICENSE for details).
|
|
69
|
+
Copyright © 2018-2023, A.A Suvorov
|
|
70
|
+
All rights reserved.
|
|
71
|
+
--------------------------------------------------------
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# smartrandom
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Random Data Generators:
|
|
6
|
+
|
|
7
|
+
Allows you to generate random strings of a given length from letters, numbers, symbols.
|
|
8
|
+
Helps to generate passwords, service codes (for example, for sending via SMS), hashes and much more.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Help:
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from smartrandom.random_master import RandomMaster
|
|
15
|
+
|
|
16
|
+
random_string = RandomMaster.string.get(length=10)
|
|
17
|
+
random_number_string = RandomMaster.number.get(length=10)
|
|
18
|
+
password = RandomMaster.password.get(length=10)
|
|
19
|
+
random_hash = RandomMaster.hash.get(text='give me hash')
|
|
20
|
+
random_number_code = RandomMaster.get_code(length=10, number_flag=True)
|
|
21
|
+
random_string_code = RandomMaster.get_code(length=10, string_flag=True)
|
|
22
|
+
random_symbol_code = RandomMaster.get_code(length=10, symbol_flag=True)
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
***
|
|
27
|
+
|
|
28
|
+
## Disclaimer of liability:
|
|
29
|
+
|
|
30
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
31
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
32
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
33
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
34
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
35
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
36
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
37
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
38
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
39
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
## Copyright:
|
|
44
|
+
--------------------------------------------------------
|
|
45
|
+
Licensed under the terms of the BSD 3-Clause License
|
|
46
|
+
(see LICENSE for details).
|
|
47
|
+
Copyright © 2018-2023, A.A Suvorov
|
|
48
|
+
All rights reserved.
|
|
49
|
+
--------------------------------------------------------
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = smartrandom
|
|
3
|
+
version = 0.0.1
|
|
4
|
+
author = A.A Suvorov
|
|
5
|
+
author_email = smartlegiondev@gmail.com
|
|
6
|
+
description = Random Data Generators
|
|
7
|
+
long_description = file: README.md
|
|
8
|
+
long_description_content_type = text/markdown
|
|
9
|
+
url = https://github.com/smartlegionlab/smartrandom/
|
|
10
|
+
project_urls =
|
|
11
|
+
Documentation = https://github.com/smartlegionlab/smartrandom/blob/master/README.md
|
|
12
|
+
Release notes = https://github.com/smartlegionlab/smartrandom/releases
|
|
13
|
+
license = BSD 3-Clause License
|
|
14
|
+
classifiers =
|
|
15
|
+
Development Status :: 5 - Production/Stable
|
|
16
|
+
License :: OSI Approved :: BSD License
|
|
17
|
+
Natural Language :: English
|
|
18
|
+
Operating System :: OS Independent
|
|
19
|
+
Operating System :: POSIX :: Linux
|
|
20
|
+
Programming Language :: Python :: 3 :: Only
|
|
21
|
+
Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
keywords =
|
|
23
|
+
password generator
|
|
24
|
+
smartrandom
|
|
25
|
+
smartlegionlab
|
|
26
|
+
|
|
27
|
+
[options]
|
|
28
|
+
package_dir =
|
|
29
|
+
packages = find:
|
|
30
|
+
python_requires = >= 3.6
|
|
31
|
+
include_package_data = true
|
|
32
|
+
zip_safe = false
|
|
33
|
+
install_requires =
|
|
34
|
+
|
|
35
|
+
[coverage:run]
|
|
36
|
+
omit =
|
|
37
|
+
venv/*
|
|
38
|
+
.pytest_cache
|
|
39
|
+
*__init__.py
|
|
40
|
+
|
|
41
|
+
[egg_info]
|
|
42
|
+
tag_build =
|
|
43
|
+
tag_date = 0
|
|
44
|
+
|
|
File without changes
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# --------------------------------------------------------
|
|
3
|
+
# Licensed under the terms of the BSD 3-Clause License
|
|
4
|
+
# (see LICENSE for details).
|
|
5
|
+
# Copyright © 2018-2023, A.A Suvorov
|
|
6
|
+
# All rights reserved.
|
|
7
|
+
# --------------------------------------------------------
|
|
8
|
+
# https://github.com/smartlegionlab
|
|
9
|
+
# --------------------------------------------------------
|
|
10
|
+
import hashlib
|
|
11
|
+
import random
|
|
12
|
+
import string
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class RandomStringMaster:
|
|
16
|
+
letters = string.ascii_letters
|
|
17
|
+
|
|
18
|
+
@classmethod
|
|
19
|
+
def get(cls, length=10):
|
|
20
|
+
return ''.join((random.choice(cls.letters) for _ in range(length)))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class RandomNumberMaster:
|
|
24
|
+
numbers = string.digits
|
|
25
|
+
|
|
26
|
+
@classmethod
|
|
27
|
+
def get(cls, length=10):
|
|
28
|
+
return ''.join((random.choice(cls.numbers) for _ in range(length)))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class RandomSymbolMaster:
|
|
32
|
+
symbols = '@$!%*#?&-'
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def get(cls, length=10):
|
|
36
|
+
return ''.join((random.choice(cls.symbols) for _ in range(length)))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class RandomPasswordMaster:
|
|
40
|
+
letters = string.ascii_letters
|
|
41
|
+
numbers = string.digits
|
|
42
|
+
symbols = '@$!%*#?&-'
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def get(cls, length=10):
|
|
46
|
+
return ''.join((random.choice(cls.letters + cls.numbers + cls.symbols) for _ in range(length)))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class RandomHashMaster:
|
|
50
|
+
@classmethod
|
|
51
|
+
def get(cls, text):
|
|
52
|
+
sha = hashlib.sha3_512(text.encode('utf-8'))
|
|
53
|
+
new_hash = sha.hexdigest()
|
|
54
|
+
return new_hash
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class RandomMaster:
|
|
58
|
+
string = RandomStringMaster()
|
|
59
|
+
number = RandomNumberMaster()
|
|
60
|
+
symbol = RandomSymbolMaster()
|
|
61
|
+
password = RandomPasswordMaster()
|
|
62
|
+
hash = RandomHashMaster()
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def get_code(cls, length=10, number_flag=False, string_flag=False, symbol_flag=False):
|
|
66
|
+
data = ''
|
|
67
|
+
if string_flag:
|
|
68
|
+
data += cls.string.letters
|
|
69
|
+
if number_flag:
|
|
70
|
+
data += cls.number.numbers
|
|
71
|
+
if symbol_flag:
|
|
72
|
+
data += cls.symbol.symbols
|
|
73
|
+
return ''.join((random.choice(data) for _ in range(length)))
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: smartrandom
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Random Data Generators
|
|
5
|
+
Home-page: https://github.com/smartlegionlab/smartrandom/
|
|
6
|
+
Author: A.A Suvorov
|
|
7
|
+
Author-email: smartlegiondev@gmail.com
|
|
8
|
+
License: BSD 3-Clause License
|
|
9
|
+
Project-URL: Documentation, https://github.com/smartlegionlab/smartrandom/blob/master/README.md
|
|
10
|
+
Project-URL: Release notes, https://github.com/smartlegionlab/smartrandom/releases
|
|
11
|
+
Keywords: password generator,smartrandom,smartlegionlab
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
14
|
+
Classifier: Natural Language :: English
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.6
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
|
|
23
|
+
# smartrandom
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Random Data Generators:
|
|
28
|
+
|
|
29
|
+
Allows you to generate random strings of a given length from letters, numbers, symbols.
|
|
30
|
+
Helps to generate passwords, service codes (for example, for sending via SMS), hashes and much more.
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Help:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from smartrandom.random_master import RandomMaster
|
|
37
|
+
|
|
38
|
+
random_string = RandomMaster.string.get(length=10)
|
|
39
|
+
random_number_string = RandomMaster.number.get(length=10)
|
|
40
|
+
password = RandomMaster.password.get(length=10)
|
|
41
|
+
random_hash = RandomMaster.hash.get(text='give me hash')
|
|
42
|
+
random_number_code = RandomMaster.get_code(length=10, number_flag=True)
|
|
43
|
+
random_string_code = RandomMaster.get_code(length=10, string_flag=True)
|
|
44
|
+
random_symbol_code = RandomMaster.get_code(length=10, symbol_flag=True)
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
***
|
|
49
|
+
|
|
50
|
+
## Disclaimer of liability:
|
|
51
|
+
|
|
52
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
53
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
54
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
55
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
56
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
57
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
58
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
59
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
60
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
61
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
## Copyright:
|
|
66
|
+
--------------------------------------------------------
|
|
67
|
+
Licensed under the terms of the BSD 3-Clause License
|
|
68
|
+
(see LICENSE for details).
|
|
69
|
+
Copyright © 2018-2023, A.A Suvorov
|
|
70
|
+
All rights reserved.
|
|
71
|
+
--------------------------------------------------------
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
setup.cfg
|
|
4
|
+
setup.py
|
|
5
|
+
smartrandom/__init__.py
|
|
6
|
+
smartrandom/random_master.py
|
|
7
|
+
smartrandom.egg-info/PKG-INFO
|
|
8
|
+
smartrandom.egg-info/SOURCES.txt
|
|
9
|
+
smartrandom.egg-info/dependency_links.txt
|
|
10
|
+
smartrandom.egg-info/not-zip-safe
|
|
11
|
+
smartrandom.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
smartrandom
|