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.
- {abstract_security-0.82 → abstract_security-0.83}/PKG-INFO +1 -1
- {abstract_security-0.82 → abstract_security-0.83}/setup.py +1 -1
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/envy_it.py +12 -4
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/PKG-INFO +1 -1
- {abstract_security-0.82 → abstract_security-0.83}/README.md +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/pyproject.toml +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/setup.cfg +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/__init__.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/__init__.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/abstractEnv.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/imports.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/envs/utils.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/__init__.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/__init__.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/constants.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/init_imports.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/module_imports.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/pass_utils.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/token_utils.py +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/SOURCES.txt +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/dependency_links.txt +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/requires.txt +0 -0
- {abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/top_level.txt +0 -0
- {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.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/__init__.py
RENAMED
|
File without changes
|
{abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/imports/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/pass_utils.py
RENAMED
|
File without changes
|
{abstract_security-0.82 → abstract_security-0.83}/src/abstract_security/logins/token_utils.py
RENAMED
|
File without changes
|
{abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/requires.txt
RENAMED
|
File without changes
|
{abstract_security-0.82 → abstract_security-0.83}/src/abstract_security.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|