Provides cached configuration loading and path management for Nettacker.
# Source: https://github.com/OWASP/Nettacker | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
import inspect
from functools import lru_cache
from pathlib import Path
from nettacker import version
from nettacker.core.utils.common import generate_random_token, now
CWD = Path.cwd()
PACKAGE_PATH = Path(__file__).parent
@lru_cache(maxsize=128)
def version_info():
"""
version information of the framework
Returns:
an array of version and code name
"""
return version.__version__, version.__release_name__
class ConfigBase:
@classmethod
def as_dict(cls):
return {attr_name: getattr(cls, attr_name) for attr_name in cls()}
def __init__(sel
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key