Skip to content

Commit da6d080

Browse files
author
CosmoSt4r
committed
Readme for Pypi added
1 parent 7b803dc commit da6d080

File tree

8 files changed

+163
-4
lines changed

8 files changed

+163
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ check_it('qwerty')
6464
**check_it** method has the following parameters:
6565
* **password** - (string)
6666
* **check_type** - (string). *Optional*. There are 2 check types: strength and valid. Default: *strength*
67-
- *strength* check type will return number 0-100 indicating strength of your password. If strength more than 30 then the password is good.If strength more than 50 then the password is strong.
67+
- *strength* check type will return number indicating strength of your password. If strength more than 10 then the password is strong.
6868
- *valid* check type will return True or False whether password has 'stop chars' or not. You have to specify *stop_chars* to use this check type.
6969
* **stop_chars** - (string). *Optional*. Use to specify stop characters to check your password for validity.
7070

dist/pypasswords-0.3.tar.gz

1.95 KB
Binary file not shown.

pypasswords.egg-info/PKG-INFO

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
Metadata-Version: 2.1
2+
Name: pypasswords
3+
Version: 0.3
4+
Summary: Working with passwords made simple
5+
Home-page: https://github.com/CosmoSt4r/pypasswords
6+
Author: CosmoStar
7+
Author-email: JustCosmos@yandex.ru
8+
License: MIT
9+
Download-URL: https://github.com/CosmoSt4r/pypasswords/archive/v_03.tar.gz
10+
Description: # Pypasswords - work with passwords easily.
11+
12+
Pypasswords provides easy hashing, checking and generating passwords for you.
13+
14+
# Overview
15+
16+
- Hash passwords using your favourite hashing algorithms
17+
- Check passwords for strength or validity
18+
- Generate passwords with your own parameters
19+
20+
## Installation
21+
22+
To install this package you can use Pypi via pip
23+
24+
```
25+
$ pip install pypasswords
26+
```
27+
28+
## Usage
29+
30+
First you need to import all methods from this package
31+
32+
```py
33+
from pypasswords import hash_it, check_it, generate_it
34+
```
35+
... or simply
36+
37+
```py
38+
from pypasswords import *
39+
```
40+
41+
#### Hashing
42+
43+
You can easily hash your password with just one line of code:
44+
45+
```py
46+
hash_it('qwerty')
47+
```
48+
49+
**hash_it** method has the following parameters:
50+
* **password** - (string)
51+
* **hash_type** - (string). *Optional*. Use to specify hashing algorithm. Default: *sha-256*
52+
* **salting** - (bool). *Optional*. Use to specify whether to use salt or not. More [here](https://en.wikipedia.org/wiki/Salt_(cryptography)). Default: *False*. Warning: if you specify salt=*True* then the method will generate random salt and return both the hash and the salt.
53+
* **static_salt** - (string). *Optional*. Use to specify your own salt.
54+
* **salt_length** - (int). *Optional*. Use to specify the length of the salt. Default: *6*
55+
* **local_parameter** - (string). *Optional*. Use to specify local parameter. More [here](https://www.openwall.com/presentations/YaC2012-Password-Hashing-At-Scale/mgp00005.html).
56+
57+
##### Examples:
58+
59+
```py
60+
hash_it('qwerty', hash_type='sha512')
61+
hash_it('qwerty', salting=True, static_salt='some_word')
62+
hash_it('qwerty', salting=True, salt_length=10, local_parameter='word')
63+
```
64+
65+
#### Checking
66+
67+
You can check your password for strength or validity:
68+
69+
```py
70+
check_it('qwerty')
71+
```
72+
73+
**check_it** method has the following parameters:
74+
* **password** - (string)
75+
* **check_type** - (string). *Optional*. There are 2 check types: strength and valid. Default: *strength*
76+
- *strength* check type will return number indicating strength of your password. If strength more than 10 then the password is strong.
77+
- *valid* check type will return True or False whether password has 'stop chars' or not. You have to specify *stop_chars* to use this check type.
78+
* **stop_chars** - (string). *Optional*. Use to specify stop characters to check your password for validity.
79+
80+
##### Examples:
81+
82+
```py
83+
check_it('123some-password321')
84+
check_it('qwerty', check_type='valid', stop_chars='0123456789')
85+
```
86+
87+
#### Generating
88+
89+
You can generate password with your own parameters:
90+
91+
```py
92+
generate_it()
93+
```
94+
95+
**generate_it** method has the following parameters:
96+
* **strength** - (int). *Optional*. Defalut: *2*
97+
- **1** - *low*. Using letters only.
98+
- **2** - *medium*. Using letters and numbers.
99+
- **3** - *high*. Using letters, numbers and symbols.
100+
* **length** - (int). *Optional*. Use to specify password length. Default: *12*
101+
102+
##### Examples:
103+
104+
```py
105+
generate_it(strength=2)
106+
generate_it(strength=3, length=3)
107+
```
108+
109+
License
110+
----
111+
112+
MIT
113+
114+
#
115+
Pypasswords uses one open source package to work properly:
116+
117+
* [zxcvbn](https://github.com/dropbox/zxcvbn) - password strength estimator
118+
119+
And of course **pypasswords** itself is open source with a [public repository](https://github.com/CosmoSt4r/pypasswords)
120+
on GitHub.
121+
Keywords: password,passwords,check,hash,simple
122+
Platform: UNKNOWN
123+
Classifier: Development Status :: 4 - Beta
124+
Classifier: Intended Audience :: Developers
125+
Classifier: Topic :: Software Development :: Build Tools
126+
Classifier: Topic :: Security :: Cryptography
127+
Classifier: License :: OSI Approved :: MIT License
128+
Classifier: Programming Language :: Python :: 3
129+
Classifier: Programming Language :: Python :: 3.4
130+
Classifier: Programming Language :: Python :: 3.5
131+
Classifier: Programming Language :: Python :: 3.6
132+
Classifier: Programming Language :: Python :: 3.7
133+
Description-Content-Type: text/markdown

pypasswords.egg-info/SOURCES.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
README.md
2+
setup.cfg
3+
setup.py
4+
pypasswords/__init__.py
5+
pypasswords/config.py
6+
pypasswords/main.py
7+
pypasswords.egg-info/PKG-INFO
8+
pypasswords.egg-info/SOURCES.txt
9+
pypasswords.egg-info/dependency_links.txt
10+
pypasswords.egg-info/requires.txt
11+
pypasswords.egg-info/top_level.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

pypasswords.egg-info/requires.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
zxcvbn

pypasswords.egg-info/top_level.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pypasswords

setup.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
from distutils.core import setup
2+
from setuptools import setup
3+
4+
# read the contents of your README file
5+
from os import path
6+
this_directory = path.abspath(path.dirname(__file__))
7+
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
8+
long_description = f.read()
9+
10+
211
setup(
312
name = 'pypasswords',
413
packages = ['pypasswords'],
5-
version = '0.3',
14+
version = '0.4',
615
license='MIT',
7-
description = 'Working with passwords made simple',
16+
description = 'Working with passwords made simple',
17+
long_description=long_description,
18+
long_description_content_type='text/markdown',
819
author = 'CosmoStar',
920
author_email = 'JustCosmos@yandex.ru',
1021
url = 'https://github.com/CosmoSt4r/pypasswords',
11-
download_url = 'https://github.com/CosmoSt4r/pypasswords/archive/v_03.tar.gz',
22+
download_url = 'https://github.com/CosmoSt4r/pypasswords/archive/v_04.tar.gz',
1223
keywords = ['password', 'passwords', 'check', 'hash', 'simple'],
1324
install_requires=[
1425
'zxcvbn',
@@ -19,6 +30,7 @@
1930

2031
'Intended Audience :: Developers',
2132
'Topic :: Software Development :: Build Tools',
33+
'Topic :: Security :: Cryptography',
2234

2335
'License :: OSI Approved :: MIT License',
2436

0 commit comments

Comments
 (0)