I LOVE MY BANGLADESH
Package Name : bd-geoinfo
A simple yet powerful Python library for fetching comprehensive geographical information about Bangladesh.
Key Features :
-
🔍 Data Search: Easily find detailed information on divisions, districts, upazilas, unions, and postcodes.
-
🌐 Multilingual Support: Access data using both Bangla and English geographical names.
-
📊 Detailed Information: Get population, area, and other relevant data for each location.
-
💡 Interactive Terminal: Use a built-in terminal viewer to display your program's output in a stylish, live-like interface.
Installation :
Install this library from PyPI using pip:
pip install bd-geoinfo
Usage :
Using this library is straightforward. Here are a few examples to get you started.
🗺️ Accessing Geographical Data
from bd_geoinfo import Division, District, Upazila, Union, Postcode
Or
from bd_geoinfo import *
Get Information About Division
dhaka = Division("Dhaka")
print(f"Name (BN): {dhaka.get_name()}")
print(f"All Division name {dhaka.get_division_names()}")
Get Information About District
mymensingh = District("Mymensingh")
print(f"Name (EN): {mymensingh.get_name()}")
print(f"Division: {mymensingh.get_division()}")
Get Information About Upazila
amtali = Upazila("Amtali")
print(f"Is Upzila : {has_upazila()}")
Get Information About Union
burirchar = Union("Burirchar Union")
print(burirchar.get_upazila())
Get Information About Postcode
postcode = Postcode("8710")
print(f"Area Name: {postcode.get_name()}")
print(f"Upazila: {postcode.get_upazila()}")
🖥️ Interactive Terminal Viewer
Use these built-in functions to display your output more attractively. This is especially useful for visualizing data in a clean, terminal-like format.
from bd_geoinfo import Division, add_to_terminal, show_terminal, clear_from_terminal
# Clear the terminal output
clear_from_terminal()
# Add a welcome message
add_to_terminal("Welcome to the BD-GeoInfo Terminal!")
add_to_terminal("Fetching data for Sylhet Division...")
# Create a Division object
sylhet_division = Division("Sylhet")
# Add the division's data to the terminal
add_to_terminal(sylhet_division.get_division_data())
add_to_terminal("Data loaded successfully.")
# Display the terminal window
show_terminal()
📚 Functions by Class
| Class/Module | Function | Description |
|---|---|---|
| Division | get_name(bn=False) |
Gets the name of the division (returns Bangla name if bn=True). |
get_area(unit='km') |
Returns the total area of the division in sq. km (default) or sq. miles. | |
get_population() |
Returns the population of the division. | |
get_website() |
Returns the official website URL of the division. | |
get_festivals() |
Returns a list of major festivals. | |
get_cultural_heritage() |
Returns a list of cultural heritage items. | |
get_notes() |
Returns a descriptive note or extra information. | |
get_established_date() |
Returns the establishment date of the division. | |
get_division_data() |
Returns a dictionary with all data for the division. | |
get_division_names(bn=False) |
Returns a list of all division names. | |
get_districts() |
Returns a list of all districts within the division. | |
get_districts_count() |
Returns the total count of districts. | |
has_division() |
Checks if the division exists. | |
| District | get_name(bn=False) |
Gets the name of the district (returns Bangla name if bn=True). |
get_area(unit='km') |
Returns the total area of the district in sq. km (default) or sq. miles. | |
get_population() |
Returns the population of the district. | |
get_notes() |
Returns a descriptive note about the district. | |
get_festivals() |
Returns a list of festivals celebrated in the district. | |
get_cultural_heritage() |
Returns a list of cultural heritage elements. | |
get_division() |
Returns the division name of the district. | |
get_upazilas() |
Returns a list of all upazilas within the district. | |
get_upazilas_count() |
Returns the total count of upazilas. | |
has_district() |
Checks if the district exists. | |
| Upazila | get_name(bn=False) |
Gets the name of the upazila (returns Bangla name if bn=True). |
get_area(unit='km') |
Returns the total area of the upazila in sq. km (default) or sq. miles. | |
get_population() |
Returns the population of the upazila. | |
get_headquarter() |
Returns the headquarter name of the upazila. | |
get_unions() |
Returns a list of all unions within the upazila. | |
get_unions_count() |
Returns the total count of unions. | |
get_district() |
Returns the district name of the upazila. | |
get_division() |
Returns the division name of the upazila. | |
has_upazila() |
Checks if the upazila exists. | |
| Union | get_name(bn=False) |
Gets the name of the union (returns Bangla name if bn=True). |
get_upazila() |
Returns the upazila name of the union. | |
get_district() |
Returns the district name of the union. | |
get_division() |
Returns the division name of the union. | |
get_full_address(bn=False) |
Returns the complete address of the union (returns Bangla address if bn=True). |
|
get_all_unions() |
Returns a list of all unions. | |
has_union() |
Checks if the union exists. | |
| Postcode | get_name(bn=False) |
Gets the name of the area associated with the postcode (returns Bangla name if bn=True). |
get_postcode() |
Returns the postcode string. | |
get_upazila() |
Returns the upazila name for the postcode. | |
get_district() |
Returns the district name for the postcode. | |
get_division() |
Returns the division name for the postcode. | |
get_full_address(bn=False) |
Returns the full address corresponding to the postcode. | |
has_postcode() |
Checks if the postcode exists. | |
| Terminal Module | add_to_terminal(item) |
Adds a message, image, map, or data to the terminal output. |
clear_from_terminal() |
Clears all previously added terminal messages. | |
show_terminal() |
Opens a graphical window to display the terminal output. |
✨ Acknowledgements
A big thank you to the following people who helped make this project a reality by collecting data:
- Naim Islam: For providing your valuabel time.--Mnt(TPI)
- Monir: For providing your valuabel time.--RAC(TPI)
- Habib: For providing your valuabel time.--FOOD(TPI)
Contribution
Your contributions are highly valued! If you have any feature requests, bug reports, or code suggestions, please feel free to submit a Pull Request or open an Issue on the GitHub repository.
Metadata
Release files for bd-geoinfo 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bd_geoinfo-0.0.3.tar.gz | 189.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bd_geoinfo-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 387.3 kB
Release files / bd_geoinfo-0.0.3.tar.gz
| Download URL | bd_geoinfo-0.0.3.tar.gz |
|---|---|
| Size | 189.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
823cc1565df5e8f5da35a85451c410ecc9387769c05241cf0defcebcbfe7bdfe
|
|
BLAKE2b-256 checksum How to use checksums |
83fc585514478d6b4123644ebee3de2f152250f1c192862cd11dd0599d5fcb8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Release files / bd_geoinfo-0.0.3-py3-none-any.whl
| Download URL | bd_geoinfo-0.0.3-py3-none-any.whl |
|---|---|
| Size | 197.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81c3147ac17b1f7d4a294f387c19c3f2d01350933d7fc7a588d62e789c1df363
|
|
BLAKE2b-256 checksum How to use checksums |
44cc1c80aa9e37da9f6e686aaefdd9e51a7d89246a42ab2ed92547f73d7313f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|