dycw-utilities 0.166.7__tar.gz → 0.166.9__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.
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/PKG-INFO +1 -1
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/pyproject.toml +8 -2
- dycw_utilities-0.166.9/src/tests/test_pydantic_settings.py +77 -0
- dycw_utilities-0.166.9/src/tests/test_pydantic_settings_sops.py +49 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/__init__.py +1 -1
- dycw_utilities-0.166.9/src/utilities/pydantic_settings.py +61 -0
- dycw_utilities-0.166.9/src/utilities/pydantic_settings_sops.py +40 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/.gitignore +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/LICENSE +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/README.md +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/__init__.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/conftest.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/__init__.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_missing/__init__.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_missing/module.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_with/__init__.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_with/outer_1.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_with/outer_2.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_with/subpackage/__init__.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_with/subpackage/inner_1.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_with/subpackage/inner_2.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_with/subpackage/inner_3.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_without/__init__.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_without/module_1.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_without/module_2.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/standalone.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/with_imports.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__obj.json +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__series.json +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_int.json +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__false.json +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__true.json +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_nested.json +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_dataframe.json +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_series.json +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_aeventkit.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_altair.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_asyncio.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_atomicwrites.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_atools.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_cachetools.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_click.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_concurrent.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_contextlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_contextvars.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_cryptography.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_cvxpy.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_dataclasses.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_enum.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_errors.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_fastapi.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_fpdf2.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_functions.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_functools.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_getpass.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_git.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_gzip.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_hashlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_http.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_hypothesis.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_importlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_inflect.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_ipython.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_iterables.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_json.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_jupyter.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_libcst.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_lightweight_charts.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_logging.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_math.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_memory_profiler.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_modules.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_more_itertools.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_numpy.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_objects/__init__.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_objects/objects.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_operator.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_optuna.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_orjson.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_os.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_parse.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_pathlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_pickle.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_platform.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_polars.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_polars_ols.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_postgres.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_pottery.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_pqdm.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_psutil.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_pyinstrument.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_pytest.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_pytest_randomly.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_pytest_regressions.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_random.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_re.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_redis.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_reprlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_scipy.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_sentinel.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_shelve.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_slack_sdk.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_socket.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_sqlalchemy.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_statsmodels.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_string.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_tempfile.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_testbook.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_text.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_threading.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_timer.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_traceback.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_typed_settings.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_types.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_typing.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_typing_funcs/__init__.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_typing_funcs/no_future.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_typing_funcs/with_future.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_tzdata.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_tzlocal.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_uuid.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_version.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_warnings.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_whenever.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_zipfile.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_zoneinfo.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/aeventkit.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/altair.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/asyncio.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/atomicwrites.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/atools.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/cachetools.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/click.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/concurrent.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/contextlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/contextvars.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/cryptography.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/cvxpy.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/dataclasses.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/enum.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/errors.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/fastapi.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/fpdf2.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/functions.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/functools.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/getpass.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/git.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/gzip.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/hashlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/http.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/hypothesis.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/importlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/inflect.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/ipython.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/iterables.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/json.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/jupyter.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/libcst.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/lightweight_charts.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/logging.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/math.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/memory_profiler.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/modules.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/more_itertools.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/numpy.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/operator.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/optuna.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/orjson.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/os.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/parse.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pathlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pickle.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/platform.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/polars.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/polars_ols.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/postgres.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pottery.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pqdm.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/psutil.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/py.typed +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pyinstrument.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pytest.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pytest_plugins/__init__.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pytest_plugins/pytest_randomly.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pytest_plugins/pytest_regressions.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pytest_regressions.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/random.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/re.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/redis.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/reprlib.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/scipy.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/sentinel.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/shelve.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/slack_sdk.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/socket.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/sqlalchemy.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/statsmodels.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/string.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/tempfile.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/testbook.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/text.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/threading.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/timer.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/traceback.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/typed_settings.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/types.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/typing.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/tzdata.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/tzlocal.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/uuid.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/version.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/warnings.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/whenever.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/zipfile.py +0 -0
- {dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/zoneinfo.py +0 -0
@@ -146,6 +146,12 @@ pqdm = [
|
|
146
146
|
psutil = [
|
147
147
|
"psutil >=7.0.0, <7.1",
|
148
148
|
]
|
149
|
+
pydantic-settings = [
|
150
|
+
"pydantic-settings",
|
151
|
+
]
|
152
|
+
pydantic-settings-sops = [
|
153
|
+
"pydantic-settings-sops",
|
154
|
+
]
|
149
155
|
pyinstrument = [
|
150
156
|
"pyinstrument >=5.1.0, <5.2",
|
151
157
|
]
|
@@ -236,7 +242,7 @@ dependencies = [
|
|
236
242
|
name = "dycw-utilities"
|
237
243
|
readme = "README.md"
|
238
244
|
requires-python = ">= 3.12"
|
239
|
-
version = "0.166.
|
245
|
+
version = "0.166.9"
|
240
246
|
|
241
247
|
[project.entry-points.pytest11]
|
242
248
|
pytest-randomly = "utilities.pytest_plugins.pytest_randomly"
|
@@ -269,7 +275,7 @@ test = [
|
|
269
275
|
# bump-my-version
|
270
276
|
[tool.bumpversion]
|
271
277
|
allow_dirty = true
|
272
|
-
current_version = "0.166.
|
278
|
+
current_version = "0.166.9"
|
273
279
|
|
274
280
|
[[tool.bumpversion.files]]
|
275
281
|
filename = "src/utilities/__init__.py"
|
@@ -0,0 +1,77 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from json import dumps
|
4
|
+
from typing import TYPE_CHECKING, ClassVar
|
5
|
+
|
6
|
+
from pydantic_settings import BaseSettings, SettingsConfigDict
|
7
|
+
|
8
|
+
from utilities.os import temp_environ
|
9
|
+
from utilities.pydantic_settings import CustomBaseSettings, load_settings
|
10
|
+
|
11
|
+
if TYPE_CHECKING:
|
12
|
+
from pathlib import Path
|
13
|
+
|
14
|
+
from utilities.types import MaybeIterable, PathLike
|
15
|
+
|
16
|
+
|
17
|
+
class TestCustomBaseSettings:
|
18
|
+
def test_main(self, *, tmp_path: Path) -> None:
|
19
|
+
file = tmp_path.joinpath("settings.toml")
|
20
|
+
_ = file.write_text(dumps({"x": 1, "y": 2}))
|
21
|
+
|
22
|
+
class Settings(CustomBaseSettings):
|
23
|
+
json_files: ClassVar[MaybeIterable[PathLike]] = file
|
24
|
+
x: int
|
25
|
+
y: int
|
26
|
+
|
27
|
+
settings = load_settings(Settings)
|
28
|
+
assert settings.x == 1
|
29
|
+
assert settings.y == 2
|
30
|
+
|
31
|
+
def test_env_var(self) -> None:
|
32
|
+
class Settings(CustomBaseSettings):
|
33
|
+
x: int
|
34
|
+
|
35
|
+
with temp_environ(x="1"):
|
36
|
+
settings = load_settings(Settings)
|
37
|
+
assert settings.x == 1
|
38
|
+
|
39
|
+
def test_env_var_with_prefix(self) -> None:
|
40
|
+
class Settings(CustomBaseSettings):
|
41
|
+
model_config = SettingsConfigDict(env_prefix="test_")
|
42
|
+
x: int
|
43
|
+
|
44
|
+
with temp_environ(test_x="1"):
|
45
|
+
settings = load_settings(Settings)
|
46
|
+
assert settings.x == 1
|
47
|
+
|
48
|
+
def test_env_var_with_nested(self) -> None:
|
49
|
+
class Settings(CustomBaseSettings):
|
50
|
+
inner: Inner
|
51
|
+
|
52
|
+
class Inner(BaseSettings):
|
53
|
+
x: int
|
54
|
+
|
55
|
+
_ = Settings.model_rebuild()
|
56
|
+
|
57
|
+
with temp_environ(inner__x="1"):
|
58
|
+
settings = load_settings(Settings)
|
59
|
+
assert settings.inner.x == 1
|
60
|
+
|
61
|
+
def test_env_var_with_prefix_and_nested(self) -> None:
|
62
|
+
class Settings(CustomBaseSettings):
|
63
|
+
model_config = SettingsConfigDict(env_prefix="test__")
|
64
|
+
inner: Inner
|
65
|
+
|
66
|
+
class Inner(BaseSettings):
|
67
|
+
x: int
|
68
|
+
|
69
|
+
_ = Settings.model_rebuild()
|
70
|
+
with temp_environ(test__inner__x="1"):
|
71
|
+
settings = load_settings(Settings)
|
72
|
+
assert settings.inner.x == 1
|
73
|
+
|
74
|
+
def test_no_files(self) -> None:
|
75
|
+
class Settings(CustomBaseSettings): ...
|
76
|
+
|
77
|
+
_ = load_settings(Settings)
|
@@ -0,0 +1,49 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
import re
|
4
|
+
from json import dumps
|
5
|
+
from subprocess import check_call
|
6
|
+
from typing import TYPE_CHECKING, ClassVar
|
7
|
+
|
8
|
+
from tests.conftest import SKIPIF_CI
|
9
|
+
from utilities.iterables import one
|
10
|
+
from utilities.os import temp_environ
|
11
|
+
from utilities.pydantic_settings import load_settings
|
12
|
+
from utilities.pydantic_settings_sops import SopsBaseSettings
|
13
|
+
from utilities.re import extract_group
|
14
|
+
|
15
|
+
if TYPE_CHECKING:
|
16
|
+
from pathlib import Path
|
17
|
+
|
18
|
+
from utilities.types import MaybeIterable, PathLike
|
19
|
+
|
20
|
+
|
21
|
+
class TestSOPSBaseSettings:
|
22
|
+
@SKIPIF_CI
|
23
|
+
def test_main(self, *, tmp_path: Path) -> None:
|
24
|
+
unencrypted_file = tmp_path.joinpath("unencrypted.json")
|
25
|
+
_ = unencrypted_file.write_text(dumps({"x": 1, "y": 2}))
|
26
|
+
key_file = tmp_path.joinpath("keys.txt")
|
27
|
+
with key_file.open(mode="w") as file:
|
28
|
+
_ = check_call(["age-keygen"], stdout=file)
|
29
|
+
pattern = re.compile(r"^# public key: (age.+)$")
|
30
|
+
public_line = one(
|
31
|
+
line for line in key_file.read_text().splitlines() if pattern.search(line)
|
32
|
+
)
|
33
|
+
public_key = extract_group(pattern, public_line)
|
34
|
+
encrypted_file = tmp_path.joinpath("encrypted.json")
|
35
|
+
with (
|
36
|
+
temp_environ(SOPS_AGE_RECIPIENTS=public_key),
|
37
|
+
encrypted_file.open(mode="w") as file,
|
38
|
+
):
|
39
|
+
_ = check_call(["sops", "encrypt", str(unencrypted_file)], stdout=file)
|
40
|
+
|
41
|
+
class Settings(SopsBaseSettings):
|
42
|
+
secret_files: ClassVar[MaybeIterable[PathLike]] = encrypted_file
|
43
|
+
x: int
|
44
|
+
y: int
|
45
|
+
|
46
|
+
with temp_environ(SOPS_AGE_KEY_FILE=str(key_file)):
|
47
|
+
settings = load_settings(Settings)
|
48
|
+
assert settings.x == 1
|
49
|
+
assert settings.y == 2
|
@@ -0,0 +1,61 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from typing import TYPE_CHECKING, ClassVar, override
|
4
|
+
|
5
|
+
from pydantic_settings import (
|
6
|
+
BaseSettings,
|
7
|
+
JsonConfigSettingsSource,
|
8
|
+
PydanticBaseSettingsSource,
|
9
|
+
SettingsConfigDict,
|
10
|
+
)
|
11
|
+
|
12
|
+
from utilities.iterables import always_iterable
|
13
|
+
|
14
|
+
if TYPE_CHECKING:
|
15
|
+
from collections.abc import Iterator
|
16
|
+
|
17
|
+
from utilities.types import MaybeIterable, PathLike
|
18
|
+
|
19
|
+
|
20
|
+
class CustomBaseSettings(BaseSettings):
|
21
|
+
"""Base settings for loading JSON files."""
|
22
|
+
|
23
|
+
# paths
|
24
|
+
json_files: ClassVar[MaybeIterable[PathLike]] = ()
|
25
|
+
|
26
|
+
# config
|
27
|
+
model_config: ClassVar[SettingsConfigDict] = SettingsConfigDict(
|
28
|
+
env_nested_delimiter="__"
|
29
|
+
)
|
30
|
+
|
31
|
+
@classmethod
|
32
|
+
@override
|
33
|
+
def settings_customise_sources(
|
34
|
+
cls,
|
35
|
+
settings_cls: type[BaseSettings],
|
36
|
+
init_settings: PydanticBaseSettingsSource,
|
37
|
+
env_settings: PydanticBaseSettingsSource,
|
38
|
+
dotenv_settings: PydanticBaseSettingsSource,
|
39
|
+
file_secret_settings: PydanticBaseSettingsSource,
|
40
|
+
) -> tuple[PydanticBaseSettingsSource, ...]:
|
41
|
+
_ = (init_settings, dotenv_settings, file_secret_settings)
|
42
|
+
return tuple(cls._yield_base_settings_sources(settings_cls, env_settings))
|
43
|
+
|
44
|
+
@classmethod
|
45
|
+
def _yield_base_settings_sources(
|
46
|
+
cls,
|
47
|
+
settings_cls: type[BaseSettings],
|
48
|
+
env_settings: PydanticBaseSettingsSource,
|
49
|
+
/,
|
50
|
+
) -> Iterator[PydanticBaseSettingsSource]:
|
51
|
+
yield env_settings
|
52
|
+
for file in always_iterable(cls.json_files):
|
53
|
+
yield JsonConfigSettingsSource(settings_cls, json_file=file)
|
54
|
+
|
55
|
+
|
56
|
+
def load_settings[T: BaseSettings](cls: type[T], /) -> T:
|
57
|
+
"""Load a set of settings."""
|
58
|
+
return cls()
|
59
|
+
|
60
|
+
|
61
|
+
__all__ = ["CustomBaseSettings", "load_settings"]
|
@@ -0,0 +1,40 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from typing import TYPE_CHECKING, ClassVar, override
|
4
|
+
|
5
|
+
from pydantic_settings_sops import SOPSConfigSettingsSource
|
6
|
+
|
7
|
+
from utilities.iterables import always_iterable
|
8
|
+
from utilities.pydantic_settings import CustomBaseSettings
|
9
|
+
|
10
|
+
if TYPE_CHECKING:
|
11
|
+
from collections.abc import Iterator
|
12
|
+
|
13
|
+
from pydantic_settings import BaseSettings, PydanticBaseSettingsSource
|
14
|
+
|
15
|
+
from utilities.types import MaybeIterable, PathLike
|
16
|
+
|
17
|
+
|
18
|
+
class SopsBaseSettings(CustomBaseSettings):
|
19
|
+
"""Base settings for loading secrets using `sops/age`."""
|
20
|
+
|
21
|
+
# paths
|
22
|
+
secret_files: ClassVar[MaybeIterable[PathLike]] = ()
|
23
|
+
|
24
|
+
@classmethod
|
25
|
+
@override
|
26
|
+
def _yield_base_settings_sources(
|
27
|
+
cls,
|
28
|
+
settings_cls: type[BaseSettings],
|
29
|
+
env_settings: PydanticBaseSettingsSource,
|
30
|
+
/,
|
31
|
+
) -> Iterator[PydanticBaseSettingsSource]:
|
32
|
+
yield from super()._yield_base_settings_sources(settings_cls, env_settings)
|
33
|
+
for file in always_iterable(cls.secret_files):
|
34
|
+
yield SOPSConfigSettingsSource(
|
35
|
+
settings_cls, # pyright: ignore[reportArgumentType],
|
36
|
+
json_file=file,
|
37
|
+
)
|
38
|
+
|
39
|
+
|
40
|
+
__all__ = ["SopsBaseSettings"]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_missing/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_missing/module.py
RENAMED
File without changes
|
{dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_with/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_without/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_without/module_1.py
RENAMED
File without changes
|
{dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/modules/package_without/module_2.py
RENAMED
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/tests/test_typing_funcs/with_future.py
RENAMED
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
|
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
|
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
|
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
|
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
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pytest_plugins/pytest_randomly.py
RENAMED
File without changes
|
{dycw_utilities-0.166.7 → dycw_utilities-0.166.9}/src/utilities/pytest_plugins/pytest_regressions.py
RENAMED
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
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|