title: What is the purpose of __table_args__ in sqlalchemy?
body: <p>I have no experience with sqlalchemy, and I have the following code:</p>
  
  <pre><code>class ForecastBedSetting(Base):
      __tablename__ = 'forecast_bed_settings'
      __table_args__ = (
          Index('idx_forecast_bed_settings_forecast_id_property_id_beds',
                'forecast_id', 'property_id',
                'beds'),
      )
  
      forecast_id = Column(ForeignKey(u'forecasts.id'), nullable=False)
      property_id = Column(ForeignKey(u'properties.id'), nullable=False, index=True)
      # more definition of columns
  </code></pre>
  
  <p>Although I have checked <a href="http://docs.sqlalchemy.org/en/latest/orm/extensions/declarative/table_config.html" rel="noreferrer">this</a>, I cannot understand what is the purpose of <code>__table_args__</code>, so I have no clue what this line is doing:</p>
  
  <pre><code>__table_args__ = (
      Index('idx_forecast_bed_settings_forecast_id_property_id_beds',
      'forecast_id', 'property_id',
      'beds'),
  )
  </code></pre>
  
  <p>Could somebody please explain me what is the purpose of <code>__table_args__</code>, and what the previous piece of code is doing.</p>