PHPackages                             ainpy/weather - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ainpy/weather

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ainpy/weather
=============

A weather SDK.

0.0.1(6y ago)07MITPHPCI failing

Since Jan 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ainpy/weather)[ Packagist](https://packagist.org/packages/ainpy/weather)[ RSS](/packages/ainpy-weather/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

**Weather**
-----------

[](#weather)

基于 [高德开放平台](https://lbs.amap.com/api/webservice/guide/api/weatherinfo/) 的 PHP 天气信息组件。
[![Build Status](https://camo.githubusercontent.com/5100a1661e4dbb8f8195a3a48be0b0cf101e4216825052692300a5086c88219f/68747470733a2f2f7472617669732d63692e6f72672f61696e70792f776561746865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ainpy/weather)
[![StyleCI build status](https://camo.githubusercontent.com/ebd25d1fa47e1cab40dd248bfeacac425e3856273710be10dd0497f4ae422430/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3233313334303936312f736869656c64)](https://camo.githubusercontent.com/ebd25d1fa47e1cab40dd248bfeacac425e3856273710be10dd0497f4ae422430/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3233313334303936312f736869656c64)

**安装**
------

[](#安装)

`$ composer require ainpy/weather -vvv`

**配置**
------

[](#配置)

在使用本扩展之前，你需要去 [高德开放平台](https://lbs.amap.com/api/webservice/guide/api/weatherinfo/) 注册账号，然后创建应用，获取应用的 API KEY。

**使用**
------

[](#使用)

```
use Ainpy\Weather\Weather;

$key = 'xxx';

$weather = new Weather($key);

```

**获取实时天气**

```
$response = $weather->getWeather('北京');

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2328d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d36ab3022cf0ab7477952a7253600995f49be6ef2b49b2a0459dc7fc8f16a5d2?d=identicon)[ainpy](/maintainers/ainpy)

---

Top Contributors

[![ainpy](https://avatars.githubusercontent.com/u/24987582?v=4)](https://github.com/ainpy "ainpy (11 commits)")

### Embed Badge

![Health badge](/badges/ainpy-weather/health.svg)

```
[![Health](https://phpackages.com/badges/ainpy-weather/health.svg)](https://phpackages.com/packages/ainpy-weather)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
