hack4u-v035 0.1.0__py3-none-any.whl

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.
hack4u/__init__.py ADDED
@@ -0,0 +1,2 @@
1
+ from .courses import *
2
+ from .utils import *
hack4u/courses.py ADDED
@@ -0,0 +1,29 @@
1
+ class Course:
2
+
3
+ def __init__(self, name, duration, link):
4
+ self.name = name
5
+ self.duration = duration
6
+ self.link = link
7
+
8
+ def __repr__(self): # mejor que __str__
9
+ return f"{self.name} [{self.duration}] ({self.link})"
10
+
11
+
12
+ courses = [
13
+ Course("Introduccion a Linux", 15, "https://hack4u.io/curso/introduccion-a-linux"),
14
+ Course("Personalizacion de Linux", 3, "https://hack4u.io/curso/personalizacion-de-entorno-en-linux"),
15
+ Course("Introduccion al Hacking", 53, "https://hack4u.io/curso/introduccion-al-hacking")
16
+ ]
17
+
18
+ def list_courses():
19
+ for course in courses:
20
+ print(course)
21
+
22
+ def search_course_by_name(name):
23
+ for course in courses:
24
+ if course.name == name:
25
+ return course
26
+
27
+ return None
28
+
29
+
hack4u/utils.py ADDED
@@ -0,0 +1,4 @@
1
+ from .courses import courses
2
+
3
+ def total_duration():
4
+ return sum(course.duration for course in courses)
@@ -0,0 +1,15 @@
1
+ Metadata-Version: 2.4
2
+ Name: hack4u-v035
3
+ Version: 0.1.0
4
+ Summary: Biblioteca para consulta cursos de hack4u
5
+ Home-page: https://hack4u.io
6
+ Author: VexedElm035
7
+ Description-Content-Type: text/markdown
8
+ Dynamic: author
9
+ Dynamic: description
10
+ Dynamic: description-content-type
11
+ Dynamic: home-page
12
+ Dynamic: summary
13
+
14
+ Biblioteca en python para Hack4u
15
+ Proyecto realizado como seguimiento de curso de python
@@ -0,0 +1,7 @@
1
+ hack4u/__init__.py,sha256=lU2wv6ZE5SaWS5IRojgQ1BJNlbPdVP-It2n8qaZabX4,44
2
+ hack4u/courses.py,sha256=Ms3Uac-ln0cST9Q6oSIJtSNJdXS2TF7ib2oYpsmNwR4,774
3
+ hack4u/utils.py,sha256=3q8Q1kPVy7paBQK0CS91OfJTPqCbN2J3MoJbTTGf5hE,106
4
+ hack4u_v035-0.1.0.dist-info/METADATA,sha256=RMXQvBwMC_fAikFe2Vro9pXiH8CW17XeNHAeM48tgAo,391
5
+ hack4u_v035-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
6
+ hack4u_v035-0.1.0.dist-info/top_level.txt,sha256=wDTJIbghmICH1q1iFNdtSlVqtOfw_ymrZ-juQGvORa8,7
7
+ hack4u_v035-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ hack4u