Skip to content

Commit 93e4d40

Browse files
committed
request
1 parent 336bd9c commit 93e4d40

15 files changed

Lines changed: 40 additions & 119 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ __pycache__/
22
piencrypt.egg-info/
33
web/
44
piencrypt/__pycache__/
5-
Helper/
5+
Helper/
6+
Test/__pycache__/

Example/binary.txt

9.3 KB
Binary file not shown.

Example/main.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from piencrypt import pie
2+
3+
r = pie.PiEncrypt('pic.png')
4+
5+
r.get_data()
6+
7+
r.hide_data("Hello my name is Sid")
8+
9+
read = r.read_data()
10+
11+
print(read)
12+
13+
r.revert()

Example/pic.png

9.3 KB
Loading

Example/requirements.txt

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

Test/github_test.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from piencrypt import pie
2+
3+
import requests
4+
5+
# api-endpoint
6+
URL = "http://127.0.0.1:4000/test/sid86"
7+
8+
9+
# sending get request and saving the response as response object
10+
r = requests.get(url = URL)
11+
12+
data = r.json()
13+
14+
secret_code = data['PiEncrypt']
15+
16+
if secret_code == '8567a8a617f75a8ea43ce46aa8870dcf184728a58b5d60c7c3c2c83a5543dd76':
17+
test = 'pass'
18+
19+
else:
20+
'test' = 'failed'
21+
with open('pic.jpg', 'rb') as f:
22+
f.read()

Test/pie_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
Texts = ['Hi', 'Solo', 'Sid', 'Test', 'Lily', 'Python', 'Throttlerz', 'Password', 'Good Morning', 'Good Evening']
99

10+
11+
1012
class TestClac(unittest.TestCase):
1113
def test_quantity(self):
1214
for i in range(800):

web/Procfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

web/app.py

Lines changed: 0 additions & 64 deletions
This file was deleted.

web/binary.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)