PYBENGALI
pybengali is a python3 package for Bengali DateTime and Bengali numeric number conversation and many more. This package can be used with any python framework like Django, Flask, FastAPI, and others. pybengali is OS Independent, It can be used on any operating system Linux/Unix, Mac OS and Windows.
Available Features
- Features available in pybengali:
- List of Bengali Numbers
- List of Bengali Months
- List of Bengali Weekdays
- List of Bengali Seasons
- Bengali Year
- Bengali Weekday
- Bengali Date
- Bengali Today
- Bengali Tomorrow
- Bengali Yesterday
- Bengali Past Date
- Bengali Future Date
- Bengali Timesince
- Convert English Month Name to Bengali
- Convert English Numeric Number to Bengali Numeric Number
Installation
$ pip install pybengali
Usage
Get Bengali Today:
import pybengali
today = pybengali.today()
print(today)
# Output: {'date': '১৯', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'সোমবার'}
today = pybengali.today(day="04", month="10", year="2022")
print(today)
# Output: {'date': '১৯', 'month': 'আশ্বিন', 'year': '১৪২৯', 'season': 'শরৎ', 'weekday': 'মঙ্গলবার'}
Get Bengali Tomorrow and Yesterday:
import pybengali
tomorrow = pybengali.tomorrow()
print(tomorrow)
# Output: {'date': '২০', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'মঙ্গলবার'}
yesterday = pybengali.yesterday(day="04", month="10", year="2022")
print(yesterday)
# Output: {'date': '১৮', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'রবিবার'}
Get Bengali Timesince:
import pybengali
timesince = pybengali.timesince(day="04",month="10",year="2019")
print(timesince)
# Output: ২ বছর আগে
Get Bengali Past or Future Date With Number of Days To Go Back or Froward :
import pybengali
# Past Date
past_date = pybengali.past_date('2')
print(past_date)
# Output: {'date': '১৭', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'শনিবার'}
# Future Date
future_date = pybengali.future_date('2')
print(future_date)
# Output: {'date': '২১', 'month': 'আশ্বিন', 'year': '১৪২৮', 'season': 'শরৎ', 'weekday': 'বুধবার'}
Get Bengali Year:
import pybengali
year = pybengali.get_year(day="04", month="10", year="2021")
print(year)
# Output: ১৪২৮
Get Bengali Weekday:
import pybengali
weekday = pybengali.get_weekday(day="04", month="10", year="2021")
print(weekday)
# Output: সোমবার
Convert English Numeric Number to Bengali Numeric Number:
import pybengali
bengali_digit = pybengali.convert_e2b_digit("10")
print(bengali_digit)
# Output: ১০
Convert English Month to Bengali Name:
import pybengali
bengali_name = pybengali.eng_month_to_bengali("1")
print(bengali_name)
# Output: জানুয়ারী
Get List of Bengali Numbers:
import pybengali
numbers = pybengali.bengali_numbers()
print(numbers)
# Output: ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯']
Get List of Bengali Months:
import pybengali
months = pybengali.bengali_months()
print(months)
# Output: ['পৌষ', 'মাঘ', 'ফাল্গুন', 'চৈত্র', 'বৈশাখ', 'জ্যৈষ্ঠ', 'আষাঢ়', 'শ্রাবণ', 'ভাদ্র', 'আশ্বিন', 'কার্তিক', 'অগ্রহায়ণ']
# Months sequence Is accroding to English calender.
Get List of Bengali Weekdays:
import pybengali
weekdays = pybengali.bengali_weekdays()
print(weekdays)
# Output: ['সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার', 'রবিবার']
# weekdays sequence Is accroding to English calender.
Get List of Bengali Seasons:
import pybengali
seasons = pybengali.bengali_seasons()
print(seasons)
# Output: ['শীত', 'বসন্ত', 'গ্রীষ্ম', 'বর্ষা', 'শরৎ', 'হেমন্ত']
# seasons sequence Is accroding to English calender.
*pybengali is build based on Bengali calendar which was officially adopted in Bangladesh in 1987 and All the rules from Bengali_calendars to convert Gregorian date to Bangla date. *
Contribute
If you face any problem feel free to open issue.
Contact
If you have any suggestion: Email: pyshawon@gmail.com Facebook: https://www.facebook.com/pyshawon/
Metadata
Release files for pybengali 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pybengali-0.0.1.tar.gz | 4.8 kB | Without provenance | Details for pybengali-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pybengali-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for pybengali-0.0.1-py3-none-any.whl |
Total release size: 10.2 kB
Release files / pybengali-0.0.1.tar.gz
| Download URL | pybengali-0.0.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9f063c9ac5956d0cb293786f446fb6198c21b3ca2a37d924d9d027e2947491d
|
|
BLAKE2b-256 checksum How to use checksums |
77557a95ed8d8b3b2a1722312df693eaf0ed4ef008663d8375c09338af83fda8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6
|
Release files / pybengali-0.0.1-py3-none-any.whl
| Download URL | pybengali-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9810bf53e8f5b7c9242b80f7bc190f10035002e54bec1778537d63ad2245be93
|
|
BLAKE2b-256 checksum How to use checksums |
f8a252fe36f61bf6c45f01bb7169d174fa6deb7fe8e45b9f1eeccfc638b30fbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.6
|
Security for pybengali 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.