wttrin

A library with functions to fetch weather data from wttr.in

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License GPL-3.0-or-later
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:25

Installation

nimble install wttrin
choosenim install wttrin
git clone https://github.com/Infinitybeond1/wttrin

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
wttrin - - - - - - -

Source

Repository https://github.com/Infinitybeond1/wttrin
Homepage https://github.com/Infinitybeond1/wttrin
Registry Source nimble_official

README

wttrin

A small nim library that fetches weather from wttr.in

IMPORTANT: if you use this library in your code you will need to build your nim project with the ssl flag

nim c -r -d:ssl <filename>

Usage

getTemp()

The first (and most used) function is getTemp()
This function has an optional parameter city which should be a city in lowercase
If the city parameter isn't provided it defaults to using your current location

import wttrin

echo getTemp

getCondition()

Another function, 'getCondition()', can be used to get the weather condition as an emoji

import wttrin

echo getCondition

getUnit()

The final function, 'getUnit()', can be used to get the current unit of weather

import wttrin

echo getUnit