Skip to content

Add support for ORM and ODM models in faag-cli app generation #52

@pythonhubdev

Description

@pythonhubdev

Description

Currently, the faag-cli tool does not support generating models for Object Relational Mapping (ORM) or Object Document Mapping (ODM) packages. This feature will allow users to choose between ORM and ODM models based on their preference and the requirements of their project.

ORM packages like SQL-Alchemy can be used for relational databases, while ODM packages like Mongoengine can be used for NoSQL databases like MongoDB. This feature will make it easier for users to generate the appropriate models for their chosen database technology.

For example, a user could run the following command to generate a FastAPI app with SQL-Alchemy ORM models:

faag generate --type fast --name test_app --orm true --package sqlalchemy

Alternatively, they could generate a FastAPI app with Mongoengine ODM models with the following command:

faag generate --type fast --name test_app --odm true --package mongoengine

By default, the ORM and ODM options would be set to false, allowing users to generate a generic template with a SQLite connection. This feature would also be useful for generating additional features in the faag-cli.

Proposed Changes

Add support for ORM and ODM models in the faag-cli tool, allowing users to generate the appropriate models for their chosen database technology.

Additional Context

This feature would greatly enhance the usability and flexibility of the faag-cli tool for developers using various database technologies.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions