bbdd-utils 0.3.2__py3-none-any.whl → 0.3.4__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.
- bbdd_utils/utils.py +5 -3
- {bbdd_utils-0.3.2.dist-info → bbdd_utils-0.3.4.dist-info}/METADATA +1 -1
- bbdd_utils-0.3.4.dist-info/RECORD +7 -0
- bbdd_utils-0.3.2.dist-info/RECORD +0 -7
- {bbdd_utils-0.3.2.dist-info → bbdd_utils-0.3.4.dist-info}/WHEEL +0 -0
- {bbdd_utils-0.3.2.dist-info → bbdd_utils-0.3.4.dist-info}/licenses/LICENSE +0 -0
- {bbdd_utils-0.3.2.dist-info → bbdd_utils-0.3.4.dist-info}/top_level.txt +0 -0
bbdd_utils/utils.py
CHANGED
@@ -40,9 +40,11 @@ def Conector_bbdd(tipo='sqlite', nombre='mi_base_de_datos', host='localhost', pu
|
|
40
40
|
host=host,
|
41
41
|
port=3306,
|
42
42
|
user=usuario,
|
43
|
-
password=password
|
44
|
-
|
45
|
-
)
|
43
|
+
password=password)
|
44
|
+
# Crear la base de datos
|
45
|
+
cursor = conn.cursor()
|
46
|
+
cursor.execute(f"CREATE DATABASE IF NOT EXISTS {nombre}")
|
47
|
+
print(f"Base de datos '{nombre}' creada exitosamente.")
|
46
48
|
return conn
|
47
49
|
|
48
50
|
elif tipo == 'mongodb':
|
@@ -0,0 +1,7 @@
|
|
1
|
+
bbdd_utils/__init__.py,sha256=mjRX7GqWkOJq66KqghZ4MZE0Aai6R89LPeu1mjq4lD4,121
|
2
|
+
bbdd_utils/utils.py,sha256=qVALkcC4iJs5U5pHxBwNwsG5uTvXgQaGdK4nf4CMvRE,4508
|
3
|
+
bbdd_utils-0.3.4.dist-info/licenses/LICENSE,sha256=D4uqg6QX0fapLNcdUznOuGaRIUPnypOdeE2zIyYq7xY,217
|
4
|
+
bbdd_utils-0.3.4.dist-info/METADATA,sha256=3Bgs1cQWsNMUl7exObGT31Uu3YRqgdKuvcj_m6jc5Gg,675
|
5
|
+
bbdd_utils-0.3.4.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
6
|
+
bbdd_utils-0.3.4.dist-info/top_level.txt,sha256=bBGkVkxnOw7tZ2zRcyCM3lgVgYo1hFbcmwkGdKAj9Gk,11
|
7
|
+
bbdd_utils-0.3.4.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
bbdd_utils/__init__.py,sha256=mjRX7GqWkOJq66KqghZ4MZE0Aai6R89LPeu1mjq4lD4,121
|
2
|
-
bbdd_utils/utils.py,sha256=hcnExKE4gxYA-lCTzUu42hePlRPbpPB3yBCl546UM6M,4346
|
3
|
-
bbdd_utils-0.3.2.dist-info/licenses/LICENSE,sha256=D4uqg6QX0fapLNcdUznOuGaRIUPnypOdeE2zIyYq7xY,217
|
4
|
-
bbdd_utils-0.3.2.dist-info/METADATA,sha256=k-tDHjb7wJGiVNPdC7DDAAMiSSbt8tUGiVDu6s7b3bw,675
|
5
|
-
bbdd_utils-0.3.2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
6
|
-
bbdd_utils-0.3.2.dist-info/top_level.txt,sha256=bBGkVkxnOw7tZ2zRcyCM3lgVgYo1hFbcmwkGdKAj9Gk,11
|
7
|
-
bbdd_utils-0.3.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|