-
Notifications
You must be signed in to change notification settings - Fork 1
Add bulk version of fast-api airflow example #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add bulk version of fast-api airflow example #1
Conversation
"common_5_key": self.onboard_item.common5, | ||
|
||
# AWS related configs | ||
"aws_common_value_example_1": os.environ["example1"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is sufficient to define 2-3 example here.
tpa_payload = { | ||
"specific_key_1": "specific_value_1", | ||
"specific_key_2": "specific_value_2", | ||
"specific_key_3": "specific_value_3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same applies here
"specific_key_1": "specific_value_1", | ||
"specific_key_2": "specific_value_2", | ||
"specific_key_3": "specific_value_3", | ||
"specific_key_4": "specific_value_4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same applies here, we can keep the number of parameters consistent
EXAMPLE_2 = ("Example2", Example_2_OnboardItem) | ||
EXAMPLE_3 = ("Example3", Example_3_OnboardItem) | ||
# EXAMPLE_4 = ("Example4", Example_4_OnboardItem) | ||
# EXAMPLE_5 = ("Example5", Example_5_OnboardItem) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove extra examples here, and keep it consistent with other files
|
||
### Insight | ||
|
||
Using the factory pattern enhances the readability and maintainability of the code. Additionally, there is neat code present before anything else. CAUTION: While it could be implemented more effectively using a different pattern, it is being used for educational purposes. Also code will not work if you try to run it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have any reference to any other source? if we have, we should also mention them in a credits topic. You can refer to other README.md files
@@ -0,0 +1,30 @@ | |||
# Real world example: | |||
|
|||
Here is the realworld example that I have used for one of my project with factory_pattern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we can remove this
|
||
from data_models import ExampleTPA | ||
|
||
class OnboardItemValidator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add docstring
Files | ||
``` | ||
... | ||
- main.py --> Fast-API app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add a direct link to these files.
Example:(https://stackoverflow.com/questions/32563078/how-link-to-any-local-file-with-markdown-syntax)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just need to make some cosmetic changes. Also, we should rename the folder to a project name like 'fast-api-onboard'
No description provided.