weboob.capabilities.housing

class weboob.capabilities.housing.CapHousing

Bases: weboob.capabilities.base.Capability

Capability of websites to search housings.

get_housing(housing)

Get an housing from an ID.

Parameters:housing (str) – ID of the housing
Return type:Housing or None if not found.
search_city(pattern)

Search a city from a pattern.

Parameters:pattern (str) – pattern to search
Return type:iter[City]
search_housings(query)

Search housings.

Parameters:query (Query) – search query
Return type:iter[Housing]
class weboob.capabilities.housing.Housing(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Content of a housing.
Variables:
  • type – (unicode) Type of housing (rent, sale, sharing)
  • advert_type – (unicode) Type of advert (professional or personal)
  • house_type – (unicode) Type of house (apartment, house, parking, …)
  • title – (unicode) Title of housing
  • area – (Decimal) Area of housing, in m2
  • cost – (Decimal) Cost of housing
  • price_per_meter – (Decimal) Price per meter ratio
  • currency – (unicode) Currency of cost
  • utilities – (unicode) Utilities included or not
  • date – (date, datetime) Date when the housing has been published
  • location – (unicode) Location of housing
  • station – (unicode) What metro/bus station next to housing
  • text – (unicode) Text of the housing
  • phone – (unicode) Phone number to contact
  • photos – (list) List of photos
  • rooms – (Decimal) Number of rooms
  • bedrooms – (Decimal) Number of bedrooms
  • details – (dict) Key/values of details
  • DPE – (unicode) DPE (Energy Performance Certificate)
  • GES – (unicode) GES (Greenhouse Gas Emissions)
class weboob.capabilities.housing.Query(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Query to find housings.
Variables:
  • type – (unicode) Type of housing to find (POSTS_TYPES constants)
  • cities – (list, tuple) List of cities to search in
  • area_min – (int, long) Minimal area (in m2)
  • area_max – (int, long) Maximal area (in m2)
  • cost_min – (int, long) Minimal cost
  • cost_max – (int, long) Maximal cost
  • nb_rooms – (int, long) Number of rooms
  • house_types – (list, tuple) List of house types (default: [u’Apartment’, u’House’, u’Land’, u’Other’, u’Parking’, u’Unknown’])
  • advert_types – (list, tuple) List of advert types to filter on (default: [u’Personal’, u’Professional’])
class weboob.capabilities.housing.City(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

City.
Variables:name – (unicode) Name of city
class weboob.capabilities.housing.UTILITIES

Bases: weboob.capabilities.base.Enum

EXCLUDED = u'H.C.'
INCLUDED = u'C.C.'
UNKNOWN = u''
class weboob.capabilities.housing.ENERGY_CLASS

Bases: weboob.capabilities.base.Enum

A = u'A'
B = u'B'
C = u'C'
D = u'D'
E = u'E'
F = u'F'
G = u'G'
class weboob.capabilities.housing.POSTS_TYPES

Bases: weboob.capabilities.base.Enum

FURNISHED_RENT = u'FURNISHED_RENT'
RENT = u'RENT'
SALE = u'SALE'
SHARING = u'SHARING'
VIAGER = u'VIAGER'
class weboob.capabilities.housing.ADVERT_TYPES

Bases: weboob.capabilities.base.Enum

PERSONAL = u'Personal'
PROFESSIONAL = u'Professional'
class weboob.capabilities.housing.HOUSE_TYPES

Bases: weboob.capabilities.base.Enum

APART = u'Apartment'
HOUSE = u'House'
LAND = u'Land'
OTHER = u'Other'
PARKING = u'Parking'
UNKNOWN = u'Unknown'
exception weboob.capabilities.housing.TypeNotSupported(msg='This type of house is not supported by this module')

Bases: weboob.capabilities.base.UserError

Raised when query type is not supported

class weboob.capabilities.housing.HousingPhoto(url)

Bases: weboob.capabilities.base.BaseObject

Photo of a housing.
Variables:data – (str) Data of photo