Skip to main content

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) alt text

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:

  1. https://swapi.dev/api/people/
  2. https://starwars.fandom.com/wiki/Battle_of_Yavin
  3. 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


Download files

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

Source Distribution

starwar-dob-3.141.post0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

starwar_dob-3.141.post0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file starwar-dob-3.141.post0.tar.gz.

File metadata

  • Download URL: starwar-dob-3.141.post0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.9.10

File hashes

Hashes for starwar-dob-3.141.post0.tar.gz
Algorithm Hash digest
SHA256 939c87858e9219600c98277dd7dd5b811cc06d5631a1bba8444c009018ea382a
MD5 086e038f14de9057222c2135134ecf98
BLAKE2b-256 c3335a734533ff396acff97d6cc4a3a2cde2fa8c73ee6c122eaad1be440d114d

See more details on using hashes here.

File details

Details for the file starwar_dob-3.141.post0-py3-none-any.whl.

File metadata

  • Download URL: starwar_dob-3.141.post0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.9.10

File hashes

Hashes for starwar_dob-3.141.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 e42356a422fa32e48883a652ca5a1422525692534c85a55ca5fd5d44e348aa09
MD5 1ca4ee0c3500ad4dda7b25c7ca8d2e8f
BLAKE2b-256 d12b3ab4ab07c985370ad14a1b44c404245bb87855f86a7cc163cad47ed21fd3

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