@@ -41,8 +41,8 @@ def disable_orm(ctx: BuilderContext) -> Optional[MenuEntry]:
4141 return None
4242
4343
44- def do_not_ask_features_if_quite (ctx : BuilderContext ) -> Optional [List [MenuEntry ]]:
45- if ctx .quite :
44+ def do_not_ask_features_if_quiet (ctx : BuilderContext ) -> Optional [List [MenuEntry ]]:
45+ if ctx .quiet :
4646 return [SKIP_ENTRY ]
4747 return None
4848
@@ -158,7 +158,7 @@ def checker(ctx: BuilderContext) -> bool:
158158 ),
159159 additional_info = Database (
160160 name = "mysql" ,
161- image = "bitnami/ mysql:8.0.30 " ,
161+ image = "mysql:8.4 " ,
162162 async_driver = "mysql+aiomysql" ,
163163 driver_short = "mysql" ,
164164 driver = "mysql" ,
@@ -178,13 +178,30 @@ def checker(ctx: BuilderContext) -> bool:
178178 ),
179179 additional_info = Database (
180180 name = "postgresql" ,
181- image = "postgres:13.8 -bullseye" ,
181+ image = "postgres:16.3 -bullseye" ,
182182 async_driver = "postgresql+asyncpg" ,
183183 driver_short = "postgres" ,
184184 driver = "postgresql" ,
185185 port = 5432 ,
186186 ),
187187 ),
188+ MenuEntry (
189+ code = "mongodb" ,
190+ user_view = "MongoDB" ,
191+ description = (
192+ "{name} is one of the most popular NoSQL databases out there." .format (
193+ name = colored ("MongoDB" , color = "green" ),
194+ )
195+ ),
196+ additional_info = Database (
197+ name = "mongodb" ,
198+ image = "mongo:7.0" ,
199+ async_driver = "beanie" ,
200+ driver_short = "mongodb" ,
201+ driver = "mongodb" ,
202+ port = 27017
203+ ),
204+ )
188205 ],
189206)
190207
@@ -243,7 +260,7 @@ def checker(ctx: BuilderContext) -> bool:
243260 entries = [
244261 MenuEntry (
245262 code = "none" ,
246- user_view = "Whithout ORMs" ,
263+ user_view = "Without ORMs" ,
247264 description = (
248265 "If you select this option, you will get only {what}.\n "
249266 "The rest {warn}." .format (
@@ -256,7 +273,7 @@ def checker(ctx: BuilderContext) -> bool:
256273 MenuEntry (
257274 code = "ormar" ,
258275 user_view = "Ormar" ,
259- pydantic_v1 = True ,
276+ is_hidden = check_db ([ "sqlite" , "mysql" , "postgresql" ]) ,
260277 description = (
261278 "{what} is a great {feature} ORM.\n "
262279 "It's compatible with pydantic models and alembic migrator." .format (
@@ -268,6 +285,7 @@ def checker(ctx: BuilderContext) -> bool:
268285 MenuEntry (
269286 code = "sqlalchemy" ,
270287 user_view = "SQLAlchemy" ,
288+ is_hidden = check_db (["sqlite" , "mysql" , "postgresql" ]),
271289 description = (
272290 "{what} is the most popular python ORM.\n "
273291 "It has a {feature} and a big community around it." .format (
@@ -279,6 +297,7 @@ def checker(ctx: BuilderContext) -> bool:
279297 MenuEntry (
280298 code = "tortoise" ,
281299 user_view = "Tortoise" ,
300+ is_hidden = check_db (["sqlite" , "mysql" , "postgresql" ]),
282301 description = (
283302 "{what} is a great {feature} ORM.\n "
284303 "It's easy to use, it has it's own migration tooling." .format (
@@ -312,6 +331,18 @@ def checker(ctx: BuilderContext) -> bool:
312331 )
313332 ),
314333 ),
334+ MenuEntry (
335+ code = "beanie" ,
336+ user_view = "Beanie" ,
337+ is_hidden = check_db (["mongodb" ]),
338+ description = (
339+ "{what} is an asynchronous object-document mapper (ODM) for MongoDB.\n "
340+ "Data models are based on Pydantic." .format (
341+ what = colored ("Beanie" , color = "green" ),
342+ )
343+ ),
344+ ),
345+
315346 ],
316347)
317348
@@ -320,14 +351,8 @@ def checker(ctx: BuilderContext) -> bool:
320351 code = "features" ,
321352 description = "Additional project features" ,
322353 multiselect = True ,
323- before_ask = do_not_ask_features_if_quite ,
354+ before_ask = do_not_ask_features_if_quiet ,
324355 entries = [
325- MenuEntry (
326- code = "pydanticv1" ,
327- cli_name = "pydantic-v1" ,
328- user_view = "Use older version of pydantic" ,
329- description = "Use pydantic version ^1 instead of ^2" ,
330- ),
331356 MenuEntry (
332357 code = "enable_redis" ,
333358 cli_name = "redis" ,
@@ -661,7 +686,7 @@ def run_command(callback: Callable[[BuilderContext], None]) -> None:
661686 help = "Owerrite directory if it exists" ,
662687 ),
663688 Option (
664- ["--quite " ],
689+ ["--quiet " ],
665690 is_flag = True ,
666691 help = "Do not ask for features during generation" ,
667692 ),
0 commit comments