PHPackages                             artes/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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. artes/weather

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

artes/weather
=============

Anax Weather module.

v1.1.0(5y ago)0191[1 PRs](https://github.com/ahonson/weather/pulls)MITPHPPHP &gt;=7.3

Since Dec 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ahonson/weather)[ Packagist](https://packagist.org/packages/artes/weather)[ RSS](/packages/artes-weather/feed)WikiDiscussions main Synced 5d ago

READMEChangelogDependencies (5)Versions (7)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/e72325ee0fd45da810fff34918322f72552c9e2e7a17f86acbd610c43cbd1b2b/68747470733a2f2f706f7365722e707567782e6f72672f61727465732f776561746865722f76)](//packagist.org/packages/artes/weather)[![Total Downloads](https://camo.githubusercontent.com/233e0c27127ac9c2b80d3545174f109962ff2ba4b5243456b007cb5a08e370bc/68747470733a2f2f706f7365722e707567782e6f72672f61727465732f776561746865722f646f776e6c6f616473)](//packagist.org/packages/artes/weather)

[![Build Status](https://camo.githubusercontent.com/e57f085513fd3c857097b9d9f6c6dd1edf906a36be652f1605974962183af02e/68747470733a2f2f7472617669732d63692e636f6d2f61686f6e736f6e2f776561746865722e7376673f6272616e63683d6d61696e)](https://travis-ci.com/ahonson/weather)[![Gitter](https://camo.githubusercontent.com/5269e97261a71a45f3b18400e6fd8c5d44b0e400782cd407c3288ec5daf20936/68747470733a2f2f6261646765732e6769747465722e696d2f61686f6e736f6e2f776561746865722e737667)](https://gitter.im/ahonson/weather?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)[![Maintainability](https://camo.githubusercontent.com/7c3bd85921a20e2f42a47daeab54f84cbbf98cb28bbac726326d54b4f80ebc7e/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f33376537316336653536303338363164613834302f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/ahonson/weather/maintainability)[![CircleCI](https://camo.githubusercontent.com/fb79536c595907290b3835f7bd4220e2eac920312ef1cd580d4bb927bbe166f6/68747470733a2f2f636972636c6563692e636f6d2f67682f61686f6e736f6e2f776561746865722e7376673f7374796c653d737667)](https://circleci.com/gh/ahonson/weather)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3982ac8d3e9cbaa6aec51861c3b227bc7d02f071af6ca5c6701f2b6a6fdb66d3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61686f6e736f6e2f776561746865722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/ahonson/weather/?branch=main)[![Code Coverage](https://camo.githubusercontent.com/3c841f9884c5e94f44c2db323250808a43f85217b9be6d60ca2dfaf06eb2824d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61686f6e736f6e2f776561746865722f6261646765732f636f7665726167652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/ahonson/weather/?branch=main)[![Build Status](https://camo.githubusercontent.com/221de84731438d0ce349832b284d032f5918f074add3c093eb615abfbd2f044f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61686f6e736f6e2f776561746865722f6261646765732f6275696c642e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/ahonson/weather/build-status/main)[![Code Intelligence Status](https://camo.githubusercontent.com/4cebf5b810520c13c887bd4eaa4c378870183f68e8322912103becdb0c4e0479/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61686f6e736f6e2f776561746865722f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d61696e)](https://scrutinizer-ci.com/code-intelligence)

Anax module for weather services and IP validation
==================================================

[](#anax-module-for-weather-services-and-ip-validation)

This module has been created for the course *Webbaserade ramverk och designmönster* at Blekinge Tekniska Högskola, fall 2020. The module is meant to be incorporated with the [Anax](https://github.com/canax/anax-ramverk1-me) framework.

Usage
-----

[](#usage)

### Step 1: Install the module using composer.

[](#step-1-install-the-module-using-composer)

`composer require artes/weather`

### Step 2: Integrate the module into your Anax base by copying the necessary files

[](#step-2-integrate-the-module-into-your-anax-base-by-copying-the-necessary-files)

`# Go to the root of your Anax base repo and run these two commands`

`rsync -av vendor/artes/weather/config ./`

`rsync -av vendor/artes/weather/view ./`

Run even these commands if you want to execute the unit tests of the module with `make test` from the root of you Anax base.

`rsync -av vendor/artes/weather/src ./`

`rsync -av vendor/artes/weather/test ./`

### Step 3: Add your API-keys

[](#step-3-add-your-api-keys)

The module makes use of [ipstack](https://ipstack.com/) and [openweathermap](https://openweathermap.org/) to provide the user with information about a given IP-address or about a valid pair of geographical coordinates.

Create an account on both sites and save your API-keys in `config/api/apikeys.php` according to the instructions in the comments. If you miss this step certain classes may not work as expected.

### Step 4: Protect your API-keys

[](#step-4-protect-your-api-keys)

Update your `.gitignore` with the following line in your Anax base.

`/config/api`

### Step 5: Update your navbar

[](#step-5-update-your-navbar)

Add *IP* and *Weather* to your navbar via `config/navbar/header.php` and via `config/navbar/responsive.php`

You will need to insert the following lines of code into the `items`-key in the above files.

```
[
    "text" => "IP",
    "url" => "ip/init",
    "title" => "IP validator",
],
[
    "text" => "Väder",
    "url" => "weather",
    "title" => "Väder API",
],

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Every ~1 days

Total

5

Last Release

1986d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54100408?v=4)[ahonson](/maintainers/ahonson)[@ahonson](https://github.com/ahonson)

---

Top Contributors

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

---

Tags

validationgeolocationmoduleOpenWeatherMapipstack

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[giggsey/libphonenumber-for-php

A library for parsing, formatting, storing and validating international phone numbers, a PHP Port of Google's libphonenumber.

5.0k148.7M416](/packages/giggsey-libphonenumber-for-php)[giggsey/libphonenumber-for-php-lite

A lite version of giggsey/libphonenumber-for-php, which is a PHP Port of Google's libphonenumber

8412.9M47](/packages/giggsey-libphonenumber-for-php-lite)[stroker/form

ZF2 module for extending forms with live clientside validation

4157.1k](/packages/stroker-form)[phpexperts/datatype-validator

An easy to use data type validator (both strict and fuzzy).

141.1M2](/packages/phpexperts-datatype-validator)[progsmile/request-validator

Simple PHP Request Validator

33113.3k1](/packages/progsmile-request-validator)

PHPackages © 2026

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