fhrs

class fhrs.fhrs.Client[source]

A class which creates the requests session object to request data from FHRS api.

Variables:
  • session (requests.Session()) – a session object which persists to call the fhrs api endpoints.
  • url_base (str) – the path to the fhrs api domain
  • headers (dict()) – the headers to be used in the requests session
getauthorities()[source]

Returns a dataframe of details about all the authorities in the UK.

getauthoritiesbasic()[source]

Returns a dataframe of basic details about all the authorities in the UK.

getauthoritybyid(_id)[source]

Returns a dataframe of details about a single authority selected by _id.

Parameters:_id (int) – The id of the authority for which details are needed.
getbusinesstypebyid(_id)[source]

Return a dataframe containing details about a single business indexed by its _id

Parameters:_id (int) – The id of the business whose details are required.
getbusinesstypes()[source]

Return a dataframe of details about all business types.

getbusinesstypesbasic()[source]

Return a dataframe containing basic information about all business types.

getcountries()[source]

Returna a dataframe of details about all the countries in the UK.

getcountriesbasic()[source]

Returns a dataframe containing basic information about all the countries in the UK.

getcountrybyid(_id)[source]

Returns a dataframe about the details for a single country indexed by its _id.

Parameters:_id (int) – The id of the country whose details are required.
getestablishmentsbyid(_id)[source]

Returns a dataframe containing details for a single establishment indexed by its _id.

Parameters:_id (int) – The id of the establishment for which details are requested.
getratings()[source]

Returns a dataframe containing details of all ratings.

getratingsoperators()[source]

Return a dataframe containing details of all rating operators.

getregionbyid(_id)[source]

Returns a dataframe conatining details for a region specified by parameter _id.

Parameters:_id (int) – The id for a region for which details are needed.
getregions()[source]

Returns a dataframe containing details for all regions in the UK.

getregionsbasic()[source]

Returns a dataframe containing basic details of all the regions in the UK.

getschemetypes()[source]

Returns a dataframe containing details of all the schemes.

getscoredescriptorbyid(_id)[source]

Returns a dataframe containing details of scores for an establishment by _id

Parameters:_id (int) – The id for the establishement for which the scores are requested.
getsortoptions()[source]

Returns a dataframe containing details of all the sort options.