bbdd-utils 0.3.5__tar.gz → 0.3.6__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.
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/PKG-INFO +2 -2
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/bbdd_utils/utils.py +5 -3
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/bbdd_utils.egg-info/PKG-INFO +2 -2
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/setup.py +2 -2
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/LICENSE +0 -0
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/README.md +0 -0
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/bbdd_utils/__init__.py +0 -0
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/bbdd_utils.egg-info/SOURCES.txt +0 -0
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/bbdd_utils.egg-info/dependency_links.txt +0 -0
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/bbdd_utils.egg-info/top_level.txt +0 -0
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/pyproject.toml +0 -0
- {bbdd_utils-0.3.5 → bbdd_utils-0.3.6}/setup.cfg +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: bbdd_utils
|
3
|
-
Version: 0.3.
|
4
|
-
Summary:
|
3
|
+
Version: 0.3.6
|
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
|
7
7
|
License-File: LICENSE
|
@@ -76,6 +76,8 @@ def Cerrar_conexion(conn):
|
|
76
76
|
|
77
77
|
def Insert(conn, data):
|
78
78
|
# Verifica el tipo de base de datos con la que estamos trabajando
|
79
|
+
############# SQLite ################
|
80
|
+
import sqlite3
|
79
81
|
if isinstance(conn, sqlite3.Connection):
|
80
82
|
print("Conexión exitosa a la base de datos SQL.")
|
81
83
|
# Si estamos usando SQLite, podemos trabajar con la conexión de esta manera
|
@@ -90,7 +92,8 @@ def Insert(conn, data):
|
|
90
92
|
resultados = cursor.fetchall()
|
91
93
|
for fila in resultados:
|
92
94
|
print(f"ID: {fila[0]}, Nombre: {fila[1]}, Edad: {fila[2]}")
|
93
|
-
|
95
|
+
|
96
|
+
############# MySQL ################
|
94
97
|
elif isinstance(conn, mysql.connector.connection.MySQLConnection):
|
95
98
|
print("Conexión exitosa a la base de datos MySQL.")
|
96
99
|
# Si estamos usando MySQL, podemos trabajar con la conexión de esta manera
|
@@ -106,8 +109,7 @@ def Insert(conn, data):
|
|
106
109
|
for fila in resultados:
|
107
110
|
print(f"ID: {fila[0]}, Nombre: {fila[1]}, Edad: {fila[2]}")
|
108
111
|
|
109
|
-
|
110
|
-
|
112
|
+
############# MongoDB ################
|
111
113
|
elif isinstance(conn, Database):
|
112
114
|
print("Conexión exitosa a la base de datos NoSQL.")
|
113
115
|
print(conn)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: bbdd_utils
|
3
|
-
Version: 0.3.
|
4
|
-
Summary:
|
3
|
+
Version: 0.3.6
|
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
|
7
7
|
License-File: LICENSE
|
@@ -2,11 +2,11 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='bbdd_utils',
|
5
|
-
version='0.3.
|
5
|
+
version='0.3.6',
|
6
6
|
packages=find_packages(),
|
7
7
|
install_requires=[],
|
8
8
|
author='Luis_J_Domingo',
|
9
|
-
description='
|
9
|
+
description='insertar datos en una base de datos SQL o NoSQL',
|
10
10
|
long_description=open('README.md').read(),
|
11
11
|
long_description_content_type='text/markdown',
|
12
12
|
# url='https://github.com/tuusuario/milibreria', # si usas GitHub
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|