SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib > python3.11 > site-packages > pydantic


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/venv/lib/python3.11/site-packages/pydantic

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
_internal Directory - -
deprecated Directory - -
plugin Directory - -
v1 Directory - -
__init__.py File 5814 bytes April 17 2024 13:36:23.
_migration.py File 11899 bytes April 17 2024 13:36:23.
alias_generators.py File 1141 bytes April 17 2024 13:36:23.
annotated_handlers.py File 4346 bytes April 17 2024 13:36:23.
class_validators.py File 147 bytes April 17 2024 13:36:23.
color.py File 21493 bytes April 17 2024 13:36:23.
config.py File 24737 bytes April 17 2024 13:36:23.
dataclasses.py File 11490 bytes April 17 2024 13:36:23.
datetime_parse.py File 149 bytes April 17 2024 13:36:23.
decorator.py File 144 bytes April 17 2024 13:36:23.
env_settings.py File 147 bytes April 17 2024 13:36:23.
error_wrappers.py File 149 bytes April 17 2024 13:36:23.
errors.py File 4595 bytes April 17 2024 13:36:23.
fields.py File 45513 bytes April 17 2024 13:36:23.
functional_serializers.py File 10780 bytes April 17 2024 13:36:23.
functional_validators.py File 20471 bytes April 17 2024 13:36:23.
generics.py File 143 bytes April 17 2024 13:36:23.
json.py File 139 bytes April 17 2024 13:36:23.
json_schema.py File 100686 bytes April 17 2024 13:36:23.
main.py File 62260 bytes April 17 2024 13:36:23.
mypy.py File 50721 bytes April 17 2024 13:36:23.
networks.py File 20543 bytes April 17 2024 13:36:23.
parse.py File 140 bytes April 17 2024 13:36:23.
py.typed File 0 bytes April 17 2024 13:36:23.
root_model.py File 4949 bytes April 17 2024 13:36:23.
schema.py File 141 bytes April 17 2024 13:36:23.
tools.py File 140 bytes April 17 2024 13:36:23.
type_adapter.py File 18818 bytes April 17 2024 13:36:23.
types.py File 72231 bytes April 17 2024 13:36:23.
typing.py File 137 bytes April 17 2024 13:36:23.
utils.py File 140 bytes April 17 2024 13:36:23.
validate_call.py File 1780 bytes April 17 2024 13:36:23.
validators.py File 145 bytes April 17 2024 13:36:23.
version.py File 2307 bytes April 17 2024 13:36:23.
warnings.py File 1947 bytes April 17 2024 13:36:23.

Reading File: //opt/cloudlinux/venv/lib/python3.11/site-packages/pydantic/alias_generators.py

"""Alias generators for converting between different capitalization conventions."""
import re

__all__ = ('to_pascal', 'to_camel', 'to_snake')


def to_pascal(snake: str) -> str:
    """Convert a snake_case string to PascalCase.

    Args:
        snake: The string to convert.

    Returns:
        The PascalCase string.
    """
    camel = snake.title()
    return re.sub('([0-9A-Za-z])_(?=[0-9A-Z])', lambda m: m.group(1), camel)


def to_camel(snake: str) -> str:
    """Convert a snake_case string to camelCase.

    Args:
        snake: The string to convert.

    Returns:
        The converted camelCase string.
    """
    camel = to_pascal(snake)
    return re.sub('(^_*[A-Z])', lambda m: m.group(1).lower(), camel)


def to_snake(camel: str) -> str:
    """Convert a PascalCase or camelCase string to snake_case.

    Args:
        camel: The string to convert.

    Returns:
        The converted string in snake_case.
    """
    snake = re.sub(r'([a-zA-Z])([0-9])', lambda m: f'{m.group(1)}_{m.group(2)}', camel)
    snake = re.sub(r'([a-z0-9])([A-Z])', lambda m: f'{m.group(1)}_{m.group(2)}', snake)
    return snake.lower()

SILENT KILLER Tool