abstract-security 0.82__tar.gz → 0.83__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.
Files changed (24) hide show
  1. {abstract_security-0.82 → abstract_security-0.83}/PKG-INFO +1 -1
  2. {abstract_security-0.82 → abstract_security-0.83}/setup.py +1 -1
  3. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/envy_it.py +12 -4
  4. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/PKG-INFO +1 -1
  5. {abstract_security-0.82 → abstract_security-0.83}/README.md +0 -0
  6. {abstract_security-0.82 → abstract_security-0.83}/pyproject.toml +0 -0
  7. {abstract_security-0.82 → abstract_security-0.83}/setup.cfg +0 -0
  8. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/__init__.py +0 -0
  9. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/__init__.py +0 -0
  10. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/abstractEnv.py +0 -0
  11. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/imports.py +0 -0
  12. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/utils.py +0 -0
  13. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/__init__.py +0 -0
  14. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/__init__.py +0 -0
  15. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/constants.py +0 -0
  16. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/init_imports.py +0 -0
  17. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/module_imports.py +0 -0
  18. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/pass_utils.py +0 -0
  19. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/token_utils.py +0 -0
  20. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/SOURCES.txt +0 -0
  21. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/dependency_links.txt +0 -0
  22. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/requires.txt +0 -0
  23. {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/top_level.txt +0 -0
  24. {abstract_security-0.82 → abstract_security-0.83}/tests/test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstract_security
3
- Version: 0.82
3
+ Version: 0.83
4
4
  Summary: Env-driven secrets loading and security primitives: .env resolution, password hashing, and JWT token utilities.
5
5
  Home-page: https://github.com/AbstractEndeavors/abstract_security
6
6
  Author: putkoff
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name='abstract_security',
8
- version='0.82',
8
+ version='0.83',
9
9
  author='putkoff',
10
10
  author_email="partners@abstractendeavors.com",
11
11
  description='Env-driven secrets loading and security primitives: .env resolution, password hashing, and JWT token utilities.',
@@ -1,3 +1,5 @@
1
+ import os
2
+
1
3
  from .imports import *
2
4
  from .abstractEnv import abstractEnv
3
5
  from .utils import *
@@ -5,17 +7,23 @@ from .utils import *
5
7
 
6
8
  def get_env_value(key=None, path=None, file_name=None, deep_scan=False):
7
9
  """
8
- Retrieve the value of `key` from a .env file.
10
+ Retrieve the value of `key`.
11
+
12
+ The process environment takes precedence over dotenv files, so a value set
13
+ via `export`, systemd `Environment=`, or a container env is always honored;
14
+ otherwise the value is resolved from a `.env` file.
9
15
 
10
16
  Args:
11
- key: The key to search for in the .env file.
17
+ key: The key to search for.
12
18
  path: A directory or direct path to the .env file.
13
19
  file_name: The name of the .env file.
14
- deep_scan: Allow fuzzy (partial) matching of the key.
20
+ deep_scan: Allow fuzzy (partial) matching of the key in the .env file.
15
21
 
16
22
  Returns:
17
- The value of the environment variable if found, otherwise None.
23
+ The value if found, otherwise None.
18
24
  """
25
+ if key and os.environ.get(key) is not None:
26
+ return os.environ[key]
19
27
  return abstractEnv(key=key, file_name=file_name, path=path, deep_scan=deep_scan).env_value
20
28
 
21
29
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abstract_security
3
- Version: 0.82
3
+ Version: 0.83
4
4
  Summary: Env-driven secrets loading and security primitives: .env resolution, password hashing, and JWT token utilities.
5
5
  Home-page: https://github.com/AbstractEndeavors/abstract_security
6
6
  Author: putkoff