bbdd-utils 0.3.13__tar.gz → 0.3.14__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bbdd_utils
3
- Version: 0.3.13
3
+ Version: 0.3.14
4
4
  Summary: insertar datos en una base de datos SQL o NoSQL
5
5
  Author: Luis_J_Domingo
6
6
  Description-Content-Type: text/markdown
@@ -18,7 +18,9 @@ def Conector_bbdd(tipo='sqlite', nombre='mi_base_de_datos', host='localhost', pu
18
18
  import os
19
19
  nombre_db = f"{nombre}.db"
20
20
  conn = sqlite3.connect(nombre_db)
21
+ print(f"Base de datos SQLite '{nombre_db}' creada exitosamente.")
21
22
  return conn
23
+
22
24
 
23
25
  elif tipo == 'mysql':
24
26
  import mysql.connector
@@ -30,7 +32,7 @@ def Conector_bbdd(tipo='sqlite', nombre='mi_base_de_datos', host='localhost', pu
30
32
  # Crear la base de datos
31
33
  cursor = conn.cursor()
32
34
  cursor.execute(f"CREATE DATABASE IF NOT EXISTS {nombre}")
33
- print(f"Base de datos '{nombre}' creada exitosamente.")
35
+ print(f"Base de datos Mysql '{nombre}' creada exitosamente.")
34
36
  return conn
35
37
 
36
38
  elif tipo == 'mongodb':
@@ -41,7 +43,7 @@ def Conector_bbdd(tipo='sqlite', nombre='mi_base_de_datos', host='localhost', pu
41
43
  port=puerto,
42
44
  username=usuario,
43
45
  password=password)
44
- print("Conectado a MongoDB")
46
+ print(f"Conexión exitosa a MongoDB en {host}:{puerto}.")
45
47
  return cliente[nombre]
46
48
 
47
49
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bbdd_utils
3
- Version: 0.3.13
3
+ Version: 0.3.14
4
4
  Summary: insertar datos en una base de datos SQL o NoSQL
5
5
  Author: Luis_J_Domingo
6
6
  Description-Content-Type: text/markdown
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='bbdd_utils',
5
- version='0.3.13',
5
+ version='0.3.14',
6
6
  packages=find_packages(),
7
7
  install_requires=[],
8
8
  author='Luis_J_Domingo',
File without changes
File without changes
File without changes
File without changes