bolster.data_sources.companies_house ==================================== .. py:module:: bolster.data_sources.companies_house .. autoapi-nested-parse:: UK Companies House Data Integration. Data Source: UK Companies House provides comprehensive company registration data through their bulk download service at http://download.companieshouse.gov.uk/en_output.html. The service provides complete company information including names, addresses, status, and registration details for all active and dissolved companies in the UK. Update Frequency: The Companies House bulk data is updated monthly, typically available by the first week of each month. The data reflects the state of company registrations as of the snapshot date. .. rubric:: Example Basic usage for querying company data: >>> from bolster.data_sources import companies_house >>> farset_companies = list(companies_house.query_basic_company_data( ... companies_house.companies_house_record_might_be_farset ... )) >>> len(farset_companies) > 0 True The module provides utilities for downloading and parsing the complete UK company registry, with built-in filtering capabilities for targeted analysis. Attributes ---------- .. autoapisummary:: bolster.data_sources.companies_house.logger Functions --------- .. autoapisummary:: bolster.data_sources.companies_house.get_basic_company_data_url bolster.data_sources.companies_house.query_basic_company_data bolster.data_sources.companies_house.companies_house_record_might_be_farset bolster.data_sources.companies_house.get_companies_house_records_that_might_be_in_farset Module Contents --------------- .. py:data:: logger .. py:function:: get_basic_company_data_url() Parse the companies house website to get the current URL for the 'BasicCompanyData'. Currently uses the 'one file' method but it could be split into the multi files for memory efficiency .. py:function:: query_basic_company_data(query_func = always) Grab the url for the basic company data, and walk through the CSV files within. For each row in each CSV file, parse the row data through the given `query_func` such that if `query_func(row)` is True it will be yielded. .. py:function:: companies_house_record_might_be_farset(r) A heuristic function for working out if a record in the companies house registry *might* be based in Farset Labs. Almost certainly incomplete and needs more testing/validation. .. py:function:: get_companies_house_records_that_might_be_in_farset() Query Companies House records that might be located at Farset Labs.