pyura package¶
Submodules¶
pyura.client module¶
-
class
pyura.client.
Client
(key)¶ Bases:
object
Interacts with URA endpoints. https://www.ura.gov.sg/maps/api/ .
-
key
¶ URA access key from email. Request for one at https://www.ura.gov.sg/maps/api/reg.html
Type: str
-
token
¶ URA token to be used for the day’s access to the API.
Type: str
-
session
¶ Request session which provides cookie persistence, connection-pooling, and configuration.
Type: Session
-
approved_resi_use
(blk_house_no, street, storey_no=None, unit_no=None)¶ Gets information on whether an address is approved for Residential use.
Parameters: - blk_house_no (str) – The blk/house number of the address
- street (str) – The street of the address
- storey_no (str) – Optional, The storey number of the address.
- unit_no (str) – Optional, The unit number of the address.
Returns: String indicating whether the address is approved for Residential use.
Return type: str
-
carpark_availability
()¶ Gets a list of URA car park available lots.
Returns: list of URA carpark available lots. Return type: list
-
carpark_details
()¶ Gets a list of URA car park details.
Returns: list of URA car park details. Return type: list
-
get_token
()¶ Retrieves a token to be used for the day’s access to the API
-
planning_decisions
(year=None, last_dnload_date=None)¶ Gets information on Written Permission granted or rejected by URA.
Parameters: - year (int) – Specify year of data to download. Only records after year 2000 can be retrieved.
- last_dnload_date – Specify created, modified or deleted from this date till present. Date is in dd/mm/yyyy format and it cannot be more than one year ago.
Returns: list of planning decisions.
Return type: list
Raises: ValueError
– Raised if any of the following occurs- year and last_dnload_date are provided.
- year is before 2000.
- last_dnload_date is not of format dd/mm/yyyy.
-
private_nl_resi_rental_median
()¶ Gets past 3 years of median rentals of private non-landed residential properties with at least 10 rental contracts for the reference period.
Returns: list of rental median for reference periods Return type: list
-
private_resi_developer_sales
(ref_period)¶ Gets 3 years of prices of completed and uncompleted private residential units and executive condominiums with pre-requisite for sale sold by developers.
Parameters: ref_period (str) – Specify reference quarter to retrieve. Field is in format of mmyy. Returns: list of properties with the developer sales. Return type: list Raises: ValueError
– Raised if ref_period is not in the format of mmyy.
-
private_resi_pipeline
()¶ Gets the latest quarter of project pipeline data.
Returns: list of projects. Return type: list
-
private_resi_rental_contract
(ref_period)¶ Gets past 3 years of private residential properties with rental contracts submitted to IRAS for Stamp Duty assessment.
Parameters: ref_period (str) – Specify reference quarter to retrieve. Field is in format of yyqq. Returns: list of properties with their rental contracts. Return type: list Raises: ValueError
– Raised if ref_period is not in the format of yyqq.
-
private_resi_transaction
(batch)¶ Gets a batch of the past 3 years of private residential property transaction records.
Parameters: batch (int) – Specify batch to retrieve. Data are available for download in 4 batches. Returns: list of record transactions. Return type: list Raises: ValueError
– Raised if batch is between 1 and 4.
-
season_carpark_details
()¶ Gets a list of URA season car park details and rates available for application.
Returns: list of URA season car park details and rates available for application. Return type: list
-
pyura.constants module¶
Endpoint constants and configurations for requests
pyura.exceptions module¶
Exceptions that occur when interacting with URA api
-
exception
pyura.exceptions.
ApiError
(message, errors)¶ Bases:
Exception