param-manager 0.3.3__tar.gz → 0.3.4__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: param-manager
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: Biblioteca para gerenciamento de parâmetros com padrão Singleton,cache e armazenamento local usando TinyDB.
5
5
  Author-email: MatheusLPolidoro <mattpolidoro4@gmail.com>
6
6
  Project-URL: Documentation, https://matheuslpolidoro.github.io/param-manager/
@@ -19,5 +19,5 @@ Biblioteca para gerenciamento de parâmetros.
19
19
  from param_manager.manager import ParamManager
20
20
 
21
21
  __author__ = 'MatheusLPolidoro'
22
- __version__ = '0.3.3'
22
+ __version__ = '0.3.4'
23
23
  __all__ = ['ParamManager', 'TinyDB']
@@ -54,10 +54,6 @@ class ParamManager:
54
54
  username: str | None = None,
55
55
  password: str | None = None,
56
56
  ):
57
- # Evita reinicialização
58
- if hasattr(self, '_initialized') and self._initialized:
59
- return
60
-
61
57
  # Procura e carrega .env do diretório correto
62
58
  # Detecta se está rodando como executável PyInstaller
63
59
  if getattr(sys, 'frozen', False):
@@ -72,20 +68,23 @@ class ParamManager:
72
68
  load_dotenv(dotenv_path=dotenv_path)
73
69
 
74
70
  self._cache_duration = int(os.getenv('CACHE_DURATION', cache_duration))
75
- self._timeout = int(os.getenv('TIMEOUT', timeout))
76
- self._token = None
77
- self._refresh_token = None
78
- self._token_expire_at = 0
79
71
  self._username = os.getenv('PARAMS_USERNAME', username)
80
72
  self._password = os.getenv('PARAMS_PASSWORD', password)
81
73
 
74
+ # Evita reinicialização
75
+ if hasattr(self, '_initialized') and self._initialized:
76
+ return
77
+
78
+ self._lock = threading.Lock()
79
+ self._token = None
80
+ self._refresh_token = None
81
+ self._token_expire_at = 0
82
+ self._timeout = int(os.getenv('TIMEOUT', timeout))
82
83
  self._api_base_url = (
83
84
  api_url
84
85
  or os.getenv('API_PARAMS_URL', '')
85
86
  or os.getenv('API_URL', '')
86
87
  )
87
- self._lock = threading.Lock()
88
-
89
88
  env_db_path = os.getenv('LOCAL_DB_PATH')
90
89
  if local_db_path and os.path.exists(local_db_path):
91
90
  current_dir = local_db_path
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: param-manager
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: Biblioteca para gerenciamento de parâmetros com padrão Singleton,cache e armazenamento local usando TinyDB.
5
5
  Author-email: MatheusLPolidoro <mattpolidoro4@gmail.com>
6
6
  Project-URL: Documentation, https://matheuslpolidoro.github.io/param-manager/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "param-manager"
3
- version = "0.3.3"
3
+ version = "0.3.4"
4
4
  description = "Biblioteca para gerenciamento de parâmetros com padrão Singleton,cache e armazenamento local usando TinyDB."
5
5
  authors = [{name = "MatheusLPolidoro", email = "mattpolidoro4@gmail.com"}]
6
6
  readme = "README.md"
File without changes
File without changes