Skip to main content

illumipy is a Python module for estimating outside Illumination levels for given location, date and time.

Project description

+illumipy+ is a Python module for estimating outside Illumination levels for given location, date and time. Requires an OpenWeatherMap API-key (see: https://openweathermap.org/appid)

Current limitations:

  • cloud level, sunrise and sunset are not available for dates in the past. Results might therefore be unreliable. Times for sunrise and sunset will always be for the current day.
  • at 100% cloud coverage, Results might be unreliable.

To use the module, simply import illumipy and call the function data.light_data(): This returns a dictionary object with the following information:

  • ['illuminance']: Outside Brightness in Lux
  • ['time']: Time used as %-H (e.g. 4 or 12)
  • ['date']: Date used as YYYY-MM-DD
  • ['city']: City Used
  • ['country']: Country Used
  • ['cloud_coverage']: Cloud coverage in %
  • ['et_illuminance']: Extraterrestrial Illuminance in Lux
  • ['direct_illuminance']: Direct Illuminance in Lux
  • ['horizontal_illuminance']: Horizontal Illuminance in Lux
  • ['horizontal_sky_illuminance']: Horizontal Sky Illuminance in Lux
  • ['sunrise']: Time of Sunrise as hh:mm
  • ['sunset']: Time of sunset as hh:mm
  • ['sun_altitude']: Sund altitude at [Time] in degrees.
  • ['day']: True if there is daylight at [Time].
  • ['clear_sky_index'] = Aproximation of Clear Sky Index based on cloud coverage
  • ['cs_irradiance'] = Estimated Clear Sky Irradiance in W/m^2 based on solar altitude.
  • ['irradiance'] = Estimated current Irradiance in W/m^2 based on solar altitude and cloud coverage.

It Takes the following arguments:

  • time: str=[0-24], date: str=[YYYY-MM-DD], city: str=['City'], country: str=['Country'], api_key: str=['api_key'], cloud_coverage: int=[0-100]

if no arguments are provided, defaults to values defined in defaults.py.

Requirements:

  • Python3
  • Python packages:
    • requests
    • logging
    • math
    • sys
    • datetime
    • argparse
  • OpenWeatherMap API-Key

Author: Kalle Fornia
GitHub: https://github.com/duckwilliam/illumipy
PyPi: https://pypi.org/project/illumipy
Version: 1.1.0 10/2023

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

illumipy-1.2.185.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

illumipy-1.2.185-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file illumipy-1.2.185.tar.gz.

File metadata

  • Download URL: illumipy-1.2.185.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Linux/4.19.87-24217537

File hashes

Hashes for illumipy-1.2.185.tar.gz
Algorithm Hash digest
SHA256 1b2682ad2d42403cb19e30a64f626960acbe41a3ea50b78916da6ec7f3a64a5c
MD5 d71648fb84c8740ee76d33b4734b4cd4
BLAKE2b-256 f1dd127aa63de9405ceff946cf585ba813511219fa83e1bad9b6c962763a82f0

See more details on using hashes here.

File details

Details for the file illumipy-1.2.185-py3-none-any.whl.

File metadata

  • Download URL: illumipy-1.2.185-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Linux/4.19.87-24217537

File hashes

Hashes for illumipy-1.2.185-py3-none-any.whl
Algorithm Hash digest
SHA256 18013627fb86f00089109f4a89ce832290b3f7bbe0f0fef9c96ee29889d1ed98
MD5 f4af91af46246f78d7ddc428a9a8c2af
BLAKE2b-256 41c2114dd9f2d84527984d5fd1b42760de9586f7c723901409012947fe9d323d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page