PHPackages                             matthewhallcom/pirate-weather-php - 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. matthewhallcom/pirate-weather-php

ActiveLibrary[API Development](/categories/api)

matthewhallcom/pirate-weather-php
=================================

PHP Library for the Pirate Weather API.

v1.1.0(3y ago)11742MITPHPPHP &gt;=5.6

Since Mar 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/MatthewHallCom/pirate-weather-php)[ Packagist](https://packagist.org/packages/matthewhallcom/pirate-weather-php)[ RSS](/packages/matthewhallcom-pirate-weather-php/feed)WikiDiscussions main Synced yesterday

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

Pirate Weather PHP
==================

[](#pirate-weather-php)

PHP Library for the [Pirate Weather API](https://pirateweather.net/).

This is a fork of the [dmitry-ivanov/dark-sky-api](https://github.com/dmitry-ivanov/dark-sky-api) package.

Usage
-----

[](#usage)

1. Install the package via Composer:

    ```
    composer require matthewhallcom/pirate-weather-php
    ```
2. Use the `MatthewHallCom\PirateWeather\PirateWeather` class:

    ```
    use MatthewHallCom\PirateWeather\PirateWeather;

    $forecast = (new PirateWeather('secret-key'))
        ->location(46.482, 30.723)
        ->forecast('daily');

    echo $forecast->daily()->summary();
    ```

Time Machine Requests
---------------------

[](#time-machine-requests)

Sometimes it might be useful to get weather for the specified date:

```
$timeMachine = (new PirateWeather('secret-key'))
    ->location(46.482, 30.723)
    ->timeMachine('2020-01-01', 'daily');

echo $timeMachine->daily()->summary();
```

You can also get weather for multiple dates:

```
$timeMachine = (new PirateWeather('secret-key'))
    ->location(46.482, 30.723)
    ->timeMachine(['2020-01-01', '2020-01-02', '2020-01-03'], 'daily');

echo $timeMachine['2020-01-02']->daily()->summary();
```

Usage in Laravel
----------------

[](#usage-in-laravel)

> If you're using Laravel &lt;5.5, you have to register service provider and alias by yourself!

1. Publish the config:

    ```
    php artisan vendor:publish --provider="MatthewHallCom\PirateWeather\Adapters\Laravel\PirateWeatherServiceProvider"
    ```
2. Set your secret key in the `.env` file:

    ```
    PIRATE_WEATHER_KEY="Your-Secret-Key"
    ```
3. Use the `PirateWeather` facade:

    ```
    use PirateWeather;

    $forecast = PirateWeather::location(46.482, 30.723)
        ->forecast('daily');

    echo $forecast->daily()->summary();
    ```

License
-------

[](#license)

Pirate Weather PHP is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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 ~41 days

Total

2

Last Release

1151d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1230091?v=4)[Matthew Hall](/maintainers/MatthewHallCom)[@MatthewHallCom](https://github.com/MatthewHallCom)

---

Top Contributors

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

---

Tags

phpapilaravellaravel-packageweatherforecastpirate-weather-apipirate-weatherpirate-weather-php

### Embed Badge

![Health badge](/badges/matthewhallcom-pirate-weather-php/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k39](/packages/neuron-core-neuron-ai)[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k9.5M89](/packages/openai-php-laravel)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M159](/packages/algolia-algoliasearch-client-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.7k409.0k6](/packages/theodo-group-llphant)

PHPackages © 2026

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