{"id":17511732,"url":"https://github.com/claws/txbom","last_synced_at":"2026-01-21T17:11:40.346Z","repository":{"id":2261252,"uuid":"3217028","full_name":"claws/txBOM","owner":"claws","description":"txBOM is a Python Twisted package that allows you to retrieve forecasts and observations from the Australian Bureau of Meteorology.","archived":false,"fork":false,"pushed_at":"2018-03-04T12:53:22.000Z","size":33,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T11:37:27.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/claws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-19T11:32:49.000Z","updated_at":"2018-03-04T12:53:24.000Z","dependencies_parsed_at":"2022-09-04T22:10:15.992Z","dependency_job_id":null,"html_url":"https://github.com/claws/txBOM","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claws%2FtxBOM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claws%2FtxBOM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claws%2FtxBOM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claws%2FtxBOM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/claws","download_url":"https://codeload.github.com/claws/txBOM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247544920,"owners_count":20956078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-20T05:09:45.908Z","updated_at":"2026-01-21T17:11:40.318Z","avatar_url":"https://github.com/claws.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# txBOM\n\ntxBOM is a Python Twisted package that lets you retrieve forecasts and observations from the Australian Bureau of Meteorology (BOM).\n\nUse it to integrate non blocking retrieval of Australian Bureau of Meteorology forecasts and observations into your Python Twisted application.\n\n[![PyPi version](https://img.shields.io/pypi/v/txbom.svg)](https://pypi.python.org/pypi/txbom)\n\n## Software Dependencies\n\n* Python\n* Twisted\n\n  - zope.interface\n\n\n## Install\n\nA number of methods are available to install this package.\n\n* Using pip with PyPI as source:\n\n```bash\n$ [sudo] pip install txbom\n```\n\n* Using pip with github source:\n\n```bash\n$ [sudo] pip install git+git://github.com/claws/txBOM.git\n```\n\n* Manually download and install the txBOM archive. For other manual download options (zip, tarball) visit the github web page of [txBOM](https://github.com/claws/txBOM):\n\n```bash\n$ git clone git://github.com/claws/txBOM.git\n$ cd txBOM\n$ [sudo] python setup.py install\n```\n\n### Test Installation\n\n```bash\n$ python\n\u003e\u003e\u003e import txbom\n\u003e\u003e\u003e\n```\n\n## Examples\n\nExamples scripts can be found in the examples directory. From the examples directory the following scripts can be run (assuming the txbom package is installed or can be found using the PYTHONPATH):\n\n### Retrieve Forecast\nThis script demonstrates how to retrieve a forecast and also how the forecast can be parsed into a useful dict.\n\n```bash\n$ python retrieve_forecast.py\n```\n\nExample output:\n```python\nDEBUG:root:Forecast retrieval successful\nReceived forecast text:\nIDS10034\nAustralian Government Bureau of Meteorology\nSouth Australia\n\nAdelaide Forecast\nIssued at 5:20 am CDT on Friday 4 January 2013\nfor the period until midnight CDT Thursday 10 January 2013.\n\nWarning Summary at issue time\nFire Weather Warning for the Adelaide Metropolitan forecast district for Friday.\nDetails of warnings are available on the Bureau's website www.bom.gov.au, by\ntelephone 1300-659-215* or through some TV and radio broadcasts.\n\nForecast for the rest of Friday 4 January\nSunny. Very hot. Winds northeast to northwesterly 25 to 40 km/h tending west to\nnorthwesterly 20 to 30 km/h in the early afternoon ahead of milder south to\nsouthwesterly 20 to 30 km/h late afternoon or evening.\n\nCity Centre         Sunny. Evening milder change. Max 44\nChance of any rainfall: 0%\nRainfall: 0 mm\n\u003craw forecast text truncated for brevity\u003e\n\nForecast dict:\nfcast_date : Friday 4 January 2013\nfcast_five_days : [('Sunday 6 January', '17', '36', 'Sunny'), ('Monday 7 January', '22', '41', 'Sunny'), ('Tuesday 8 January', '22', '38', 'Sunny'), ('Wednesday 9 January', '18', '37', 'Mostly sunny'), ('Thursday 10 January', '18', '36', 'Sunny')]\nfcast_id : IDS10034\nfcast_raw : \u003craw forecast text truncated for brevity\u003e\nfcast_state : South Australia\nfcast_time : 5:20 am\nfcast_today : Friday 4 January\nfcast_today_content : Sunny. Very hot. Winds northeast to northwesterly 25 to 40 kilometers per hour tending west to northwesterly 20 to 30 kilometers per hour in the early afternoon ahead of milder south to southwesterly 20 to 30 kilometers per hour late afternoon or evening.\nfcast_today_precis : Sunny. Evening milder change. Max 44\nfcast_today_temperature : None\nfcast_tomorrow : Saturday 5 January\nfcast_tomorrow_maximum : 31\nfcast_tomorrow_minimum : 17\nfcast_tomorrow_precis : Sunny. Winds south to southeasterly 20 to 30 km/h, reaching 40 km/h about the\nfcast_town : Adelaide\nfcast_uv_alert : 9:10 am to 5:40 pm\nfcast_uv_index : 13\nfcast_uv_index_name : Extreme\nfcast_warnings : Fire Weather Warning for the Adelaide Metropolitan forecast district for Friday.\n```\n\n### Retrieve Observations\nThis script demonstrates how to use txbom to retrieve weather observations. Weather observations are published to the BOM site approximately every half hour. Using this approach you would need to manage how often you retrieve the observations to keep them current.\n\n```bash\n$ python retrieve_observations.py\n```\n\nExample output:\n```python\nDEBUG:root:Retrieving observations from url http://www.bom.gov.au/fwo/IDS60901/IDS60901.94675.json\nDEBUG:root:Requesting new observation data from: http://www.bom.gov.au/fwo/IDS60901/IDS60901.94675.json\nDEBUG:root:Retrieved new observation data\nCurrent observation data:\naifstime_utc : 20130104043000\nair_temp : 44.3\napparent_t : 37.6\ncloud : None\ncloud_base_m : None\ncloud_oktas : None\ncloud_type : None\ncloud_type_id : None\ndelta_t : 24.0\ndewpt : -4.5\ngust_kmh : 35\ngust_kt : 19\nhistory_product : IDS60901\nlat : -34.9\nlocal_date_time : 04/03:00pm\nlocal_date_time_full : 20130104150000\nlon : 138.6\nname : Adelaide\npress : 1002.8\npress_msl : 1002.8\npress_qnh : 1002.9\npress_tend : None\nrain_trace : 0.0\nrel_hum : 5\nsea_state : None\nsort_order : 0\nswell_dir_worded : None\nswell_height : None\nswell_period : None\nvis_km : None\nweather : None\nwind_dir : NW\nwind_spd_kmh : 22\nwind_spd_kt : 12\nwmo : 94675\n```\n\n### Use the observations client to maintain up to date observations\n\nThis example demonstrates how to use the txbom observations client to automatically keep weather observations up to date.\n\nThe observations client keeps itself up to date by inspecting the first observation retrieved and determines the appropriate time to begin the periodic observations retrieval such that the minimum number of requests are made to keep the observations client up to date.\n\nAs the observation update rate is 30 minutes this demonstration can be a little underwhelming to watch. The important point to understand is that you can create one of these objects and it will call you back when a new observation has been retrieved, it does all the work for you.\n\nCtrl+C will exit this long running script:\n```bash\n$ python observations_client.py\n```\n\nExample output:\n```python\nINFO:root:BoM Observation Client starting\nDEBUG:root:Requesting new observation data from: http://www.bom.gov.au/fwo/IDS60901/IDS60901.94675.json\nINFO:twisted:Starting factory \u003cHTTPClientFactory: http://www.bom.gov.au/fwo/IDS60901/IDS60901.94675.json\u003e\nDEBUG:root:Retrieved new observation data\nCurrent observation data:\naifstime_utc : 20130104050000\nair_temp : 44.0\napparent_t : 37.1\ncloud : None\ncloud_base_m : None\ncloud_oktas : None\ncloud_type : None\ncloud_type_id : None\ndelta_t : 24.0\ndewpt : -5.9\ngust_kmh : 30\ngust_kt : 16\nhistory_product : IDS60901\nlat : -34.9\nlocal_date_time : 04/03:30pm\nlocal_date_time_full : 20130104153000\nlon : 138.6\nname : Adelaide\npress : 1002.7\npress_msl : None\npress_qnh : 1002.7\npress_tend : None\nrain_trace : 0.0\nrel_hum : 4\nsea_state : None\nsort_order : 0\nswell_dir_worded : None\nswell_height : None\nswell_period : None\nvis_km : None\nweather : None\nwind_dir : NW\nwind_spd_kmh : 22\nwind_spd_kt : 12\nwmo : 94675\nINFO:root:Scheduling the periodic observation retrieval task to begin after delay of: 0:08:58.307281\nINFO:twisted:Stopping factory \u003cHTTPClientFactory: http://www.bom.gov.au/fwo/IDS60901/IDS60901.94675.json\u003e\n```\n\n## Todo\n\n* Investigate adding locations (State, City) as a separate package so that users don't need to determine the forecast identifier or observation url.\n\n\n[![Analytics](https://ga-beacon.appspot.com/UA-29867375-2/txBOM/readme?pixel)](https://github.com/claws/txBOM)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaws%2Ftxbom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaws%2Ftxbom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaws%2Ftxbom/lists"}