Skip to content

Commit

Permalink
Merge pull request #32 from mystic-ai/camel-case-aliases-from-env
Browse files Browse the repository at this point in the history
Optional camelcase aliases
  • Loading branch information
plutopulp authored Jan 28, 2022
2 parents f645613 + 1502cb4 commit ca7d507
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pipeline/schemas/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import re
from datetime import datetime
from typing import Optional
Expand All @@ -10,7 +11,7 @@
#: When set to True, model fields can be get/set by camelCase'd field names
#: This is useful for JS interop., where camelCase is the convention
#: (rather than Python's snake_case convention)
CAMEL_CASE_ALIASES = False
CAMEL_CASE_ALIASES = bool(os.environ.get("CAMEL_CASE_ALIASES", False))


def _generate_alias(s):
Expand Down

0 comments on commit ca7d507

Please sign in to comment.