hack4u-cli 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,26 @@
1
+ class Course:
2
+ def __init__(self, name, duration, link):
3
+ self.name = name
4
+ self.duration = duration
5
+ self.link = link
6
+
7
+ def __repr__(self):
8
+ return f"{self.name} [{self.duration} horas] ({self.link})"
9
+
10
+ courses = [
11
+ Course("Introducción a Linux", 15, "https://hack4u.io/curso/introduccion-a-linux/"),
12
+ Course("Personalización de Linux", 3, "https://hack4u.io/curso/personalizacion-de-entorno-en-linux/"),
13
+ Course("Python Ofensivo", 35, "https://hack4u.io/curso/python-ofensivo/"),
14
+ Course("Introducción al Hacking", 53, "https://hack4u.io/curso/introduccion-al-hacking/"),
15
+ Course("Hacking Web", 51, "https://hack4u.io/curso/hacking-web/")
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
+ return None
hack4u/utils.py ADDED
@@ -0,0 +1,4 @@
1
+ from .courses import courses
2
+
3
+ def total_duration():
4
+ return f"Duración total: {sum(course.duration for course in courses)} horas"
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.4
2
+ Name: hack4u-cli
3
+ Version: 0.1.0
4
+ Summary: Una biblioteca para consultar cursos de hack4u
5
+ Home-page: https://hack4u.io
6
+ Author: Ivan Trilla
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
+ # Hack4U Academy Courses Library
15
+
16
+ Una biblioteca Python para consultar cursos de la academia Hack4U.
17
+
18
+ ## Cursos disponibles:
19
+
20
+ - Introducción a Linux [15 horas]
21
+ - Personalización de Linux [3 horas]
22
+ - Python Ofensivo [35 horas]
23
+ - Introducción al Hacking [53 horas]
24
+ - Hacking Web [51 horas]
25
+
26
+ ## Instalación
27
+
28
+ Instala el paquete usando `pip3`:
29
+
30
+ ```python
31
+ pip3 install hack4u
32
+ ```
33
+
34
+ ## Uso básico
35
+
36
+ ### Listar todos los cursos
37
+
38
+ ```python
39
+ from hack4u import list_courses
40
+
41
+ for course in list_courses():
42
+ print(course)
43
+ ```
44
+
45
+ ### Obtener un curso por nombre
46
+
47
+ ```python
48
+ from hack4u import get_course_by_name
49
+
50
+ course = get_course_by_name("Introducción a Linux")
51
+ print(course)
52
+ ```
53
+
54
+ ### Calcular duración total de los cursos
55
+
56
+ ```python
57
+ from hack4u.utils import total_duration
58
+
59
+ print(f"Duración total: {total_duration()} horas")
60
+ ```
@@ -0,0 +1,7 @@
1
+ hack4u/__init__.py,sha256=lU2wv6ZE5SaWS5IRojgQ1BJNlbPdVP-It2n8qaZabX4,44
2
+ hack4u/courses.py,sha256=BqfGKx2Qf_gKpBkv0qLiTPAYwZL05GJg-bu78YFlwR8,899
3
+ hack4u/utils.py,sha256=8C-w81Dso-C6591DATvnV0QAhj5XGhyoeobZdZTYkv0,134
4
+ hack4u_cli-0.1.0.dist-info/METADATA,sha256=B4EYhKBePJGHLFEpL72XDmqAwRl2ZJUKKjLAMe7vk18,1133
5
+ hack4u_cli-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
6
+ hack4u_cli-0.1.0.dist-info/top_level.txt,sha256=wDTJIbghmICH1q1iFNdtSlVqtOfw_ymrZ-juQGvORa8,7
7
+ hack4u_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ hack4u