Skip to main content

A CLI tool to get prayer times

Project description

MyPrayer

PyPI version

MyPrayer is a command line application for getting Islamic prayer times for a given location and date.

Features

  • Get prayer times for a specific date and location
  • Show next upcoming prayer time
  • Support from multiple calculation methods
  • Output prayer times in different formats
  • Save default location and settings

Dependencies

Install

pip install myprayer

Usage

myprayer

Usage: myprayer [OPTIONS] COMMAND [ARGS]...                                                 

MyPrayer CLI.                                                                               

Options 
  --install-completion        [bash|zsh|fish|powershell|pwsh]   Install completion for the specified shell.              
                                                                [default: None]               
  --show-completion           [bash|zsh|fish|powershell|pwsh]   Show completion for the specified shell, to copy it or customize the installation.   
                                                                [default: None]               
  --help                                                        Show this message and exit.    

Commands
  config                   Configure myprayer.                                              
  list                     List prayer times.                                               
  next                     Show next prayer.  

myparyer list

Usage: myprayer list [OPTIONS]                                                                                                                                                                 
List prayer times.                                                                                                                                                                             
Options 
 --city         -c        TEXT                         City name.                            
 --country      -C        TEXT                         Country name.                              
 --address      -a        TEXT                         Address.                               
 --latitude     -lat      FLOAT                        Latitude.                               
 --longitude    -lon      FLOAT                        Longitude. 
 --day          -d        INTEGER RANGE [1<=x<=31]     Day (1-31) [default: (Current day)]            
 --month        -m        INTEGER RANGE [1<=x<=12]     Month [default: (Current month)]                       
 --year         -y        INTEGER                      Year [default: (Current year)]                          
 --method       -M        INTEGER                      Calculation method. [default: (Egyptian General Authority of Survey)]         
 --time-format  -t        [12|24]                      Time format. [default: 12]       
 --output       -o        [pretty|machine|table|json]  Output type. [default: table]            
 --next         -n                                     Show next prayer, has no effect if day, month, or year are given. [default: True]         
 --force        -f                                     Force update cache.       
 --help                                                Show this message and exit.  

myparyer next

Usage: myprayer next [OPTIONS]                                                                                                                                                                 
Show next prayer. 

Options 
 --city         -c        TEXT                         City name.                            
 --country      -C        TEXT                         Country name.                              
 --address      -a        TEXT                         Address.                               
 --latitude     -lat      FLOAT                        Latitude.                               
 --longitude    -lon      FLOAT                        Longitude. 
 --day          -d        INTEGER RANGE [1<=x<=31]     Day (1-31) [default: (Current day)]            
 --method       -M        INTEGER                      Calculation method. [default: (Egyptian General Authority of Survey)]         
 --time-format  -t        [12|24]                      Time format. [default: 12]       
 --output       -o        [pretty|machine|table|json]  Output type. [default: table]            
 --force        -f                                     Force update cache.       
 --help                                                Configure default settings

Configuration

Default settings like location, calculation method, and output format can be configured in $XDG_CONFIG_HOME/myprayer/config.json or $HOME/.config/myprayer/config.json using myprayer config.

Example configuration

{
    "time_format": "12", // 12 or 24
    "print_type": "table", // pretty, machine, table, json
    "method": 5, // Calculation method
    "show_next": true, // Highlight next prayer in list
    "prayers": [ // Prayer to show
        "Fajr",
        "Dhuhr",
        "Asr",
        "Maghrib",
        "Isha"
    ],
    "location": { // Default location used if no location is provided in command
        "latitude": 30,
        "longitude": 31,
    }
}

Credits

  • adhanpy - Prayer times calculation

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

myprayer-3.0.1.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

myprayer-3.0.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file myprayer-3.0.1.tar.gz.

File metadata

  • Download URL: myprayer-3.0.1.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.8.4-arch1-1

File hashes

Hashes for myprayer-3.0.1.tar.gz
Algorithm Hash digest
SHA256 996c2802b249c84cb54347ebf52135c41cc78ea1584c9087352917cd2a4aceb8
MD5 112b1ec983b27ae259d41abbac4b18ed
BLAKE2b-256 17e9c9bc565a06b19ffb6e635bd9549b5542dda01664f4b142b66c1f9b59a4a3

See more details on using hashes here.

File details

Details for the file myprayer-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: myprayer-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.8.4-arch1-1

File hashes

Hashes for myprayer-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44826787a8fd3585af5e249bb409351fcdde5fcba10b22ddb260b4b5767a636f
MD5 e59aa57f703be9f409d0e27dba11f0a5
BLAKE2b-256 abf6217e22af20ff7d5494e042f51bc1d6bdd45897d453322d99f927588053fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page