ecodev-core 0.0.63__py3-none-any.whl → 0.0.64__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.

Potentially problematic release.


This version of ecodev-core might be problematic. Click here for more details.

ecodev_core/encryption.py CHANGED
@@ -1,9 +1,23 @@
1
+ """
2
+ Module implementing simple fernet AES128 encryption/decryption
3
+ """
1
4
  from cryptography.fernet import Fernet
5
+ from pydantic_settings import BaseSettings
6
+ from pydantic_settings import SettingsConfigDict
2
7
 
3
8
  from ecodev_core.settings import SETTINGS
4
9
 
5
10
 
6
- FERNET = Fernet(SETTINGS.fernet_key.encode()) # type: ignore[attr-defined]
11
+ class EncryptionConf(BaseSettings):
12
+ """
13
+ Simple authentication configuration class
14
+ """
15
+ fernet_key: str = ''
16
+ model_config = SettingsConfigDict(env_file='.env')
17
+
18
+
19
+ SECRET_KEY = SETTINGS.fernet_key or EncryptionConf().fernet_key # type: ignore[attr-defined]
20
+ FERNET = Fernet(SECRET_KEY.encode())
7
21
 
8
22
 
9
23
  def encrypt_value(value):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ecodev-core
3
- Version: 0.0.63
3
+ Version: 0.0.64
4
4
  Summary: Low level sqlmodel/fastapi/pydantic building blocks
5
5
  License: MIT
6
6
  Author: Thomas Epelbaum
@@ -15,7 +15,7 @@ ecodev_core/db_retrieval.py,sha256=sCP7TDGIcTOK5gT3Inga91bE4S31HbQPw4yI22WJbss,7
15
15
  ecodev_core/db_upsertion.py,sha256=ttngwZzJUQdr9Mc-qkDljJpru5yN3kvAzAMTW84CLHo,13136
16
16
  ecodev_core/deployment.py,sha256=z8ACI00EtKknXOB8xyPwYIXTvPjIDOH9z9cBGEU0YrA,281
17
17
  ecodev_core/email_sender.py,sha256=V3UGweuq6Iy09Z9to8HzM6JOVDVGHZXHGjUSkW94Tac,1912
18
- ecodev_core/encryption.py,sha256=V2EteAa3obe3kqjKr-156z7Wi9VGES3PK-584rNns-w,675
18
+ ecodev_core/encryption.py,sha256=eGIjMVqpoi81Y_4JarATCJZoeEyD8NeyRqx8LfcpmKE,1073
19
19
  ecodev_core/enum_utils.py,sha256=BkQ4YQ97tXBYmMcQiSIi0mbioD5CgVU79myg1BBAXuA,556
20
20
  ecodev_core/es_connection.py,sha256=WC2_BIWBoxgihF1tyHhHsBlcFhM6nZD7eDrPuoJJOqI,2208
21
21
  ecodev_core/list_utils.py,sha256=QFchUnD9CvMiBFBUaxkZTyDyEqpIJBwCNPubNUSl8TA,4877
@@ -29,7 +29,7 @@ ecodev_core/settings.py,sha256=UvaTv8S_HvfFAL-m1Rfqv_geSGcccuV3ziR1o1d5wu4,1795
29
29
  ecodev_core/sqlmodel_utils.py,sha256=t57H3QPtKRy4ujic1clMK_2L4p0yjGJLZbDjHPZ8M94,453
30
30
  ecodev_core/token_banlist.py,sha256=rKXG9QkfCpjOTr8gBgdX-KYNHAkKvQ9TRnGS99VC9Co,491
31
31
  ecodev_core/version.py,sha256=eyIf8KkW_t-hMuYFIoy0cUlNaMewLe6i45m2HKZKh0Q,4403
32
- ecodev_core-0.0.63.dist-info/LICENSE.md,sha256=8dqVJEbwXjPWjjRKjdLMym5k9Gi8hwtrHh84sti6KIs,1068
33
- ecodev_core-0.0.63.dist-info/METADATA,sha256=Gb86OB86oU0NgC2gdX2NNl8hjL0f4FZswDLCnuPdG4E,3549
34
- ecodev_core-0.0.63.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
35
- ecodev_core-0.0.63.dist-info/RECORD,,
32
+ ecodev_core-0.0.64.dist-info/LICENSE.md,sha256=8dqVJEbwXjPWjjRKjdLMym5k9Gi8hwtrHh84sti6KIs,1068
33
+ ecodev_core-0.0.64.dist-info/METADATA,sha256=9Om9zCVuhYSP5SEMhSzyNehiLLiJK6QQjqrgZzVfPnw,3549
34
+ ecodev_core-0.0.64.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
35
+ ecodev_core-0.0.64.dist-info/RECORD,,