Skip to main content

A Python library and CLI to calculate birthdays and age information.

Project description

Birth Teller

PyPI version License

Birth Teller is a lightweight Python library and optional CLI tool that calculates your age, birthday details, and the day of the week you were born. It supports full month names, 3-letter abbreviations, and numeric month input. Perfect for Python projects, scripts, or Django apps.


Features

  • Compute age in years, months, weeks, days, hours, minutes, and seconds
  • Determine the day of the week for any birthdate
  • Supports full month names, 3-letter abbreviations, and numeric month input
  • Optional CLI for quick terminal usage
  • Fully importable as a Python library for projects like Django

Installation

pip install birth-teller

Library Usage (Python / Django / Scripts)

from birth_teller import BTM

# Create an instance
btm = BTM()

# Get birthday information
info = btm.information(8, "feb", 1999)

print(f"You were born on {info['weekDay']}")
print(f"Age in years: {info['years']}")
print(f"Age in days: {info['days']}")

Using different month formats

# Full month name
info = btm.information(15, "March", 1995)

# 3-letter abbreviation
info = btm.information(15, "mar", 1995)

# Numeric month
info = btm.information(15, 3, 1995)

[!NOTE] Works anywhere in Python, including Django views, scripts, or APIs.

CLI Usage (Optional)

birth-teller --name "Emran" --day 8 --month feb --year 1999

Example Output (CLI)

You were born on MONDAY
Years: 26
Days: 9689
Weeks: 1384
Hours: 232538
Minutes: 13952299
Seconds: 837137977

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

birth_teller-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

birth_teller-0.1.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file birth_teller-0.1.0.tar.gz.

File metadata

  • Download URL: birth_teller-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for birth_teller-0.1.0.tar.gz
Algorithm Hash digest
SHA256 833850aa2061080ca8a03dc1df4f3baa256c2da86ea24ba2cab8bff9afe374f8
MD5 a4c9eb83bf5ec8bb266a095e685d6ff6
BLAKE2b-256 60e484061e99066dc7eb687c1c2c9b467d9fa20f6c7c85b2c0b38686ec21bd95

See more details on using hashes here.

File details

Details for the file birth_teller-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: birth_teller-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for birth_teller-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e400d7dd324c8cf5e4a253deab5eff0e4a8b2b7bc742300b77c3cd9ae81580a0
MD5 07a9e935423a12b09215b75ee4f5260d
BLAKE2b-256 f1d5c89029a0350054e0320d650ac6dc56c840a5a7e54a9b7a5d0a4c842fd505

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