for Starwar lover, Converter Starwar Calendar to Human readable Year
Project description
starwar-calender-converter
Every line of codes has a story behind it just like every poetry line was inspired by certain events.
Not a fan of Star War (heard about it but never watch or read any meaniful things). But As aspiring Data Engineer, I was working on a project that required consuming dataset from an API hosted at https://swapi.dev/api/ (That is sn open API dedicated to all about Star War, so, you can grab data for your learning over there!).
Hence, as part of Transformation processing stage, it was required that, Actor age or (as the problem state, 'find the oldest actor') should be derived.
If you look at this image (the data after Extraction/Ingestation State)
You will see that birth_year
was in format
45BBY
32ABY
etc.
To understand this Date format, you should see this https://starwars.fandom.com/wiki/Battle_of_Yavin
But, the simple interpreatation is that, an event, which was known as 'Battle of Yavin', was an EPOCH in Star War. And all events are reference according to this battle.
So, 78BBY means 78 years before the Battle of Yavin while 78ABY means 78 years After the Battle of Yavin
This library was inspired by the needs to parse and convert 'birth_year' in Star war datasets made available at https://swapi.dev/api/ into human readable format
- In case of Alien Invasion from Star War, we need a quick way to parsed DOB of such alien, and this python module is doing that.
See following Url:
- https://swapi.dev/api/people/
- https://starwars.fandom.com/wiki/Battle_of_Yavin
- https://starwars.fandom.com/wiki/0_BBY
Versioning
⋅⋅1 starwar-dob 3.14.post0 Released: Mar 19, 2022
INSTALLATION
Get it by running this python in your working environment
pip install starwar-dob
USAGE
from starwardob import starwardob
actor = starwardob.StarwarDOB('3Aby')
print(actor.unix_year)' # Actor DOB in UNIX format (1970) is display
print(actor.age)' # Actor age is dispay in human readable format
BUG TRACKING
Join us at https://github.com/blueband/starwar-calender-converter/issues
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
Built Distribution
Hashes for starwar_dob-3.141.post0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e42356a422fa32e48883a652ca5a1422525692534c85a55ca5fd5d44e348aa09 |
|
MD5 | 1ca4ee0c3500ad4dda7b25c7ca8d2e8f |
|
BLAKE2b-256 | d12b3ab4ab07c985370ad14a1b44c404245bb87855f86a7cc163cad47ed21fd3 |