Skip to main content

Python Wrapper for Visual Crossing Weather API

This Python Wrapper retrives data from the Visual Crossing API. Visual Crossing has an extensive Weather API for both historical and forecast weather data, and they have a Free Tier API Key which enables up to 1000 calls per day.

In order to get started you must create an Account with Visual Crossing and then create an API Key. You do this by accessing this website and clicking on the Free plan. Then follow the instructions to create and account and store your key in a safe place.

Usage

Install the module by using this command in a terminal: pip install pyVisualCrossingUK

And then see test_module.py and async_test_module.py for usage examples, both standard and async. (Async example not yet created)

Parameters

# Initialise the module
vcapi = VisualCrossing(
    api_key,
    latitude,
    longitude,
    days=7,
    language="da"
)
Parameter Required Default Description
api_key Yes None This is the API Key you signed up for from Visual Crossing. See above for instructions
latitude Yes None Latitude for the location position
longitude Yes None Longitude for the location position
days No 14 Numbers of days to retrieve forecast for. 14 days means today plus the next 14 days. On the Free plan, this is the maximum number of days
language No en The language in which text strings should be returned. Se below for list of valid languages.
session No None A session variable. Only used when using the async function.

For an in-depth description of the Visual Crossing API, go here

Languages

Available languages include: ar (Arabic), bg (Bulgiarian), cs (Czech), da (Danish), de (German), el (Greek Modern), en (English), es (Spanish), fa (Farsi), fi (Finnish), fr (French), he (Hebrew), hu, (Hungarian), it (Italian), ja (Japanese), ko (Korean), nl (Dutch), pl (Polish), pt (Portuguese), sr (Serbian), sv (Swedish), tr (Turkish), uk (Ukranian), vi (Vietnamese) and zh (Chinese).

Metrics

All records are returned using the UK unit system. There is no conversion possible at the moment.

Weather variable Measurement Unit
Datetime UTC datetime
Temperature, Heat Index & Wind Chill Degrees Celcius
Precipitation Millimeters
snow Centimeters
Wind & Wind Gust Miles Per Hour
Visibility Miles
Pressure Millibars (Hectopascals)
Solar Radiation W/m2
Solar Energy MJ/m2

Icons

We use the Iconset icons2, which gives a more detailed description of the conditions.

Icon id Weather Conditions
snow Amount of snow is greater than zero
snow-showers-day Periods of snow during the day
snow-showers-night Periods of snow during the night
thunder-rain Thunderstorms throughout the day or night
thunder-showers-day Possible thunderstorms throughout the day
thunder-showers-night Possible thunderstorms throughout the night
rain Amount of rainfall is greater than zero
showers-day Rain showers during the day
showers-night Rain showers during the night
fog Visibility is low (lower than one kilometer or mile)
wind Wind speed is high (greater than 30 kph or mph)
cloudy Cloud cover is greater than 90% cover
partly-cloudy-day Cloud cover is greater than 20% cover during day time.
partly-cloudy-night Cloud cover is greater than 20% cover during night time.
clear-day Cloud cover is less than 20% cover during day time
clear-night Cloud cover is less than 20% cover during night time

TODO

  • Add all available items to the Data Structure
  • Create async_test_module.py in the samples directory

Metadata

Release files for pyVisualCrossingUK 0.1.16.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyVisualCrossingUK 0.1.16.17
File Size Uploaded
pyvisualcrossinguk-0.1.16.17.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyVisualCrossingUK 0.1.16.17
File Interpreter ABI Platform
pyvisualcrossinguk-0.1.16.17-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / pyvisualcrossinguk-0.1.16.17.tar.gz

Download URL pyvisualcrossinguk-0.1.16.17.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
992e42629752ee5f2eee65cbee57a91d9b33bab34687b2a277f815006c3a93d3
BLAKE2b-256 checksum
How to use checksums
6553e47f5d6d4dd073ba387d33aa54fec6a673ce6a69ff861f7f0170cfe53fc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 18, 2025.

Transparency log

Release files / pyvisualcrossinguk-0.1.16.17-py3-none-any.whl

Download URL pyvisualcrossinguk-0.1.16.17-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28189e9ec72f7510945f721cc0146c43d486d6ee5c351d1af20804fc16a2c227
BLAKE2b-256 checksum
How to use checksums
16b57a1103923b91c6d5e3850630d8a3e8ebb44dafa9b6803b880bc828050b1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 18, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.16.17 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page