PHPackages                             lukundo/weather-client - 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. [API Development](/categories/api)
4. /
5. lukundo/weather-client

ActiveLibrary[API Development](/categories/api)

lukundo/weather-client
======================

A PHP package to fetch weather data from openWeather API

v1.0.0(9mo ago)02MITPHP

Since Aug 14Pushed 9mo agoCompare

[ Source](https://github.com/Stella05lulu/Weather-Client)[ Packagist](https://packagist.org/packages/lukundo/weather-client)[ RSS](/packages/lukundo-weather-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

WeatherClient
=============

[](#weatherclient)

WeatherClient is a reusable PHP Composer package for fetching current weather data from the OpenWeather API. It works in standalone PHP scripts and integrates easily with CodeIgniter 4.

Features
--------

[](#features)

- Accepts API key on initialization
- Fetches current weather for any city
- Adds `Authorization: Bearer {API_KEY}` header automatically
- Returns weather data as an associative array

Installation
------------

[](#installation)

Install via Composer:

```
composer require lukundo/weather-client
```

API Key Setup
-------------

[](#api-key-setup)

Get your API key from [OpenWeather](https://openweathermap.org/api) and pass it when initializing the client:

```
$client = new WeatherClient('your_api_key');
```

Usage
-----

[](#usage)

### Standalone PHP

[](#standalone-php)

```
require 'vendor/autoload.php';

use Lukundo\WeatherClient;

$client = new WeatherClient('your_api_key');
$weather = $client->getWeather('Ndola');
print_r($weather);
```

### CodeIgniter 4

[](#codeigniter-4)

```
use Lukundo\WeatherClient;

public function showWeather()
{
    $client = new WeatherClient('your_api_key');
    $data['weather'] = $client->getWeather('Ndola');
    return view('weather_view', $data);
}
```

Sample Output
-------------

[](#sample-output)

```
[
    'city' => 'Ndola',
    'temperature' => 23.5,
    'description' => 'clear sky',
    'humidity' => 60,
    'wind_speed' => 4.2
]
```

License
-------

[](#license)

MIT License

Contributing
------------

[](#contributing)

Feel free to open issues or submit pull requests.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance58

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

277d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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