manage-sql 0.6.0.dev907__tar.gz → 0.6.2__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.1
2
2
  Name: manage-sql
3
- Version: 0.6.0.dev907
3
+ Version: 0.6.2
4
4
  Summary: Biblioteca Python para gestão de bases de dados SQLite, MYSQL e PostgreSQL com maior eficiência
5
5
  Home-page: https://github.com/webtechmoz/manage-sql.git
6
6
  Author: Web Tech Moz
@@ -32,7 +32,7 @@ class SQLITE:
32
32
  ```
33
33
  '''
34
34
 
35
- def __init__(self, nomeBanco: str, path: str = None):
35
+ def __init__(self, nomeBanco: str, path: str = ''):
36
36
  """
37
37
  Inicializa a classe com o nome do banco de dados.
38
38
 
@@ -63,24 +63,29 @@ class SQLITE:
63
63
  database, cursor = db.conectarBanco()
64
64
  ```
65
65
  """
66
- try:
67
- if self.path is None:
68
- db_path = rf'{os.getcwd()}\database'
66
+ if self.path == '':
67
+ db_path = rf'{os.getcwd()}\database'
68
+ self.path = db_path
69
+
70
+ try:
69
71
  os.mkdir(db_path)
70
- self.path = db_path
71
72
 
72
- else:
73
+ except:
74
+ pass
75
+
76
+ else:
77
+ try:
73
78
  os.mkdir(self.path)
74
79
 
75
- except:
76
- pass
77
-
78
- if os.path.isdir(self.path):
80
+ except:
81
+ pass
82
+
83
+ try:
79
84
  database = sq.connect(f'{self.path}/{self.nomeBanco}.db')
80
85
  cursor = database.cursor()
81
86
  return database, cursor
82
87
 
83
- else:
88
+ except:
84
89
  print(f'O caminho {self.path} é inválido')
85
90
  exit()
86
91
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: manage-sql
3
- Version: 0.6.0.dev907
3
+ Version: 0.6.2
4
4
  Summary: Biblioteca Python para gestão de bases de dados SQLite, MYSQL e PostgreSQL com maior eficiência
5
5
  Home-page: https://github.com/webtechmoz/manage-sql.git
6
6
  Author: Web Tech Moz
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='manage-sql',
5
- version='0.6.0.dev907',
5
+ version='0.6.2',
6
6
  author='Web Tech Moz',
7
7
  author_email='zoidycine@gmail.com',
8
8
  description='Biblioteca Python para gestão de bases de dados SQLite, MYSQL e PostgreSQL com maior eficiência',
File without changes
File without changes
File without changes