many-house-85254
10/17/2023, 6:49 PM___main___.py
is getting too big. Is it possible to move some things into a seperate python file and call them as a function? Or some other way to make my file shorter. I don't want to make a custom component (like this) because it is not going to be re-used - I just want to call the one function deploy_kafka
and have all the services, deployments, etc deployed. The aim is to make ___main___.py
maintainable.
Example:
In `___main___.py`:
from kafka.kafka import deploy_kafka
deploy_kafka()
In kafka/kafka.py
,
def kafka_service():
<kafka service>
def kafka_deployment():
<kafka deployment>
...
def deploy_kafka():
kafka_service()
kafka_deployment()
Thanks :)billowy-army-68599
fast-river-57630
10/17/2023, 7:45 PM__init__.py
file in the kafka folder? I would think importing component resources and functions would be the same, otherwise.
That said, use component resources they are neat.dry-keyboard-94795
10/17/2023, 7:45 PMbillowy-army-68599