summaryrefslogtreecommitdiff
path: root/python-random-password-generator.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-random-password-generator.spec')
-rw-r--r--python-random-password-generator.spec384
1 files changed, 384 insertions, 0 deletions
diff --git a/python-random-password-generator.spec b/python-random-password-generator.spec
new file mode 100644
index 0000000..6f070df
--- /dev/null
+++ b/python-random-password-generator.spec
@@ -0,0 +1,384 @@
+%global _empty_manifest_terminate_build 0
+Name: python-random-password-generator
+Version: 2.2.0
+Release: 1
+Summary: Simple and custom random password generator for python
+License: MIT
+URL: https://github.com/suryasr007/random-password-generator
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d6/ae/cef95522c149cdedbcccb2f3c9b16e72d56c8445268e88cd6ce1c648f5cb/random-password-generator-2.2.0.tar.gz
+BuildArch: noarch
+
+
+%description
+# Random password Generator
+[![PyPI version](https://img.shields.io/badge/PYPI-V%202.2.0-blue.svg)](https://pypi.org/project/random-password-generator)
+[![Build Status](https://travis-ci.org/suryasr007/random-password-generator.svg?branch=master)](https://travis-ci.org/suryasr007/random-password-generator)
+
+#### A minimal and custom random password generator.
+ * No dependencies.
+ * Generate a simple password of default length 6-16.
+ * Generate a password with custom properties.
+ * Generate a password from given characters.
+ * Generate Non Duplicate Password.
+ * Available at https://random-pg.herokuapp.com/ (API and WEB versions are available @ https://github.com/suryasr007/rpg-web repo)
+
+### [NOTICE] API and WEB versions are now moved to https://github.com/suryasr007/rpg-web
+
+## Usage
+ * Install the package.
+ * Import the package.
+ * Create an instance
+ * Modify the default properties. (Optional)
+ * Generate the password (Default length of password 6-16 unless specified via properties).
+
+``` bash
+ pip install random-password-generator
+```
+
+``` python
+ from password_generator import PasswordGenerator
+
+ pwo = PasswordGenerator()
+ pwo.generate()
+```
+
+
+## Configuration
+
+| property | Description | Default |
+| ---------- |------------------------------------------------------| ------- |
+| minlen | Minimum length of the password | 6 |
+| maxlen | Maximum length of the password | 16 |
+| minuchars | Minimum upper case characters required in password | 1 |
+| minlchars | Minimum lower case characters required in password | 1 |
+| minnumbers | Minimum numbers required in password | 1 |
+| minschars | Minimum special characters in the password | 1 |
+
+
+## Update V2.2.0
+Application is now minimal(No dependencies). The API and WEB version are moved to https://github.com/suryasr007/rpg-web
+
+## Update V2.1.0
+Application uses [secrets](https://docs.python.org/3/library/secrets.html) module instead of `random` module on Python environments above 3.6.
+
+## Update V1.1.0
+From version 1.1.0, Characters can be excluded from the required password by setting the properties on PasswordGenerator object
+
+example:
+``` python
+ pwo = PasswordGenerator()
+
+ pwo.excludeuchars = "ABCDEFTUVWXY" # (Optional)
+ pwo.excludelchars = "abcdefghijkl" # (Optional)
+ pwo.excludenumbers = "012345" # (Optional)
+ pwo.excludeschars = "!$%^" # (Optional)
+```
+
+
+## Generate a custom password
+``` python
+ pwo = PasswordGenerator()
+
+ # All properties are optional
+ pwo.minlen = 30 # (Optional)
+ pwo.maxlen = 30 # (Optional)
+ pwo.minuchars = 2 # (Optional)
+ pwo.minlchars = 3 # (Optional)
+ pwo.minnumbers = 1 # (Optional)
+ pwo.minschars = 1 # (Optional)
+
+ pwo.generate()
+```
+
+## Generate a password from given characters
+``` python
+ pwo = PasswordGenerator()
+
+ # It takes two arguments
+ # required characters and length of required password
+ pwo.shuffle_password('sdafasdf#@&^#&234u8', 20)
+```
+
+## Generate Non Duplicate Password
+``` python
+ pwo = PasswordGenerator()
+
+ # length of required password
+ pwo.non_duplicate_password(20)
+```
+
+## Contributions
+Contributions are welcomed via PR.
+
+## License
+ * [MIT](LICENSE)
+
+
+
+
+%package -n python3-random-password-generator
+Summary: Simple and custom random password generator for python
+Provides: python-random-password-generator
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-random-password-generator
+# Random password Generator
+[![PyPI version](https://img.shields.io/badge/PYPI-V%202.2.0-blue.svg)](https://pypi.org/project/random-password-generator)
+[![Build Status](https://travis-ci.org/suryasr007/random-password-generator.svg?branch=master)](https://travis-ci.org/suryasr007/random-password-generator)
+
+#### A minimal and custom random password generator.
+ * No dependencies.
+ * Generate a simple password of default length 6-16.
+ * Generate a password with custom properties.
+ * Generate a password from given characters.
+ * Generate Non Duplicate Password.
+ * Available at https://random-pg.herokuapp.com/ (API and WEB versions are available @ https://github.com/suryasr007/rpg-web repo)
+
+### [NOTICE] API and WEB versions are now moved to https://github.com/suryasr007/rpg-web
+
+## Usage
+ * Install the package.
+ * Import the package.
+ * Create an instance
+ * Modify the default properties. (Optional)
+ * Generate the password (Default length of password 6-16 unless specified via properties).
+
+``` bash
+ pip install random-password-generator
+```
+
+``` python
+ from password_generator import PasswordGenerator
+
+ pwo = PasswordGenerator()
+ pwo.generate()
+```
+
+
+## Configuration
+
+| property | Description | Default |
+| ---------- |------------------------------------------------------| ------- |
+| minlen | Minimum length of the password | 6 |
+| maxlen | Maximum length of the password | 16 |
+| minuchars | Minimum upper case characters required in password | 1 |
+| minlchars | Minimum lower case characters required in password | 1 |
+| minnumbers | Minimum numbers required in password | 1 |
+| minschars | Minimum special characters in the password | 1 |
+
+
+## Update V2.2.0
+Application is now minimal(No dependencies). The API and WEB version are moved to https://github.com/suryasr007/rpg-web
+
+## Update V2.1.0
+Application uses [secrets](https://docs.python.org/3/library/secrets.html) module instead of `random` module on Python environments above 3.6.
+
+## Update V1.1.0
+From version 1.1.0, Characters can be excluded from the required password by setting the properties on PasswordGenerator object
+
+example:
+``` python
+ pwo = PasswordGenerator()
+
+ pwo.excludeuchars = "ABCDEFTUVWXY" # (Optional)
+ pwo.excludelchars = "abcdefghijkl" # (Optional)
+ pwo.excludenumbers = "012345" # (Optional)
+ pwo.excludeschars = "!$%^" # (Optional)
+```
+
+
+## Generate a custom password
+``` python
+ pwo = PasswordGenerator()
+
+ # All properties are optional
+ pwo.minlen = 30 # (Optional)
+ pwo.maxlen = 30 # (Optional)
+ pwo.minuchars = 2 # (Optional)
+ pwo.minlchars = 3 # (Optional)
+ pwo.minnumbers = 1 # (Optional)
+ pwo.minschars = 1 # (Optional)
+
+ pwo.generate()
+```
+
+## Generate a password from given characters
+``` python
+ pwo = PasswordGenerator()
+
+ # It takes two arguments
+ # required characters and length of required password
+ pwo.shuffle_password('sdafasdf#@&^#&234u8', 20)
+```
+
+## Generate Non Duplicate Password
+``` python
+ pwo = PasswordGenerator()
+
+ # length of required password
+ pwo.non_duplicate_password(20)
+```
+
+## Contributions
+Contributions are welcomed via PR.
+
+## License
+ * [MIT](LICENSE)
+
+
+
+
+%package help
+Summary: Development documents and examples for random-password-generator
+Provides: python3-random-password-generator-doc
+%description help
+# Random password Generator
+[![PyPI version](https://img.shields.io/badge/PYPI-V%202.2.0-blue.svg)](https://pypi.org/project/random-password-generator)
+[![Build Status](https://travis-ci.org/suryasr007/random-password-generator.svg?branch=master)](https://travis-ci.org/suryasr007/random-password-generator)
+
+#### A minimal and custom random password generator.
+ * No dependencies.
+ * Generate a simple password of default length 6-16.
+ * Generate a password with custom properties.
+ * Generate a password from given characters.
+ * Generate Non Duplicate Password.
+ * Available at https://random-pg.herokuapp.com/ (API and WEB versions are available @ https://github.com/suryasr007/rpg-web repo)
+
+### [NOTICE] API and WEB versions are now moved to https://github.com/suryasr007/rpg-web
+
+## Usage
+ * Install the package.
+ * Import the package.
+ * Create an instance
+ * Modify the default properties. (Optional)
+ * Generate the password (Default length of password 6-16 unless specified via properties).
+
+``` bash
+ pip install random-password-generator
+```
+
+``` python
+ from password_generator import PasswordGenerator
+
+ pwo = PasswordGenerator()
+ pwo.generate()
+```
+
+
+## Configuration
+
+| property | Description | Default |
+| ---------- |------------------------------------------------------| ------- |
+| minlen | Minimum length of the password | 6 |
+| maxlen | Maximum length of the password | 16 |
+| minuchars | Minimum upper case characters required in password | 1 |
+| minlchars | Minimum lower case characters required in password | 1 |
+| minnumbers | Minimum numbers required in password | 1 |
+| minschars | Minimum special characters in the password | 1 |
+
+
+## Update V2.2.0
+Application is now minimal(No dependencies). The API and WEB version are moved to https://github.com/suryasr007/rpg-web
+
+## Update V2.1.0
+Application uses [secrets](https://docs.python.org/3/library/secrets.html) module instead of `random` module on Python environments above 3.6.
+
+## Update V1.1.0
+From version 1.1.0, Characters can be excluded from the required password by setting the properties on PasswordGenerator object
+
+example:
+``` python
+ pwo = PasswordGenerator()
+
+ pwo.excludeuchars = "ABCDEFTUVWXY" # (Optional)
+ pwo.excludelchars = "abcdefghijkl" # (Optional)
+ pwo.excludenumbers = "012345" # (Optional)
+ pwo.excludeschars = "!$%^" # (Optional)
+```
+
+
+## Generate a custom password
+``` python
+ pwo = PasswordGenerator()
+
+ # All properties are optional
+ pwo.minlen = 30 # (Optional)
+ pwo.maxlen = 30 # (Optional)
+ pwo.minuchars = 2 # (Optional)
+ pwo.minlchars = 3 # (Optional)
+ pwo.minnumbers = 1 # (Optional)
+ pwo.minschars = 1 # (Optional)
+
+ pwo.generate()
+```
+
+## Generate a password from given characters
+``` python
+ pwo = PasswordGenerator()
+
+ # It takes two arguments
+ # required characters and length of required password
+ pwo.shuffle_password('sdafasdf#@&^#&234u8', 20)
+```
+
+## Generate Non Duplicate Password
+``` python
+ pwo = PasswordGenerator()
+
+ # length of required password
+ pwo.non_duplicate_password(20)
+```
+
+## Contributions
+Contributions are welcomed via PR.
+
+## License
+ * [MIT](LICENSE)
+
+
+
+
+%prep
+%autosetup -n random-password-generator-2.2.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-random-password-generator -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 2.2.0-1
+- Package Spec generated