IDB3.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module models</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>models</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/ubuntu/idb/models.py">/home/ubuntu/idb/models.py</a></font></td></tr></table>
<p><tt>SWEatshop Database Models<br>
<br>
Note: Pylint does not work well with SQLAlchemy since it is<br>
dynamically generated</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="config.html">config</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="enum.html#Enum">enum.Enum</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="models.html#Ownership">Ownership</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial">flask_sqlalchemy.Model(<a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="models.html#Category">Category</a>
</font></dt><dt><font face="helvetica, arial"><a href="models.html#Company">Company</a>
</font></dt><dt><font face="helvetica, arial"><a href="models.html#Investor">Investor</a>
</font></dt><dt><font face="helvetica, arial"><a href="models.html#Person">Person</a>
</font></dt><dt><font face="helvetica, arial"><a href="models.html#School">School</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Category">class <strong>Category</strong></a>(flask_sqlalchemy.Model)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Categories<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#Category">Category</a></dd>
<dd>flask_sqlalchemy.Model</dd>
<dd><a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Category-__init__"><strong>__init__</strong></a>(self, name)</dt></dl>
<dl><dt><a name="Category-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<hr>
Class methods defined here:<br>
<dl><dt><a name="Category-get_all_rows"><strong>get_all_rows</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="flask_sqlalchemy.html#_BoundDeclarativeMeta">flask_sqlalchemy._BoundDeclarativeMeta</a></font></font></dt><dd><tt>Get all category rows</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>idnum</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__mapper__</strong> = <Mapper at 0x7fd46d59e4d0; Category></dl>
<dl><dt><strong>__table__</strong> = Table('category', MetaData(bind=None), Column('i..., table=<category>, nullable=False), schema=None)</dl>
<hr>
Methods inherited from flask_sqlalchemy.Model:<br>
<strong>query</strong> = <flask_sqlalchemy.BaseQuery object>
<hr>
Data and other attributes inherited from flask_sqlalchemy.Model:<br>
<dl><dt><strong>metadata</strong> = MetaData(bind=None)</dl>
<dl><dt><strong>query_class</strong> = <class 'flask_sqlalchemy.BaseQuery'><dd><tt>SQLAlchemy :class:`~sqlalchemy.orm.query.Query` subclass with convenience methods for querying in a web application.<br>
<br>
This is the default :attr:`~Model.query` object used for models, and exposed as :attr:`~SQLAlchemy.Query`.<br>
Override the query class for an individual model by subclassing this and setting :attr:`~Model.query_class`.</tt></dl>
<hr>
Data descriptors inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__tablename__</strong></dt>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Company">class <strong>Company</strong></a>(flask_sqlalchemy.Model)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Company">Company</a> Model<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#Company">Company</a></dd>
<dd>flask_sqlalchemy.Model</dd>
<dd><a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Company-__init__"><strong>__init__</strong></a>(self, name, location, ownership_type, funding, description, ceo_id, image_url, size, website)</dt><dd><tt>Initializes <a href="#Company">Company</a>, ceo as foreign key and ownership as enum</tt></dd></dl>
<dl><dt><a name="Company-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<hr>
Class methods defined here:<br>
<dl><dt><a name="Company-get_all_rows"><strong>get_all_rows</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="flask_sqlalchemy.html#_BoundDeclarativeMeta">flask_sqlalchemy._BoundDeclarativeMeta</a></font></font></dt><dd><tt>Get all company rows</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>ceo_id</strong></dt>
</dl>
<dl><dt><strong>country</strong></dt>
</dl>
<dl><dt><strong>crunch_id</strong></dt>
</dl>
<dl><dt><strong>description</strong></dt>
</dl>
<dl><dt><strong>employees</strong></dt>
</dl>
<dl><dt><strong>funding</strong></dt>
</dl>
<dl><dt><strong>idnum</strong></dt>
</dl>
<dl><dt><strong>image_url</strong></dt>
</dl>
<dl><dt><strong>investors</strong></dt>
</dl>
<dl><dt><strong>location</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>ownership_type</strong></dt>
</dl>
<dl><dt><strong>size</strong></dt>
</dl>
<dl><dt><strong>website</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__mapper__</strong> = <Mapper at 0x7fd46d586350; Company></dl>
<dl><dt><strong>__table__</strong> = Table('company', MetaData(bind=None), Column('id...String(length=25), table=<company>), schema=None)</dl>
<hr>
Methods inherited from flask_sqlalchemy.Model:<br>
<strong>query</strong> = <flask_sqlalchemy.BaseQuery object>
<hr>
Data and other attributes inherited from flask_sqlalchemy.Model:<br>
<dl><dt><strong>metadata</strong> = MetaData(bind=None)</dl>
<dl><dt><strong>query_class</strong> = <class 'flask_sqlalchemy.BaseQuery'><dd><tt>SQLAlchemy :class:`~sqlalchemy.orm.query.Query` subclass with convenience methods for querying in a web application.<br>
<br>
This is the default :attr:`~Model.query` object used for models, and exposed as :attr:`~SQLAlchemy.Query`.<br>
Override the query class for an individual model by subclassing this and setting :attr:`~Model.query_class`.</tt></dl>
<hr>
Data descriptors inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__tablename__</strong></dt>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Investor">class <strong>Investor</strong></a>(flask_sqlalchemy.Model)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Investor">Investor</a> Model<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#Investor">Investor</a></dd>
<dd>flask_sqlalchemy.Model</dd>
<dd><a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Investor-__init__"><strong>__init__</strong></a>(self, name, location, funding, description, image_url, website)</dt><dd><tt>Initializes <a href="#Investor">Investor</a></tt></dd></dl>
<dl><dt><a name="Investor-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<hr>
Class methods defined here:<br>
<dl><dt><a name="Investor-get_all_rows"><strong>get_all_rows</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="flask_sqlalchemy.html#_BoundDeclarativeMeta">flask_sqlalchemy._BoundDeclarativeMeta</a></font></font></dt><dd><tt>Get all investor rows</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>companies</strong></dt>
</dl>
<dl><dt><strong>country</strong></dt>
</dl>
<dl><dt><strong>description</strong></dt>
</dl>
<dl><dt><strong>funding</strong></dt>
</dl>
<dl><dt><strong>idnum</strong></dt>
</dl>
<dl><dt><strong>image_url</strong></dt>
</dl>
<dl><dt><strong>location</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>schools</strong></dt>
</dl>
<dl><dt><strong>website</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__mapper__</strong> = <Mapper at 0x7fd46d59e150; Investor></dl>
<dl><dt><strong>__table__</strong> = Table('investor', MetaData(bind=None), Column('i...ring(length=512), table=<investor>), schema=None)</dl>
<hr>
Methods inherited from flask_sqlalchemy.Model:<br>
<strong>query</strong> = <flask_sqlalchemy.BaseQuery object>
<hr>
Data and other attributes inherited from flask_sqlalchemy.Model:<br>
<dl><dt><strong>metadata</strong> = MetaData(bind=None)</dl>
<dl><dt><strong>query_class</strong> = <class 'flask_sqlalchemy.BaseQuery'><dd><tt>SQLAlchemy :class:`~sqlalchemy.orm.query.Query` subclass with convenience methods for querying in a web application.<br>
<br>
This is the default :attr:`~Model.query` object used for models, and exposed as :attr:`~SQLAlchemy.Query`.<br>
Override the query class for an individual model by subclassing this and setting :attr:`~Model.query_class`.</tt></dl>
<hr>
Data descriptors inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__tablename__</strong></dt>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table> <strong>Ownership</strong> = <enum 'Ownership'> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Person">class <strong>Person</strong></a>(flask_sqlalchemy.Model)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Person">Person</a> Model<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#Person">Person</a></dd>
<dd>flask_sqlalchemy.Model</dd>
<dd><a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Person-__init__"><strong>__init__</strong></a>(self, name, title, location, dob, image_url, website)</dt><dd><tt>Initializes a <a href="#Person">Person</a>, pass in dob as datetime object</tt></dd></dl>
<dl><dt><a name="Person-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<hr>
Class methods defined here:<br>
<dl><dt><a name="Person-get_all_rows"><strong>get_all_rows</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="flask_sqlalchemy.html#_BoundDeclarativeMeta">flask_sqlalchemy._BoundDeclarativeMeta</a></font></font></dt><dd><tt>Get all person rows</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>companies</strong></dt>
</dl>
<dl><dt><strong>country</strong></dt>
</dl>
<dl><dt><strong>crunch_id</strong></dt>
</dl>
<dl><dt><strong>description</strong></dt>
</dl>
<dl><dt><strong>dob</strong></dt>
</dl>
<dl><dt><strong>idnum</strong></dt>
</dl>
<dl><dt><strong>image_url</strong></dt>
</dl>
<dl><dt><strong>location</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>schools</strong></dt>
</dl>
<dl><dt><strong>title</strong></dt>
</dl>
<dl><dt><strong>website</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__mapper__</strong> = <Mapper at 0x7fd46d5dd9d0; Person></dl>
<dl><dt><strong>__table__</strong> = Table('person', MetaData(bind=None), Column('idn...ring(length=10000), table=<person>), schema=None)</dl>
<hr>
Methods inherited from flask_sqlalchemy.Model:<br>
<strong>query</strong> = <flask_sqlalchemy.BaseQuery object>
<hr>
Data and other attributes inherited from flask_sqlalchemy.Model:<br>
<dl><dt><strong>metadata</strong> = MetaData(bind=None)</dl>
<dl><dt><strong>query_class</strong> = <class 'flask_sqlalchemy.BaseQuery'><dd><tt>SQLAlchemy :class:`~sqlalchemy.orm.query.Query` subclass with convenience methods for querying in a web application.<br>
<br>
This is the default :attr:`~Model.query` object used for models, and exposed as :attr:`~SQLAlchemy.Query`.<br>
Override the query class for an individual model by subclassing this and setting :attr:`~Model.query_class`.</tt></dl>
<hr>
Data descriptors inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__tablename__</strong></dt>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="School">class <strong>School</strong></a>(flask_sqlalchemy.Model)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#School">School</a> Model<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="models.html#School">School</a></dd>
<dd>flask_sqlalchemy.Model</dd>
<dd><a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="School-__init__"><strong>__init__</strong></a>(self, name, location, description, image_url, size, website)</dt><dd><tt>Initializes <a href="#School">School</a></tt></dd></dl>
<dl><dt><a name="School-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<hr>
Class methods defined here:<br>
<dl><dt><a name="School-get_all_rows"><strong>get_all_rows</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="flask_sqlalchemy.html#_BoundDeclarativeMeta">flask_sqlalchemy._BoundDeclarativeMeta</a></font></font></dt><dd><tt>Get all school rows</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>alumni</strong></dt>
</dl>
<dl><dt><strong>country</strong></dt>
</dl>
<dl><dt><strong>description</strong></dt>
</dl>
<dl><dt><strong>idnum</strong></dt>
</dl>
<dl><dt><strong>image_url</strong></dt>
</dl>
<dl><dt><strong>investors</strong></dt>
</dl>
<dl><dt><strong>location</strong></dt>
</dl>
<dl><dt><strong>name</strong></dt>
</dl>
<dl><dt><strong>size</strong></dt>
</dl>
<dl><dt><strong>website</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__mapper__</strong> = <Mapper at 0x7fd46d586ad0; School></dl>
<dl><dt><strong>__table__</strong> = Table('school', MetaData(bind=None), Column('idn...String(length=200), table=<school>), schema=None)</dl>
<hr>
Methods inherited from flask_sqlalchemy.Model:<br>
<strong>query</strong> = <flask_sqlalchemy.BaseQuery object>
<hr>
Data and other attributes inherited from flask_sqlalchemy.Model:<br>
<dl><dt><strong>metadata</strong> = MetaData(bind=None)</dl>
<dl><dt><strong>query_class</strong> = <class 'flask_sqlalchemy.BaseQuery'><dd><tt>SQLAlchemy :class:`~sqlalchemy.orm.query.Query` subclass with convenience methods for querying in a web application.<br>
<br>
This is the default :attr:`~Model.query` object used for models, and exposed as :attr:`~SQLAlchemy.Query`.<br>
Override the query class for an individual model by subclassing this and setting :attr:`~Model.query_class`.</tt></dl>
<hr>
Data descriptors inherited from <a href="flask_sqlalchemy.html#Model">flask_sqlalchemy.Model</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__tablename__</strong></dt>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>APP</strong> = <Flask 'models'><br>
<strong>company_category</strong> = Table('company_category', MetaData(bind=None), C....idnum'), table=<company_category>), schema=None)<br>
<strong>db</strong> = <SQLAlchemy engine=postgresql://flask:***@sweats...vsgdbsefofi.us-east-1.rds.amazonaws.com:5432/db1><br>
<strong>education</strong> = Table('education', MetaData(bind=None), Column('...'school.idnum'), table=<education>), schema=None)<br>
<strong>employment</strong> = Table('employment', MetaData(bind=None), Column(...ompany.idnum'), table=<employment>), schema=None)<br>
<strong>investment</strong> = Table('investment', MetaData(bind=None), Column(...vestor.idnum'), table=<investment>), schema=None)<br>
<strong>investor_category</strong> = Table('investor_category', MetaData(bind=None), ...idnum'), table=<investor_category>), schema=None)<br>
<strong>school_investment</strong> = Table('school_investment', MetaData(bind=None), ...idnum'), table=<school_investment>), schema=None)</td></tr></table>
</body></html>