Run python file in blender from command line
An example that should work with Blender 2.80:
The directory:


folder
  | -> main.py
  | -> scripts
         -> __init__.py
         -> hello.py


scripts/__init__.py:

from scripts.hello import *


scripts/hello.py:

def hello():
    print('Hi')


main.py

import bpy
import sys

if __name__ == '__main__':
    sys.path.append('')
    import scripts
    scripts.hello()


And you launch it with: blender -b -P main.py.