Skip to content

Resolves issue #3 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: python
python:
- "3.4"
- "3.5"
- "3.6"
# command to install dependencies
install:
- pip install .
# command to run tests
script:
- pytest tests/*.py
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ git clone https://github.com/ismailtasdelen/Python-Randon-Password-Generator.git
```
git clone [email protected]:ismailtasdelen/Python-Randon-Password-Generator.git
```

## Run pip3 install to set up this script
```
pip3 install .
```

## Generating a password via following command
```
python3 run.py
```
4 changes: 3 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# -*- conding:utf-8 -*-

import os
from source import rpg

## Running
os.system("python source/rpg.py")
rpg.random_password_generator_ico()
print("Password : " + rpg.random_password_generator())
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-

from setuptools import setup

setup(name='rpg',
version='0.1',
description='Python - Random Password Generator ( R.P.G. )',
url='https://github.com/ismailtasdelen/Python-Random-Password-Generator',
author='İSMAİL TAŞDELEN',
author_email='[email protected]',
license='MIT',
packages=['source'],
python_requires=">=3",
zip_safe=False)
15 changes: 6 additions & 9 deletions source/rpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
import string
import random

def random_password_genertor():
def random_password_generator():
chars = string.ascii_uppercase + string.ascii_lowercase + string.digits
size = 8
return ''.join(random.choice(chars) for x in range(size,20))
return ''.join(random.choice(chars) for x in range(size, 20))

def random_password_genertor_ico():
random_password_genertor_ico = """
def random_password_generator_ico():
random_password_generator_ico = """
#############################################################
# PYTHON - Random Password Generetor (RPG) - GH0ST S0FTWARE #
#############################################################
#############################################################
# CONTACT #
#############################################################
# DEVELOPER : İSMAİL TAŞDELEN #
Expand All @@ -22,7 +22,4 @@ def random_password_genertor_ico():
# Whatsapp : + 90 534 295 94 31 #
#############################################################
"""
print random_password_genertor_ico

random_password_genertor_ico()
print("Password : " + random_password_genertor())
print(random_password_generator_ico)
12 changes: 12 additions & 0 deletions tests/rpg_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding:utf-8 -*-

import unittest

from source import rpg

class rpg_test(unittest.TestCase):
def test_random_password_generator(self):
result_password = len(rpg.random_password_generator())

self.assertGreaterEqual(result_password, 8)
self.assertLessEqual(result_password, 20)