Final Fantasy XIV weather & time tools.
Project description
EorzeaEnv
Installation
pip install eorzeaenv
Usage
from EorzeaEnv import EorzeaLang
from EorzeaEnv import EorzeaTime
from EorzeaEnv import EorzeaWeather
Eorzea Time
>>> EorzeaTime.now()
'EorzeaTime(Sixth Embral Moon, 11, 21, 56, Phase:0.50, Althyk)'
>>> EorzeaTime.now().moon
'Sixth Embral Moon'
>>> EorzeaTime.now().sun
11
>>> EorzeaTime.now().hour
21
>>> EorzeaTime.now().minute
56
>>> EorzeaTime.now().phase
0.50
>>> EorzeaTime.now().guardian
'Althyk'
Weather Forecast
- Using period as tuple or list
# defalut step value is 5
# This method return a generator if you need to re-use it save the values as `tuple` or `list`.
t = tuple(EorzeaTime.weather_period(step=3))
# defalut lang is 'en'
# defalut strict is True for strict mode
# False for fuzzy mode: `adsfEureka Pyrosadsf` is valid
weather_en = EorzeaWeather.forecast('Eureka Pyros', t, strict=True)
weather_ja = EorzeaWeather.forecast('Eureka Pyros', t, lang=EorzeaLang.JA, strict=True)
weather_de = EorzeaWeather.forecast('Eureka Pyros', t, lang=EorzeaLang.DE, strict=True)
weather_fr = EorzeaWeather.forecast('Eureka Pyros', t, lang=EorzeaLang.FR, strict=True)
>>> print(weather_en)
['Thunder', 'Snow', 'Blizzards']
>>> print(weather_ja)
['雷', '雪', '吹雪']
>>> print(weather_de)
['Gewittrig', 'Schnee', 'Schneesturm']
>>> print(weather_fr)
['Orages', 'Neige', 'Blizzard']
- Using period in for-loop
weather_en = []
for t in EorzeaTime.weather_period(step=3):
w = EorzeaWeather.forecast('Eureka Pyros', t)
weather_en.append(w)
>>> print(weather_en)
['Thunder', 'Snow', 'Blizzards']
- Using period generator directly
weather = EorzeaWeather.forecast('Eureka Pyros', EorzeaTime.weather_period(step=3))
>>> print(weather_en)
['Thunder', 'Snow', 'Blizzards']
- Also support float type
weather = EorzeaWeather.forecast('Eureka Pyros', 1603644000.0)
>>> print(weather)
'Thunder'
Thanks
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
EorzeaEnv-1.5.2.tar.gz
(15.4 kB
view hashes)
Built Distribution
EorzeaEnv-1.5.2-py3-none-any.whl
(18.0 kB
view hashes)
Close
Hashes for EorzeaEnv-1.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65dd34c6ce8fe580e5fe3b9b7b1a2ea9aea554febda94fe4155cf040ab5bfae3 |
|
MD5 | 54e0d6f5a2d707403e345d7172108b75 |
|
BLAKE2b-256 | aa4c795cd9e4a3a48db953c99fe2cf2fed5f16d6495707efa35ea1df959d7909 |