title: python celery invalid value for -A unable to load application
body: <p>I have a following project directory:</p>
  <pre><code>azima:
      __init.py
      main.py
      tasks.py
  </code></pre>
  <p>task.py</p>
  <pre><code>from .main import app
  
  @app.task
  def add(x, y):
      return x + y
  
  @app.task
  def mul(x, y):
      return x * y
  
  @app.task
  def xsum(numbers):
      return sum(numbers)
  </code></pre>
  <p>main.py</p>
  <pre><code>from celery import Celery
  
  app = Celery('azima', backend='redis://localhost:6379/0', broker='redis://localhost:6379/0', include=['azima.tasks'])
  
  # Optional configuration, see the application user guide.
  app.conf.update(
      result_expires=3600,
  )
  
  if __name__ == '__main__':
      app.start()
  </code></pre>
  <p>When I run a command to initialize celery workers, I get this error:</p>
  <pre><code>(azima_venv) brightseid@darkseid:~$ celery -A azima worker -l INFO
  Usage: celery [OPTIONS] COMMAND [ARGS]...
  
  Error: Invalid value for '-A' / '--app': 
  Unable to load celery application.
  Module 'azima' has no attribute 'celery'
  </code></pre>
  <p>But when I rename <code>main.py</code> to <code>celery.py</code> as it was earlier there's no issue.</p>
  <p>What am I missing here?</p>