X7ROOT File Manager
Current Path:
/opt/cloudlinux/venv/lib/python3.11/site-packages/pydantic
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
pydantic
/
ðŸ“
..
📄
__init__.py
(5.68 KB)
ðŸ“
__pycache__
ðŸ“
_internal
📄
_migration.py
(11.62 KB)
📄
alias_generators.py
(1.11 KB)
📄
annotated_handlers.py
(4.24 KB)
📄
class_validators.py
(147 B)
📄
color.py
(20.99 KB)
📄
config.py
(24.16 KB)
📄
dataclasses.py
(11.22 KB)
📄
datetime_parse.py
(149 B)
📄
decorator.py
(144 B)
ðŸ“
deprecated
📄
env_settings.py
(147 B)
📄
error_wrappers.py
(149 B)
📄
errors.py
(4.49 KB)
📄
fields.py
(44.45 KB)
📄
functional_serializers.py
(10.53 KB)
📄
functional_validators.py
(19.99 KB)
📄
generics.py
(143 B)
📄
json.py
(139 B)
📄
json_schema.py
(98.33 KB)
📄
main.py
(60.8 KB)
📄
mypy.py
(49.53 KB)
📄
networks.py
(20.06 KB)
📄
parse.py
(140 B)
ðŸ“
plugin
📄
py.typed
(0 B)
📄
root_model.py
(4.83 KB)
📄
schema.py
(141 B)
📄
tools.py
(140 B)
📄
type_adapter.py
(18.38 KB)
📄
types.py
(70.54 KB)
📄
typing.py
(137 B)
📄
utils.py
(140 B)
ðŸ“
v1
📄
validate_call.py
(1.74 KB)
📄
validators.py
(145 B)
📄
version.py
(2.25 KB)
📄
warnings.py
(1.9 KB)
Editing: 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()
Upload File
Create Folder