├── .flake8 ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── main.yml ├── .gitignore ├── .pre-commit-config.yaml ├── CHANGELOG.txt ├── LICENSE ├── README.md ├── docs └── README.rst ├── example ├── dataclass_defaults.py ├── dataclass_no_defaults.py ├── db.sql ├── gino_orm_models.py ├── pydantic_with_defaults.py ├── pydantic_without_defaults.py ├── sqlalchemy_core.py └── sqlalchemy_models.py ├── omymodels ├── __init__.py ├── cli.py ├── converter.py ├── errors.py ├── from_ddl.py ├── generators.py ├── helpers.py ├── logic.py ├── models │ ├── dataclass │ │ ├── core.py │ │ ├── dataclass.jinja2 │ │ ├── templates.py │ │ └── types.py │ ├── enum │ │ ├── core.py │ │ ├── enum.jinja2 │ │ └── template.jinja2 │ ├── gino │ │ ├── core.py │ │ ├── gino.jinja2 │ │ ├── templates.py │ │ └── types.py │ ├── pydal │ │ ├── core.py │ │ ├── pydal.jinja2 │ │ └── templates.py │ ├── pydantic │ │ ├── core.py │ │ ├── pydantic.jinja2 │ │ ├── templates.py │ │ └── types.py │ ├── sqlalchemy │ │ ├── core.py │ │ ├── sqlalchemy.jinja2 │ │ ├── templates.py │ │ └── types.py │ ├── sqlalchemy_core │ │ ├── core.py │ │ ├── sqlalchemy_core.jinja2 │ │ └── templates.py │ ├── sqlmodel │ │ ├── core.py │ │ ├── sqlmodel.jinja2 │ │ ├── templates.py │ │ └── types.py │ └── tortoise │ │ ├── core.py │ │ ├── pydal.jinja2 │ │ └── templates.py └── types.py ├── one.ddl ├── pyproject.toml └── tests ├── __init__.py ├── functional ├── converter │ ├── helpers.py │ └── test_converter.py └── generator │ ├── _models.py │ ├── test_dataclasses.py │ ├── test_enum_only.py │ ├── test_enums.py │ ├── test_gino_models.py │ ├── test_models_with_index.py │ ├── test_pydantic_models.py │ ├── test_sqlalchemy.py │ ├── test_sqlalchemy_core.py │ ├── test_sqlmodel.py │ ├── test_table_args.py │ └── test_two_tables.sql ├── integration ├── __init__.py └── pydantic │ ├── __init__.py │ ├── conftest.py │ └── test_pydantic.py └── unit ├── test_common.py ├── test_helpers.py └── test_omymodels.py /.flake8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/.flake8 -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/.gitignore -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/.pre-commit-config.yaml -------------------------------------------------------------------------------- /CHANGELOG.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/CHANGELOG.txt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/README.md -------------------------------------------------------------------------------- /docs/README.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/docs/README.rst -------------------------------------------------------------------------------- /example/dataclass_defaults.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/example/dataclass_defaults.py -------------------------------------------------------------------------------- /example/dataclass_no_defaults.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/example/dataclass_no_defaults.py -------------------------------------------------------------------------------- /example/db.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/example/db.sql -------------------------------------------------------------------------------- /example/gino_orm_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/example/gino_orm_models.py -------------------------------------------------------------------------------- /example/pydantic_with_defaults.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/example/pydantic_with_defaults.py -------------------------------------------------------------------------------- /example/pydantic_without_defaults.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/example/pydantic_without_defaults.py -------------------------------------------------------------------------------- /example/sqlalchemy_core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/example/sqlalchemy_core.py -------------------------------------------------------------------------------- /example/sqlalchemy_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/example/sqlalchemy_models.py -------------------------------------------------------------------------------- /omymodels/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/__init__.py -------------------------------------------------------------------------------- /omymodels/cli.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/cli.py -------------------------------------------------------------------------------- /omymodels/converter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/converter.py -------------------------------------------------------------------------------- /omymodels/errors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/errors.py -------------------------------------------------------------------------------- /omymodels/from_ddl.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/from_ddl.py -------------------------------------------------------------------------------- /omymodels/generators.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/generators.py -------------------------------------------------------------------------------- /omymodels/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/helpers.py -------------------------------------------------------------------------------- /omymodels/logic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/logic.py -------------------------------------------------------------------------------- /omymodels/models/dataclass/core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/dataclass/core.py -------------------------------------------------------------------------------- /omymodels/models/dataclass/dataclass.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/dataclass/dataclass.jinja2 -------------------------------------------------------------------------------- /omymodels/models/dataclass/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/dataclass/templates.py -------------------------------------------------------------------------------- /omymodels/models/dataclass/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/dataclass/types.py -------------------------------------------------------------------------------- /omymodels/models/enum/core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/enum/core.py -------------------------------------------------------------------------------- /omymodels/models/enum/enum.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/enum/enum.jinja2 -------------------------------------------------------------------------------- /omymodels/models/enum/template.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/enum/template.jinja2 -------------------------------------------------------------------------------- /omymodels/models/gino/core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/gino/core.py -------------------------------------------------------------------------------- /omymodels/models/gino/gino.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/gino/gino.jinja2 -------------------------------------------------------------------------------- /omymodels/models/gino/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/gino/templates.py -------------------------------------------------------------------------------- /omymodels/models/gino/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/gino/types.py -------------------------------------------------------------------------------- /omymodels/models/pydal/core.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /omymodels/models/pydal/pydal.jinja2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /omymodels/models/pydal/templates.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /omymodels/models/pydantic/core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/pydantic/core.py -------------------------------------------------------------------------------- /omymodels/models/pydantic/pydantic.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/pydantic/pydantic.jinja2 -------------------------------------------------------------------------------- /omymodels/models/pydantic/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/pydantic/templates.py -------------------------------------------------------------------------------- /omymodels/models/pydantic/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/pydantic/types.py -------------------------------------------------------------------------------- /omymodels/models/sqlalchemy/core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlalchemy/core.py -------------------------------------------------------------------------------- /omymodels/models/sqlalchemy/sqlalchemy.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlalchemy/sqlalchemy.jinja2 -------------------------------------------------------------------------------- /omymodels/models/sqlalchemy/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlalchemy/templates.py -------------------------------------------------------------------------------- /omymodels/models/sqlalchemy/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlalchemy/types.py -------------------------------------------------------------------------------- /omymodels/models/sqlalchemy_core/core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlalchemy_core/core.py -------------------------------------------------------------------------------- /omymodels/models/sqlalchemy_core/sqlalchemy_core.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlalchemy_core/sqlalchemy_core.jinja2 -------------------------------------------------------------------------------- /omymodels/models/sqlalchemy_core/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlalchemy_core/templates.py -------------------------------------------------------------------------------- /omymodels/models/sqlmodel/core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlmodel/core.py -------------------------------------------------------------------------------- /omymodels/models/sqlmodel/sqlmodel.jinja2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlmodel/sqlmodel.jinja2 -------------------------------------------------------------------------------- /omymodels/models/sqlmodel/templates.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlmodel/templates.py -------------------------------------------------------------------------------- /omymodels/models/sqlmodel/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/models/sqlmodel/types.py -------------------------------------------------------------------------------- /omymodels/models/tortoise/core.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /omymodels/models/tortoise/pydal.jinja2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /omymodels/models/tortoise/templates.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /omymodels/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/omymodels/types.py -------------------------------------------------------------------------------- /one.ddl: -------------------------------------------------------------------------------- 1 | CREATE TABLE `option` ( 2 | FIELD1 VARCHAR(256), 3 | ) ; -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/pyproject.toml -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/functional/converter/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/converter/helpers.py -------------------------------------------------------------------------------- /tests/functional/converter/test_converter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/converter/test_converter.py -------------------------------------------------------------------------------- /tests/functional/generator/_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/_models.py -------------------------------------------------------------------------------- /tests/functional/generator/test_dataclasses.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_dataclasses.py -------------------------------------------------------------------------------- /tests/functional/generator/test_enum_only.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_enum_only.py -------------------------------------------------------------------------------- /tests/functional/generator/test_enums.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_enums.py -------------------------------------------------------------------------------- /tests/functional/generator/test_gino_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_gino_models.py -------------------------------------------------------------------------------- /tests/functional/generator/test_models_with_index.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_models_with_index.py -------------------------------------------------------------------------------- /tests/functional/generator/test_pydantic_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_pydantic_models.py -------------------------------------------------------------------------------- /tests/functional/generator/test_sqlalchemy.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_sqlalchemy.py -------------------------------------------------------------------------------- /tests/functional/generator/test_sqlalchemy_core.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_sqlalchemy_core.py -------------------------------------------------------------------------------- /tests/functional/generator/test_sqlmodel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_sqlmodel.py -------------------------------------------------------------------------------- /tests/functional/generator/test_table_args.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_table_args.py -------------------------------------------------------------------------------- /tests/functional/generator/test_two_tables.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/functional/generator/test_two_tables.sql -------------------------------------------------------------------------------- /tests/integration/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/pydantic/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/pydantic/conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/integration/pydantic/conftest.py -------------------------------------------------------------------------------- /tests/integration/pydantic/test_pydantic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/integration/pydantic/test_pydantic.py -------------------------------------------------------------------------------- /tests/unit/test_common.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/unit/test_common.py -------------------------------------------------------------------------------- /tests/unit/test_helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/unit/test_helpers.py -------------------------------------------------------------------------------- /tests/unit/test_omymodels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xnuinside/omymodels/HEAD/tests/unit/test_omymodels.py --------------------------------------------------------------------------------