my-cloud-devops-consulting 0.0.0__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.
Files changed (29) hide show
  1. my_cloud_devops_consulting-0.0.0/MANIFEST.in +3 -0
  2. my_cloud_devops_consulting-0.0.0/PKG-INFO +30 -0
  3. my_cloud_devops_consulting-0.0.0/README.md +3 -0
  4. my_cloud_devops_consulting-0.0.0/app.py +92 -0
  5. my_cloud_devops_consulting-0.0.0/my_cloud_devops_consulting.egg-info/PKG-INFO +30 -0
  6. my_cloud_devops_consulting-0.0.0/my_cloud_devops_consulting.egg-info/SOURCES.txt +27 -0
  7. my_cloud_devops_consulting-0.0.0/my_cloud_devops_consulting.egg-info/dependency_links.txt +1 -0
  8. my_cloud_devops_consulting-0.0.0/my_cloud_devops_consulting.egg-info/requires.txt +4 -0
  9. my_cloud_devops_consulting-0.0.0/my_cloud_devops_consulting.egg-info/top_level.txt +1 -0
  10. my_cloud_devops_consulting-0.0.0/setup.cfg +4 -0
  11. my_cloud_devops_consulting-0.0.0/setup.py +31 -0
  12. my_cloud_devops_consulting-0.0.0/static/css/contact-form.css +206 -0
  13. my_cloud_devops_consulting-0.0.0/static/css/index.css +305 -0
  14. my_cloud_devops_consulting-0.0.0/static/css/login.css +81 -0
  15. my_cloud_devops_consulting-0.0.0/static/css/main.css +41 -0
  16. my_cloud_devops_consulting-0.0.0/static/css/register.css +126 -0
  17. my_cloud_devops_consulting-0.0.0/static/css/services.css +177 -0
  18. my_cloud_devops_consulting-0.0.0/static/images/image.jpg +0 -0
  19. my_cloud_devops_consulting-0.0.0/static/js/index.js +118 -0
  20. my_cloud_devops_consulting-0.0.0/static/js/login.js +42 -0
  21. my_cloud_devops_consulting-0.0.0/static/js/main.js +74 -0
  22. my_cloud_devops_consulting-0.0.0/static/js/register.js +18 -0
  23. my_cloud_devops_consulting-0.0.0/static/js/services.js +78 -0
  24. my_cloud_devops_consulting-0.0.0/templates/contact-form.html +103 -0
  25. my_cloud_devops_consulting-0.0.0/templates/index.html +137 -0
  26. my_cloud_devops_consulting-0.0.0/templates/login.html +72 -0
  27. my_cloud_devops_consulting-0.0.0/templates/register.html +78 -0
  28. my_cloud_devops_consulting-0.0.0/templates/services.html +78 -0
  29. my_cloud_devops_consulting-0.0.0/tests/test_unit_test.py +8 -0
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ recursive-include static *
3
+ recursive-include templates *
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.2
2
+ Name: my-cloud-devops-consulting
3
+ Version: 0.0.0
4
+ Summary: This is my consulting website for Cloud & DevOps services.
5
+ Home-page: https://github.com/Betrand1999/project-root
6
+ Author: Betrand Mutagha
7
+ Author-email: mmutagha@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.6
13
+ Description-Content-Type: text/markdown
14
+ Requires-Dist: Flask>=2.0
15
+ Requires-Dist: pymongo
16
+ Requires-Dist: werkzeug
17
+ Requires-Dist: requests
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: requires-dist
25
+ Dynamic: requires-python
26
+ Dynamic: summary
27
+
28
+ sudo systemctl restart sshd
29
+ 3.235.142.37:8443 # rancher
30
+ 8wf8vg9lwfzddtccxwc6gqw8mzlv7j422t7dfdlt6nqcwn7rjndmk6
@@ -0,0 +1,3 @@
1
+ sudo systemctl restart sshd
2
+ 3.235.142.37:8443 # rancher
3
+ 8wf8vg9lwfzddtccxwc6gqw8mzlv7j422t7dfdlt6nqcwn7rjndmk6
@@ -0,0 +1,92 @@
1
+ from flask import Flask, render_template, request, redirect, url_for, session, flash
2
+ from pymongo import MongoClient
3
+ from werkzeug.security import generate_password_hash, check_password_hash
4
+ from urllib.parse import quote_plus
5
+ import os
6
+
7
+ app = Flask(__name__)
8
+ app.secret_key = os.environ.get('SECRET_KEY', 'your_secret_key') # Secure your secret key with an environment variable
9
+
10
+ # MongoDB Configuration with properly escaped credentials
11
+ username = quote_plus("betrand1999") # add username and pst
12
+ password = quote_plus("Cameroon@10K")
13
+ client = MongoClient(f"mongodb+srv://{username}:{password}@cluster.7plpy.mongodb.net/my-database?retryWrites=true&w=majority")
14
+ db = client['my-database'] # Specify your database as shown in the MongoDB Atlas interface
15
+ users_collection = db['inventory_collection'] # Collection for storing user data
16
+
17
+ @app.route('/')
18
+ def home():
19
+ video_url = None
20
+ if 'username' in session:
21
+ video_url = None # Removed S3 video URL
22
+ return render_template('index.html', video_url=video_url)
23
+
24
+ @app.route('/login', methods=['GET', 'POST'])
25
+ def login():
26
+ if request.method == 'POST':
27
+ username = request.form['username']
28
+ password = request.form['password']
29
+ user = users_collection.find_one({'username': username})
30
+ if user and check_password_hash(user['password'], password):
31
+ session['username'] = username
32
+ flash('Login successful', 'success')
33
+ return redirect(url_for('home'))
34
+ else:
35
+ flash('Invalid username or password', 'error')
36
+ return redirect(url_for('login'))
37
+ return render_template('login.html')
38
+
39
+ @app.route('/register', methods=['GET', 'POST'])
40
+ def register():
41
+ if request.method == 'POST':
42
+ username = request.form['username']
43
+ password = request.form['password']
44
+
45
+ # Check if the user already exists
46
+ existing_user = users_collection.find_one({'username': username})
47
+ if existing_user:
48
+ flash('Username already exists. Please choose a different username.', 'error')
49
+ return redirect(url_for('register'))
50
+
51
+ # Hash the password for security
52
+ hashed_password = generate_password_hash(password)
53
+ user_data = {'username': username, 'password': hashed_password}
54
+ users_collection.insert_one(user_data)
55
+ flash('Successfully registered! Please log in.', 'success')
56
+ return redirect(url_for('login'))
57
+ return render_template('register.html')
58
+
59
+ @app.route('/services')
60
+ def services():
61
+ return render_template('services.html')
62
+
63
+ @app.route('/contact-form', methods=['GET', 'POST'])
64
+ def contact_form():
65
+ if request.method == 'POST':
66
+ name = request.form['name']
67
+ email = request.form['email']
68
+ phone = request.form['phone']
69
+ category = request.form['category']
70
+ appointment = request.form.get('appointment')
71
+ message = request.form['message']
72
+
73
+ # Store the contact data in the database
74
+ contact_data = {
75
+ 'name': name,
76
+ 'email': email,
77
+ 'phone': phone,
78
+ 'category': category,
79
+ 'appointment': appointment,
80
+ 'message': message
81
+ }
82
+ db.contacts.insert_one(contact_data)
83
+
84
+ # Remove the email or SMS notification logic here
85
+ # Simply flash a success message
86
+ flash('Your message has been submitted successfully!', 'success')
87
+
88
+ return redirect(url_for('home'))
89
+ return render_template('contact-form.html')
90
+
91
+ if __name__ == '__main__':
92
+ app.run(debug=True, host='0.0.0.0', port=80)
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.2
2
+ Name: my-cloud-devops-consulting
3
+ Version: 0.0.0
4
+ Summary: This is my consulting website for Cloud & DevOps services.
5
+ Home-page: https://github.com/Betrand1999/project-root
6
+ Author: Betrand Mutagha
7
+ Author-email: mmutagha@gmail.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.6
13
+ Description-Content-Type: text/markdown
14
+ Requires-Dist: Flask>=2.0
15
+ Requires-Dist: pymongo
16
+ Requires-Dist: werkzeug
17
+ Requires-Dist: requests
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: requires-dist
25
+ Dynamic: requires-python
26
+ Dynamic: summary
27
+
28
+ sudo systemctl restart sshd
29
+ 3.235.142.37:8443 # rancher
30
+ 8wf8vg9lwfzddtccxwc6gqw8mzlv7j422t7dfdlt6nqcwn7rjndmk6
@@ -0,0 +1,27 @@
1
+ MANIFEST.in
2
+ README.md
3
+ app.py
4
+ setup.py
5
+ my_cloud_devops_consulting.egg-info/PKG-INFO
6
+ my_cloud_devops_consulting.egg-info/SOURCES.txt
7
+ my_cloud_devops_consulting.egg-info/dependency_links.txt
8
+ my_cloud_devops_consulting.egg-info/requires.txt
9
+ my_cloud_devops_consulting.egg-info/top_level.txt
10
+ static/css/contact-form.css
11
+ static/css/index.css
12
+ static/css/login.css
13
+ static/css/main.css
14
+ static/css/register.css
15
+ static/css/services.css
16
+ static/images/image.jpg
17
+ static/js/index.js
18
+ static/js/login.js
19
+ static/js/main.js
20
+ static/js/register.js
21
+ static/js/services.js
22
+ templates/contact-form.html
23
+ templates/index.html
24
+ templates/login.html
25
+ templates/register.html
26
+ templates/services.html
27
+ tests/test_unit_test.py
@@ -0,0 +1,4 @@
1
+ Flask>=2.0
2
+ pymongo
3
+ werkzeug
4
+ requests
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,31 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='my-cloud-devops-consulting',
5
+ version='0.0.0',
6
+ author='Betrand Mutagha',
7
+ author_email='mmutagha@gmail.com',
8
+ description='This is my consulting website for Cloud & DevOps services.',
9
+ long_description=open('README.md').read(),
10
+ long_description_content_type='text/markdown',
11
+ url='https://github.com/Betrand1999/project-root',
12
+ packages=find_packages(where="."), # Include the root as the package
13
+ py_modules=["app"], # Explicitly include app.py
14
+ include_package_data=True, # Ensures static and template files are included
15
+ package_data={
16
+ "": ["static/**/*", "templates/**/*"], # Include static and templates from the root
17
+ },
18
+ install_requires=[
19
+ 'Flask>=2.0',
20
+ 'pymongo',
21
+ 'werkzeug',
22
+ 'requests',
23
+ ],
24
+ classifiers=[
25
+ 'Programming Language :: Python :: 3',
26
+ 'Programming Language :: Python :: 3.10',
27
+ 'License :: OSI Approved :: MIT License',
28
+ 'Operating System :: OS Independent',
29
+ ],
30
+ python_requires='>=3.6',
31
+ )
@@ -0,0 +1,206 @@
1
+ /* General Styling for the Contact Form Page */
2
+ body {
3
+ background: linear-gradient(
4
+ to right,
5
+ #e3f2fd,
6
+ #bbdefb
7
+ ); /* Subtle gradient background for a modern touch */
8
+ font-family: "Roboto", Arial, sans-serif; /* Updated font for a cleaner look */
9
+ color: #333;
10
+ margin: 0;
11
+ padding: 0;
12
+ animation: backgroundMove 10s infinite alternate;
13
+ }
14
+
15
+ @keyframes backgroundMove {
16
+ 0% {
17
+ background-position: 0% 50%;
18
+ }
19
+ 100% {
20
+ background-position: 100% 50%;
21
+ }
22
+ }
23
+
24
+ /* Header Styling */
25
+ header {
26
+ background: #13ca4d; /* Slightly darker blue for better contrast */
27
+ color: #fff;
28
+ padding: 60px;
29
+ text-align: center;
30
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
31
+ animation: fadeInDown 1.5s ease-in-out;
32
+ }
33
+
34
+ header h1 {
35
+ margin: 0;
36
+ font-size: 2em;
37
+ }
38
+
39
+ nav ul {
40
+ list-style: none;
41
+ padding: 0;
42
+ margin: 10px 0;
43
+ text-align: center;
44
+ }
45
+
46
+ nav ul li {
47
+ display: inline-block;
48
+ margin: 0 10px;
49
+ }
50
+
51
+ nav ul li a {
52
+ color: #fff;
53
+ text-decoration: none;
54
+ padding: 8px 15px;
55
+ border-radius: 5px;
56
+ transition: background 0.3s ease, transform 0.2s ease;
57
+ }
58
+
59
+ nav ul li a:hover {
60
+ background: rgba(255, 255, 255, 0.3);
61
+ transform: scale(1.05);
62
+ }
63
+
64
+ /* Form Styling */
65
+ main {
66
+ padding: 40px;
67
+ animation: fadeInUp 1.5s ease-in-out;
68
+ }
69
+
70
+ h2 {
71
+ text-align: center;
72
+ color: #1976d2;
73
+ margin-bottom: 20px;
74
+ }
75
+
76
+ form {
77
+ max-width: 600px;
78
+ margin: 0 auto;
79
+ padding: 30px;
80
+ background: #fff;
81
+ border: 1px solid #ddd;
82
+ border-radius: 8px;
83
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
84
+ animation: slideIn 1.5s ease-in-out;
85
+ }
86
+
87
+ .form-group {
88
+ margin-bottom: 20px;
89
+ }
90
+
91
+ label {
92
+ display: block;
93
+ margin-bottom: 8px;
94
+ font-weight: bold;
95
+ }
96
+
97
+ input[type="text"],
98
+ input[type="email"],
99
+ input[type="tel"],
100
+ input[type="datetime-local"],
101
+ input[type="file"],
102
+ textarea,
103
+ select {
104
+ width: 100%;
105
+ padding: 12px;
106
+ border: 1px solid #ccc;
107
+ border-radius: 5px;
108
+ margin-top: 5px;
109
+ transition: border-color 0.3s ease;
110
+ font-size: 16px;
111
+ }
112
+
113
+ input[type="text"]:focus,
114
+ input[type="email"]:focus,
115
+ input[type="tel"]:focus,
116
+ input[type="datetime-local"]:focus,
117
+ textarea:focus,
118
+ select:focus {
119
+ border-color: hsl(151, 79%, 46%);
120
+ box-shadow: 0 0 5px rgba(25, 118, 210, 0.3);
121
+ }
122
+
123
+ input[type="submit"] {
124
+ background: hsl(117, 79%, 46%);
125
+ color: white;
126
+ padding: 12px 20px;
127
+ border: none;
128
+ border-radius: 5px;
129
+ cursor: pointer;
130
+ transition: background 0.3s ease, transform 0.2s;
131
+ font-size: 16px;
132
+ }
133
+
134
+ input[type="submit"]:hover {
135
+ background: hsl(118, 79%, 32%);
136
+ transform: translateY(-2px);
137
+ }
138
+
139
+ input[type="submit"]:active {
140
+ background: #80d27d;
141
+ transform: translateY(0);
142
+ }
143
+
144
+ /* Footer Styling */
145
+ footer {
146
+ text-align: center;
147
+ padding: 15px;
148
+ background: #18b74d;
149
+ color: #fff;
150
+ margin-top: 40px;
151
+ animation: fadeIn 2.5s ease-in-out;
152
+ box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
153
+ }
154
+
155
+ footer a {
156
+ color: #ffe082;
157
+ text-decoration: none;
158
+ transition: color 0.3s ease;
159
+ }
160
+
161
+ footer a:hover {
162
+ color: #fff;
163
+ }
164
+
165
+ /* Keyframe Animations */
166
+ @keyframes fadeIn {
167
+ from {
168
+ opacity: 0;
169
+ }
170
+ to {
171
+ opacity: 1;
172
+ }
173
+ }
174
+
175
+ @keyframes fadeInDown {
176
+ from {
177
+ opacity: 0;
178
+ transform: translateY(-20px);
179
+ }
180
+ to {
181
+ opacity: 1;
182
+ transform: translateY(0);
183
+ }
184
+ }
185
+
186
+ @keyframes fadeInUp {
187
+ from {
188
+ opacity: 0;
189
+ transform: translateY(20px);
190
+ }
191
+ to {
192
+ opacity: 1;
193
+ transform: translateY(0);
194
+ }
195
+ }
196
+
197
+ @keyframes slideIn {
198
+ from {
199
+ opacity: 0;
200
+ transform: translateX(-50px);
201
+ }
202
+ to {
203
+ opacity: 1;
204
+ transform: translateX(0);
205
+ }
206
+ }