Skip to main content

A client for querying data from the Renewables Ninja API.

Project description

NinjaClient

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.2.tar.gz (5.2 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.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ninjaclient-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 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.2.tar.gz
Algorithm Hash digest
SHA256 1e686bd98f25da180184e4ad65fab8cb194ce129392d7feb31452e0f50249ed8
MD5 1ad5c53f6127190781135466d972a3ae
BLAKE2b-256 c403116e7cca69255f4226e8a03f3c826313218ff3c150a005b7d33fc417158f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ninjaclient-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 16281faca00cab8de3e72051e12679ec4542b208b12b05f7e1dc17f5c2d6331b
MD5 7d0beadcd215158ae01ddb42a7106207
BLAKE2b-256 acd4a90054fc8ba2362287a639a6bf14ec30b4ac3303302c3faaff60b7ff3644

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