octopust

Crates.iooctopust
lib.rsoctopust
version0.4.0
created_at2025-06-19 09:46:30.743833+00
updated_at2025-07-22 13:13:50.386192+00
descriptionA high-performance, idiomatic Rust client for the Octopus Energy API.
homepagehttps://github.com/ishantanu/octopust
repositoryhttps://github.com/ishantanu/octopust
max_upload_size
id1718056
size101,888
Shantanu Deshpande (ishantanu)

documentation

https://docs.rs/octopust

README

octopust

rust-clippy analyze

octopust is an idiomatic, high-performance Rust client for the Octopus Energy API.
Built for speed, safety, and ergonomics, it helps you interact with Octopus Energy's Kraken platform with ease. 🐙⚡


Features

  • Async/await support for high performance
  • Strongly-typed request and response models using Serde
  • Simple and extensible API client
  • Covers core Octopus Energy endpoints (products, accounts, consumption and industry)
  • Comprehensive error handling
  • Well-documented and tested

Supported APIs

octopust currently supports the following public Octopus Energy API endpoints:

  • Products: List available electricity and gas products/tariffs.
  • Tariffs & Rates: Retrieve tariff unit rates and standing charges.
  • Consumption: Fetch electricity and gas consumption data by MPAN/MPRN.
  • Industry Reference Data: Get grid supply points (GSPs).

Example

use octopust::Client;

#[tokio::main]
async fn main() {
    let client = Client::new("YOUR_API_KEY");
    match client.list_products(ProductQuery {
        ..Default::default()
    }).await {
        Ok(products) => {
            for product in products {
                println!("{:?}", product);
            }
        }
        Err(e) => eprintln!("Error: {:?}", e),
    }
}

Getting Started

  1. Add to your Cargo.toml:

    octopust = "0.3.0"
    
  2. See the examples/ directory for more usage patterns.

Documentation

Contributing

Contributions are welcome! Please open issues or PRs for bug reports, feature requests, or documentation improvements.

License

MIT


octopust is not affiliated with Octopus Energy.
Logo and trademark rights belong to their respective owners.

Commit count: 14

cargo fmt