ThemedWeatherImages 1.0.1

dotnet add package ThemedWeatherImages --version 1.0.1
                    
NuGet\Install-Package ThemedWeatherImages -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ThemedWeatherImages" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ThemedWeatherImages" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="ThemedWeatherImages" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ThemedWeatherImages --version 1.0.1
                    
#r "nuget: ThemedWeatherImages, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ThemedWeatherImages@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ThemedWeatherImages&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=ThemedWeatherImages&version=1.0.1
                    
Install as a Cake Tool

ThemedWeatherImages

ThemedWeatherImages provides reusable ASP.NET Core services for pairing current weather data with pre-generated themed daily images.

The library ships no theme defaults: the consuming host supplies the theme, subject, WeatherAPI credentials, fallback IP, and blob image settings. (Before Forever After, for example, uses it to implement Weather Squirrel.)

dotnet add package ThemedWeatherImages

Service Overview

Hosts that register the library expose these public routes:

  • GET /api/weather-service/current - Returns a JSON payload describing the detected location, a human-readable summary, and a conditionCategory string such as Rain, Clear, or Snow.
  • GET /api/weather-service/current?lat=32.8&lng=-96.8 - Uses explicit coordinates instead of IP-based fallback.
  • GET /api/weather-images/{fileName} - Proxies pre-rendered artwork from blob storage.

Read-Side Host Registration

ASP.NET Core hosts register the read-side API services with explicit options:

builder.Services.AddThemedWeatherImages(options =>
{
    options.Theme.DisplayName = "Weather Fox";
    options.Theme.SubjectName = "fox";
    options.Theme.SubjectSlug = "fox";
    options.Theme.ImageFileNamePrefix = "fox";

    options.WeatherApi.ApiKey = builder.Configuration["WeatherApi:ApiKey"];
    options.WeatherApi.DefaultIp = builder.Configuration["WeatherApi:DefaultIp"];
    options.Images.BlobBaseUrl = builder.Configuration["WeatherImages:BlobBaseUrl"];
    options.Images.BlobSasToken = builder.Configuration["WeatherImages:BlobSasToken"];
});

Required read-side values are validated during registration. Missing values fail startup instead of falling back to library defaults. WeatherImages:BlobSasToken is optional and lets the backend image proxy read from a private Blob container without exposing direct Blob URLs to browsers.

Generation Support

Azure Functions hosts register shared generation helpers separately:

services.AddThemedWeatherImageGenerationSupport(options =>
{
    options.Theme.DisplayName = configuration["ThemedWeatherImages:Theme:DisplayName"];
    options.Theme.SubjectName = configuration["ThemedWeatherImages:Theme:SubjectName"];
    options.Theme.SubjectSlug = configuration["ThemedWeatherImages:Theme:SubjectSlug"];
    options.Theme.ImageFileNamePrefix = configuration["ThemedWeatherImages:Theme:ImageFileNamePrefix"];
    options.Images.BlobContainerName = configuration["ThemedWeatherImages:Images:BlobContainerName"];
    options.Generation.PromptTemplate = configuration["ThemedWeatherImages:Generation:PromptTemplate"];
    options.Generation.Model = configuration["ThemedWeatherImages:Generation:Model"] ?? options.Generation.Model;
    options.Generation.CfgScale = configuration.GetValue<double?>("ThemedWeatherImages:Generation:CfgScale") ?? options.Generation.CfgScale;
    options.Generation.SamplerName = configuration["ThemedWeatherImages:Generation:SamplerName"] ?? options.Generation.SamplerName;
    options.Generation.Width = configuration.GetValue<int?>("ThemedWeatherImages:Generation:Width") ?? options.Generation.Width;
    options.Generation.Height = configuration.GetValue<int?>("ThemedWeatherImages:Generation:Height") ?? options.Generation.Height;
});

The website host should not pass Azure Function trigger URLs, function keys, AI Horde credentials, webhook secrets, or generation scheduling values.

Basic Frontend Consumption

The frontend remains ordinary HTTP consumption: call /api/weather-service/current, then probe image candidates such as:

/api/weather-images/fox-rain-20260525.webp

The frontend owns presentation and fallback UX. The backend owns weather lookup, condition mapping, image proxying, and cache headers.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ThemedWeatherImages:

Package Downloads
ThemedWeatherImages.Functions

Azure Functions isolated-worker function classes for ThemedWeatherImages background image generation: scheduled and manual AI Horde submissions, webhook ingestion of generated images, and a budget kill switch. Reference from a Functions host project that supplies theme configuration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 225 6/11/2026
1.0.0 128 6/11/2026