Introduction

This is the documentation for aladhan.py, an asynchronous pythonic wrapper for the Aladhan prayer times API.

Prerequisites

Python 3.7 or higher is required.

Installing

Install aladhan.py with pip:

python3 -m pip install -U aladhan.py
py -3 -m pip install -U aladhan.py

Virtual Environments

Sometimes you want to keep libraries from polluting system installs or use a different version of libraries than the ones installed on the system. You might also not have permissions to install libraries system-wide. For this purpose, the standard library as of Python 3.3 comes with a concept called “Virtual Environment”s to help maintain these separate versions.

A more in-depth tutorial is found on Virtual Environments and Packages.

However, for the quick and dirty:

  1. Go to your project’s working directory:

    cd your-project-dir
    
    cd your-project-dir
    
  2. Create a virtual environment:

    python3 -m venv venv
    
    py -3 -m venv venv
    
  3. Activate the virtual environment:

    source venv/bin/activate
    
    venv\Scripts\activate.bat
    
  4. Use pip like usual:

    pip install -U aladhan.py
    
    pip install -U aladhan.py
    

Congratulations. You now have a virtual environment all set up. You can start to code, learn more in Quickstart.