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(10mo ago)02MITPHP

Since Aug 14Pushed 10mo 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 today

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

26

—

LowBetter than 41% of packages

Maintenance53

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

324d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/160691288?v=4)[Stella05lulu](/maintainers/Stella05lulu)[@Stella05lulu](https://github.com/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

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M992](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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