提供PiWeatherRock的ClimaCell预测数据

piweatherrock-data-climacell的Python项目详细描述


piweatherrock数据顶极单元

GitHubPyPI

这是piweatherrock-data-climacellPython模块的源代码。它的目的是从ClimaCell API获取PiWeatherRock所需的数据。在

导入

要使用此模块,您需要添加以下import语句:

frompiweatherrock.data_climacellimportpwr_data

命令行接口

此模块主要作为PiWeatherRock的组件存在,但也可以单独使用。它包含一个名为pwr-climacell-data的cli,它将返回通常以JSON格式传递给PiWeatherRock的数据。这对于验证ClimaCell API返回的数据非常有用。在

例如,要查看与佐治亚州亚特兰大市相关的数据:

^{pr2}$

运行上面的命令会产生类似的结果:

{"hours":[{"forecasted_conditions_icon":{"value":"clear"},"forecasted_precipitation_probability":{"value":0,"units":"%"},"forecasted_temp":{"value":72.88,"units":"F"}},{"forecasted_conditions_icon":{"value":"clear"},"forecasted_precipitation_probability":{"value":0,"units":"%"},"forecasted_temp":{"value":69.98,"units":"F"}},[trimmed]{"forecasted_conditions_icon":{"value":"clear"},"forecasted_precipitation_probability":{"value":0,"units":"%"},"forecasted_temp":{"value":77,"units":"F"}}],"day0":{"current_conditions_string":{"value":"clear"},"current_epa_aqi":{"value":69},"current_epa_health_concern":{"value":"Moderate"},"current_epa_pm10":{"value":34,"units":"µg/m3"},"current_epa_pm25":{"value":8,"units":"µg/m3"},"current_humidity":{"value":37.5,"units":"%"},"current_pollen_tree":{"value":5,"units":"Climacell Pollen Index"},"current_pollen_weed":{"value":null,"units":"Climacell Pollen Index"},"current_pollen_grass":{"value":1,"units":"Climacell Pollen Index"},"current_precipitation_rate":{"value":0,"units":"in/hr"},"current_precipitation_type":{"value":"none"},"current_temp_feels_like":{"value":75.2,"units":"F"},"current_temp_real":{"value":75.2,"units":"F"},"current_wind_direction":{"value":221.06,"units":"degrees"},"current_wind_speed":{"value":4.89,"units":"mph"},"forecasted_conditions_icon":{"value":"clear"},"forecasted_moon_phase":{"value":"waxing_gibbous"},"forecasted_sunrise":{"value":"2020-05-02T10:46:55.740Z"},"forecasted_sunset":{"value":"2020-05-03T00:21:50.569Z"},"forecasted_temp_low":{"value":65.16,"units":"F"},"forecasted_temp_high":{"value":84.58,"units":"F"},"forecasted_time_high_temp":{"value":"2020-05-02T20:00:00Z"},"forecasted_time_low_temp":{"value":"2020-05-03T09:00:00Z"},"forecasted_precipitation_probability":{"value":0,"units":"%"}},"day1":{"forecasted_conditions_icon":{"value":"drizzle"},"forecasted_moon_phase":{"value":"waxing_gibbous"},"forecasted_sunrise":{"value":"2020-05-03T10:45:58.195Z"},"forecasted_sunset":{"value":"2020-05-04T00:22:37.172Z"},"forecasted_temp_low":{"value":63.77,"units":"F"},"forecasted_temp_high":{"value":86.06,"units":"F"},"forecasted_time_high_temp":{"value":"2020-05-03T20:00:00Z"},"forecasted_time_low_temp":{"value":"2020-05-03T11:00:00Z"},"forecasted_precipitation_probability":{"value":15,"units":"%"}},"day2":{"forecasted_conditions_icon":{"value":"drizzle"},[trimmed]},"day3":{"forecasted_conditions_icon":{"value":"rain_light"},[trimmed]},"observation_time":"2020-05-03T01:34:13.050Z"}

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java JavaFX SwingWorker等价物?   java如何检查一个字符串只包含数字和一个小数点?   java遇到了异常组织。阿帕奇。卡塔琳娜。LifecycleException:无法启动组件   java如何从日期格式获取最低计时单位?   java应用服务器与开发过程的集成   java我无法运行Junit测试   无法在java多线程处理中维护生产者任务的顺序   java如何在CLI应用程序中“拦截”Ctrl+C?   java如何使用JSch进行原子SFTP文件传输,以便在写入过程完成之前无法访问该文件?   java当用户摆弄html范围滑块时,如何更改内容(文本)?   如何在Java中向现有文件追加文本?   JUnit测试中的java模拟Apache驼峰位置   java Maven更新项目和依赖项