title: how to get table object and query specific fields in sqlalchemy?
body: <p>I create a table when user want to add IP address and port to get a url map that refers to the specific ip:port he adds. The table is created based on his email address.</p>
  
  <pre><code>def create_user_table(table_name):
      engine = get_sql_engine()
      metadata = MetaData(engine)
      user_table = Table(table_name, metadata,
          Column("userip_id", db.Integer, primary_key=True, autoincrement=True),
          Column("date_created", db.DateTime, default=db.func.current_timestamp()),
          Column("date_modified", db.DateTime, default=db.func.current_timestamp(),
                                onupdate=db.func.current_timestamp()),
          Column("ipaddress", CIDR, nullable=False),
          Column("urlmap", db.String(10), nullable=False, unique=True),
          Column("port", db.Integer, index=True),
          Column("device", db.String(10)),
          Column("path", db.String(30)),
          Column("service", db.String(10)),
          Column("count_updates", db.Integer, default=0, nullable=False),
          )
      user_table.create(engine)
      return user_table
  </code></pre>
  
  <p>I have not made ipaddress and port address unique as same user can have different port but same ip and different ip but same port address (I have opted for the later considering a user can be updating )</p>
  
  <p>if I create a table in db inheriting form <code>db.Model</code> I can query like 
  <code>cls.query.filter(ipaddress=ipaddress).first()</code> this will return me that table object I can check if that Ip has a specific port, but now that I have created table inheriting from <code>sqlalchemy.Table</code> I do not have the query function available . </p>
  
  <p>How do I query and compare if the specific ip has a specific port address mapped to a existing urlmap(not known) ?</p>