ClearOutsideAPY
Web scraper / parser for ClearOutside.com
Python module that downloads a clearoutside.com forecast page and parses the 7-day hourly astronomy weather table.
Version 2.0 is a C extension. There are no BeautifulSoup / html5lib / requests dependencies. Parsing a full page is typically 1–2 milliseconds; the remaining time is the HTTP round-trip.
A compiler is required to build from source. PyPI wheels ship the already-compiled extension.
Installation
From PyPI:
pip install clear-outside-apy
From the repo:
pip install git+https://github.com/TheElevatedOne/ClearOutsideAPY.git
Building a wheel / tarball for upload:
./build.sh
python -m twine upload dist/*
On Linux, ./build.sh runs auditwheel
so the wheel is tagged manylinux_* (PEP 600). PyPI rejects the older
linux_x86_64 platform tag. You need patchelf installed for that step.
macOS (macosx_*) and Windows (win_amd64) tags are accepted as-is.
For portable wheels across Python versions, use
cibuildwheel (config is in pyproject.toml).
Usage
from clear_outside_apy import ClearOutsideAPY
api = ClearOutsideAPY("43.16", "-75.84", view="midday")
api.update() # download again
result = api.pull() # parse; returns a dict
lat and long may be str, int, or float. They are formatted to two
decimal places, which is what the site uses.
lat = "43.16", long = "-75.84" -> New York area
https://clearoutside.com/forecast/43.16/-75.84
viewmidday— first column is 12:00midnight— first column is 00:00current— first column is the current local hour
experimental=True— also fetch Met.no and 7Timer extra rowsmetric=True(default) — visibility, wind speed, and moon distance in kmlon=is accepted as a keyword alias forlong
One-shot helper and HTML parser (no download):
from clear_outside_apy import fetch_forecast, parse
result = fetch_forecast(43.16, -75.84, view="current")
result = parse(open("forecast.html", "rb").read())
CLI:
clear-outside-apy 43.16 -75.84 --view midday
python -m clear_outside_apy 43.16 -75.84 --experimental
Output
Default units are metric, 24-hour clock.
| Field | Unit |
|---|---|
| Date | dd/MM/yy |
| Sky brightness | millicandela / m² (mcd/m2) |
| Artificial brightness | microcandela / m² (ucd/m2) |
| Visibility | kilometres (None when the site has -) |
| Precipitation | millimetres |
| Wind speed | kilometres / hour |
| Wind direction | compass name + degrees |
| Temperature | °C |
| Pressure | millibars |
| Ozone | Dobson units |
| Moon distance | kilometres |
Pass metric=False to keep the site's miles / mph for distance and wind.
The full dict is large (7 days × 24 hours). A captured example lives in example/example-result.json. Shape:
{
"location": {
"name": "Oneida Lake Beach West, Madison, United States of America",
"latitude": "43.16",
"longitude": "-75.84"
},
"url": "https://clearoutside.com/forecast/43.16/-75.84?view=midday",
"view": "midday",
"experimental": False,
"units": { "visibility": "km", "wind-speed": "km/h", "...": "..." },
"gen-info": {
"last-gen": { "date": "14/09/26", "time": "04:09:45" },
"forecast": { "from-day": "14/09/26", "to-day": "20/09/26" },
"timezone": "UTC-4.00"
},
"sky-quality": {
"magnitude": 21.3,
"bortle_class": 4,
"brightness": { "value": 0.33, "unit": "mcd/m2" },
"artif-brightness": { "value": 155.5, "unit": "ucd/m2" }
},
"forecast": {
"day-0": {
"date": { "long": "Monday", "short": "14" },
"sun": {
"rise": "06:42", "set": "19:16", "transit": "12:58",
"civil-dark": ["19:44", "06:14"],
"nautical-dark": ["20:18", "05:40"],
"astro-dark": ["20:53", "05:05"]
},
"moon": {
"rise": "10:38", "set": "20:07",
"phase": { "name": "Waxing Crescent", "percentage": 8 },
"meridian": {
"time": "14:53", "date": "13/09/2026",
"altitude": 33.0, "distance": 388599.37, "distance-unit": "km"
}
},
"hours": {
"12": {
"conditions": "ok",
"total-clouds": 45,
"low-clouds": 35,
"mid-clouds": 0,
"high-clouds": 1,
"visibility": None,
"fog": None,
"prec-type": "none",
"prec-probability": 0,
"prec-amount": 0.0,
"wind": { "speed": 9.66, "direction": "west-south-west", "degrees": 258 },
"frost": "none",
"temperature": { "general": 25, "feels-like": 27, "dew-point": 20 },
"rel-humidity": 72,
"pressure": 1012,
"ozone": 309,
"iss": None
}
}
}
}
}
ISS hours look like:
"iss": {
"start": { "time": "20:36:19", "direction": "W", "altitude": 10 },
"max": { "time": "20:39:19", "direction": "NNW", "altitude": 29 },
"end": { "time": "20:41:59", "direction": "NE", "altitude": 12 },
"magnitude": -1.6
}
With experimental=True each hour also has extra.metno and extra.timer
(7Timer cloud cover, seeing, lifted index, transparency).
Exceptions
InvalidLocationError— bad latitude / longitude / viewFetchError— HTTP or network failureParseError— HTML is not a Clear Outside forecast pageClearOutsideError— base class for all of the above
Metadata
Release files for clear-outside-apy 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clear_outside_apy-2.0.1.tar.gz | 261.6 kB | Without provenance | Details for clear_outside_apy-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clear_outside_apy-2.0.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.17+ x86-64 | Details for clear_outside_apy-2.0.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
Total release size: 361.6 kB
Release files / clear_outside_apy-2.0.1.tar.gz
| Download URL | clear_outside_apy-2.0.1.tar.gz |
|---|---|
| Size | 261.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2dc830954b28f6bfeb2f642aba558a88396c4163d8f9f91d040adf40a94b304
|
|
BLAKE2b-256 checksum How to use checksums |
375a48b29e0a15da51d9ccfc78162caf45a90350499526f14c44607cae765a99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / clear_outside_apy-2.0.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | clear_outside_apy-2.0.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 99.9 kB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d4b53a82e8d4ee931f81ea6a1c776e8887882d3f58f2e8132b32af33736a8f3a
|
|
BLAKE2b-256 checksum How to use checksums |
73ccec9dee12b823b8dca94415e49921bc6a90cd3f5e2fa1a8d0fcf63c943484
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for clear-outside-apy 2.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.