Skip to main content

A client for querying data from the Renewables Ninja API.

Project description

NinjaClient

Documentation Status codecov CI

NinjaClient is a Python library designed to simplify accessing and querying data from the Renewables Ninja API. It provides an easy-to-use interface for fetching detailed renewable energy data, including solar and wind energy generation estimates. Whether you're conducting research, analyzing energy markets, or building renewable energy forecasting models, NinjaClient offers the tools you need to get the data quickly and efficiently.

Features

  • Fetch solar generation data based on location, time, and panel specifications.
  • Retrieve wind energy data by specifying turbine details, location, and time range.
  • Handle API rate limiting gracefully with built-in waiting and retry mechanisms.
  • Simplify the process of working with renewable energy data for analysis and modeling.

Installation

To install NinjaClient, you need Python 3.9 or later. It's recommended to install NinjaClient within a virtual environment. Run the following command to install:

pip install ninjaclient

Quick Start

Here's a quick example to get you started with NinjaClient:

from ninjaclient import NinjaClient

# Initialize the client with your API token
ninja_client  = NinjaClient(web_token='YOUR_API_TOKEN_HERE')

df_countries = ninja_client.get_countries()
limits = ninja_client.get_limits()

# Fetch wind generation data
df_wind, wind_meta = ninja_client.get_wind_dataframe(
    lat=56,
    lon=6,
    date_from="2000-01-01",
    date_to="2001-12-31"
)

# Fetch solar generation data
df_solar, solar_meta = ninja_client.get_solar_dataframe(
    lat=56,
    lon=6,
    date_from="2000-01-01",
    date_to="2001-12-31"
)

The API Token you can find under your Renewable Ninja profile.

Documentation

For detailed documentation on all available methods and their parameters, please refer to the Renewables Ninja API documentation.

Contributing

Contributions to NinjaClient are welcome! If you have suggestions for improvements or bug fixes, please open an issue or submit a pull request.

License

NinjaClient is released under the MIT License. See the LICENSE file for more details.

Acknowledgments

Thanks to the Renewables Ninja project for providing the API that this client library interacts with. This project is not officially associated with the Renewables Ninja project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ninjaclient-0.1.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ninjaclient-0.1.3-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file ninjaclient-0.1.3.tar.gz.

File metadata

  • Download URL: ninjaclient-0.1.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1019-azure

File hashes

Hashes for ninjaclient-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ef612e4af4734c7a132c92c49d7ad47f7a33e94be9ff2541062310342c069852
MD5 75c818cf4cbd5f40f3c469688383077e
BLAKE2b-256 fbfa0fc8dc48769a164544b128c45205ff28ac691334420ed0473fc18c3f8aed

See more details on using hashes here.

File details

Details for the file ninjaclient-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ninjaclient-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1019-azure

File hashes

Hashes for ninjaclient-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f2eca95ad98bfb05b6b0a14cc0a70bfbf7184426f3b88ddb03734fce668a5d8a
MD5 8205126085dbc510bb37ccb5d0f71811
BLAKE2b-256 a631b4da9c2edf6d52eaa86e0b9fdc7e3054f979efb9a70be37160a1e8eabd07

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page