Hi, my `___main___.py` is getting too big. Is it p...
# general
Hi, my
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
and have all the services, deployments, etc deployed. The aim is to make
maintainable. Example: In `___main___.py`:
Copy code
from kafka.kafka import deploy_kafka
Copy code
def kafka_service():
    <kafka service>

def kafka_deployment():
    <kafka deployment>


def deploy_kafka():
Thanks :)
If you have a file like kafka/kafka.py with component resources, do you need an
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.
Yes, you can split up resource creation into functions. Your example should work as written with the separate files
I think it should work without the init file, but it can be added as a blank file if you get import errors
I would really not recommend using functions, it’s a road to complex nesting and pain.