diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1dc8241c..adf69203 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
 ## Version _next_
 
 - Add support for `readOnly`.
+- Fix bug where TypedDIct types for `binary`, `date` and `date-time` string formats mapped to the incorrect python types.
 
 ## Version 1.1.0 - 2020-04-05
 
diff --git a/open_alchemy/models_file/model/type_.py b/open_alchemy/models_file/model/type_.py
index 7bc55cd3..5b4b361d 100644
--- a/open_alchemy/models_file/model/type_.py
+++ b/open_alchemy/models_file/model/type_.py
@@ -72,6 +72,12 @@ def typed_dict(*, artifacts: types.ColumnSchemaArtifacts) -> str:
         model_type = model_type.replace(
             f"T{artifacts.de_ref}", f"{artifacts.de_ref}Dict"
         )
+    if artifacts.format == "binary":
+        model_type = model_type.replace("bytes", "str")
+    if artifacts.format == "date":
+        model_type = model_type.replace("datetime.date", "str")
+    if artifacts.format == "date-time":
+        model_type = model_type.replace("datetime.datetime", "str")
 
     return model_type
 

The typed dict cannot have types such as datetime
The typed dict of a models file should only have the basic OpenAPI types, it should not have python types such as `datetime` which currently is the case.
diff --git a/tests/open_alchemy/models_file/model/test_type.py b/tests/open_alchemy/models_file/model/test_type.py
index caa228af..1b2c0e13 100644
--- a/tests/open_alchemy/models_file/model/test_type.py
+++ b/tests/open_alchemy/models_file/model/test_type.py
@@ -106,23 +106,25 @@ def test_model(
 
 
 @pytest.mark.parametrize(
-    "type_, expected_type",
+    "type_, format_, expected_type",
     [
-        ("integer", "int"),
-        ("object", '"RefModelDict"'),
-        ("array", 'typing.Sequence["RefModelDict"]'),
+        pytest.param("integer", None, "typing.Optional[int]", id="plain"),
+        pytest.param("string", "binary", "typing.Optional[str]", id="binary"),
+        pytest.param("string", "date", "typing.Optional[str]", id="date"),
+        pytest.param("string", "date-time", "typing.Optional[str]", id="date-time"),
+        pytest.param("object", None, 'typing.Optional["RefModelDict"]', id="object"),
+        pytest.param("array", None, 'typing.Sequence["RefModelDict"]', id="array"),
     ],
-    ids=["plain", "object", "array"],
 )
 @pytest.mark.models_file
-def test_dict(type_, expected_type):
+def test_dict(type_, format_, expected_type):
     """
     GIVEN None format and required, False nullable and de_ref and given type
     WHEN typed_dict is called with the type, format, nullable, required and de_ref
     THEN the given expected type is returned.
     """
     artifacts = models_file.types.ColumnSchemaArtifacts(
-        type=type_, nullable=False, de_ref="RefModel"
+        type=type_, format=format_, nullable=True, de_ref="RefModel"
     )
 
     returned_type = models_file._model._type.typed_dict(artifacts=artifacts)

pip install -e .[dev,test]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-flake8 pytest-flask pytest-flask-sqlalchemy pytest-randomly pytest-bandit typeguard
3.8.0
examples/app/requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
alembic==1.14.1
astroid==3.2.4
attrs==25.3.0
babel==2.17.0
bandit==1.7.10
black==24.8.0
blinker==1.8.2
cachetools==5.5.2
certifi==2025.1.31
cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.4.1
click==8.1.8
clickclick==20.10.2
colorama==0.4.6
connexion==2.4.0
coverage==7.6.1
dill==0.3.9
distlib==0.3.9
doc8==1.1.2
docutils==0.20.1
exceptiongroup==1.2.2
filelock==3.16.1
flake8==5.0.4
Flask==3.0.3
Flask-SQLAlchemy==2.4.0
greenlet==3.1.1
identify==2.6.1
idna==3.10
imagesize==1.4.1
importlib-resources==5.13.0
importlib_metadata==8.5.0
inflection==0.5.1
iniconfig==2.1.0
isort==5.13.2
itsdangerous==2.2.0
Jinja2==3.1.6
jsonschema==3.2.0
Mako==1.3.9
markdown-it-py==3.0.0
MarkupSafe==2.1.5
mccabe==0.7.0
mdurl==0.1.2
mypy==1.14.1
mypy-extensions==1.0.0
nodeenv==1.9.1
-e git+https://github.com/jdkandersson/OpenAlchemy.git@4679055ab3ee068d8aa54f2a5f2c2104f9479505#egg=OpenAlchemy
openapi-schema-validator==0.2.3
openapi-spec-validator==0.4.0
packaging==24.2
pathspec==0.12.1
pbr==6.1.1
platformdirs==4.3.6
pluggy==1.5.0
pre-commit==3.5.0
pycodestyle==2.9.1
pydocstyle==6.3.0
pyflakes==2.5.0
Pygments==2.19.1
pylint==3.2.7
pyproject-api==1.8.0
pyrsistent==0.20.0
pytest==8.3.5
pytest-bandit==0.6.1
pytest-cov==5.0.0
pytest-flake8==1.2.2
pytest-flask==1.3.0
pytest-flask-sqlalchemy==1.1.0
pytest-mock==3.14.0
pytest-randomly==3.15.0
pytz==2025.2
PyYAML==6.0.2
requests==2.32.3
restructuredtext_lint==1.4.0
rich==14.0.0
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.1.2
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
SQLAlchemy==1.4.54
sqlalchemy-stubs==0.4
stevedore==5.3.0
swagger_ui_bundle==1.1.0
tomli==2.2.1
tomlkit==0.13.2
tox==4.25.0
tox-pyenv==1.1.0
typeguard==4.4.0
typing_extensions==4.13.0
urllib3==2.2.3
virtualenv==20.29.3
Werkzeug==3.0.6
zipp==3.20.2

name: OpenAlchemy
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - libedit=3.1.20230828=h5eee18b_0
  - libffi=3.2.1=hf484d3e_1007
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=24.2=py38h06a4308_0
  - python=3.8.0=h0371630_2
  - readline=7.0=h7b6447c_5
  - setuptools=75.1.0=py38h06a4308_0
  - sqlite=3.33.0=h62c20be_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.44.0=py38h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - alembic==1.14.1
      - astroid==3.2.4
      - attrs==25.3.0
      - babel==2.17.0
      - bandit==1.7.10
      - black==24.8.0
      - blinker==1.8.2
      - cachetools==5.5.2
      - certifi==2025.1.31
      - cfgv==3.4.0
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - click==8.1.8
      - clickclick==20.10.2
      - colorama==0.4.6
      - connexion==2.4.0
      - coverage==7.6.1
      - dill==0.3.9
      - distlib==0.3.9
      - doc8==1.1.2
      - docutils==0.20.1
      - exceptiongroup==1.2.2
      - filelock==3.16.1
      - flake8==5.0.4
      - flask==3.0.3
      - flask-sqlalchemy==2.4.0
      - greenlet==3.1.1
      - identify==2.6.1
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.5.0
      - importlib-resources==5.13.0
      - inflection==0.5.1
      - iniconfig==2.1.0
      - isort==5.13.2
      - itsdangerous==2.2.0
      - jinja2==3.1.6
      - jsonschema==3.2.0
      - mako==1.3.9
      - markdown-it-py==3.0.0
      - markupsafe==2.1.5
      - mccabe==0.7.0
      - mdurl==0.1.2
      - mypy==1.14.1
      - mypy-extensions==1.0.0
      - nodeenv==1.9.1
      - openapi-schema-validator==0.2.3
      - openapi-spec-validator==0.4.0
      - packaging==24.2
      - pathspec==0.12.1
      - pbr==6.1.1
      - platformdirs==4.3.6
      - pluggy==1.5.0
      - pre-commit==3.5.0
      - pycodestyle==2.9.1
      - pydocstyle==6.3.0
      - pyflakes==2.5.0
      - pygments==2.19.1
      - pylint==3.2.7
      - pyproject-api==1.8.0
      - pyrsistent==0.20.0
      - pytest==8.3.5
      - pytest-bandit==0.6.1
      - pytest-cov==5.0.0
      - pytest-flake8==1.2.2
      - pytest-flask==1.3.0
      - pytest-flask-sqlalchemy==1.1.0
      - pytest-mock==3.14.0
      - pytest-randomly==3.15.0
      - pytz==2025.2
      - pyyaml==6.0.2
      - requests==2.32.3
      - restructuredtext-lint==1.4.0
      - rich==14.0.0
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.1.2
      - sphinxcontrib-applehelp==1.0.4
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - sqlalchemy==1.4.54
      - sqlalchemy-stubs==0.4
      - stevedore==5.3.0
      - swagger-ui-bundle==1.1.0
      - tomli==2.2.1
      - tomlkit==0.13.2
      - tox==4.25.0
      - tox-pyenv==1.1.0
      - typeguard==4.4.0
      - typing-extensions==4.13.0
      - urllib3==2.2.3
      - virtualenv==20.29.3
      - werkzeug==3.0.6
      - zipp==3.20.2
prefix: /opt/conda/envs/OpenAlchemy

tests/open_alchemy/models_file/model/test_type.py::test_dict[date-time] tests/open_alchemy/models_file/model/test_type.py::test_dict[date] tests/open_alchemy/models_file/model/test_type.py::test_dict[binary]
tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_simple[sqlite:///:memory:-generated tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_simple[sqlite:///:memory:-type tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_simple[sqlite:///:memory:-nullable tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_simple[sqlite:///:memory:-required
tests/open_alchemy/models_file/model/test_type.py::test_arg_init[not tests/open_alchemy/models_file/model/test_type.py::test_model[object] tests/open_alchemy/models_file/model/test_type.py::test_arg_init[nullable tests/open_alchemy/models_file/model/test_type.py::test_dict_de_ref_none tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_many_to_one_not_nullable[sqlite:///:memory:] tests/open_alchemy/models_file/model/test_type.py::test_model[array] tests/open_alchemy/models_file/model/test_type.py::test_arg_from_dict_de_ref_none tests/open_alchemy/models_file/model/test_type.py::test_model[string tests/open_alchemy/models_file/model/test_type.py::test_model[number tests/open_alchemy/models_file/model/test_type.py::test_arg_from_dict[array] tests/open_alchemy/models_file/model/test_type.py::test_model[object tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_one_to_one_not_nullable[sqlite:///:memory:] tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_simple_nullable_fail[sqlite:///:memory:-generated tests/open_alchemy/models_file/model/test_type.py::test_model[nullable tests/open_alchemy/models_file/model/test_type.py::test_model[array tests/open_alchemy/models_file/model/test_type.py::test_arg_from_dict[plain] tests/open_alchemy/models_file/model/test_type.py::test_arg_from_dict[object] tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_simple_nullable_fail[sqlite:///:memory:-required tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_many_to_many[sqlite:///:memory:] tests/open_alchemy/models_file/model/test_type.py::test_model[integer tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_one_to_many[sqlite:///:memory:] tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_simple_nullable_fail[sqlite:///:memory:-nullable tests/open_alchemy/models_file/model/test_type.py::test_dict[object] tests/open_alchemy/models_file/model/test_type.py::test_dict[plain] tests/open_alchemy/models_file/model/test_type.py::test_dict[array] tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_one_to_one[sqlite:///:memory:] tests/open_alchemy/models_file/model/test_type.py::test_model[boolean tests/open_alchemy/models_file/model/test_type.py::test_model_database_type_many_to_one[sqlite:///:memory:] tests/open_alchemy/models_file/model/test_type.py::flake-8::FLAKE8
open_alchemy/models_file/model/type_.py CHANGELOG.md
open_alchemy/models_file/model/type_.py CHANGELOG.md