Skip to content

FarizAbduhakimov/HijriAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

72 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

HijriAPI

Hijri API๐ŸŒ™

๐ŸŒŸ About the Project

Hijri API for getting dates in hijri (gregorian), also hijri (gregorian) months and week days๐Ÿ˜Š

P.S. I used hijri-converter package to get dates, big thanks author of this package

๐Ÿ”‘ Secret key

To run this project, you need to add your generated secret key in settings.py file on INSTALLED_APPS. You can get it by this commands:

go terminal $ django-admin shell and type

from django.core.management.utils import get_random_secret_key  
get_random_secret_key()

or simply get it by Djecrety

โš™๏ธ Installation

Clone the project

  git clone https://github.com/FarizAbduhakimov/HijriAPI.git

Create virtual env & activate it

  virtualenv env # create
  .\env\Scripts\activate # activate (Windows)
  
  $ source venv/bin/activate # activate (Linux)

Install requirements.txt

pip install -r requirements.txt 

For linux & mac use pip3 & python3

๐Ÿƒ Run Locally

Go to the project directory & run

  cd .\hijri_api\
  
  python manage.py runserver

๐Ÿ‘€ Usage

Go postman and continue following commands

to hijri

For getting hijri date type on url http://127.0.0.1:8000/api/tohijri and make a request, like that

to gregorian

So you can get gregorian date

For getting hijri (gregorian) months & week days

hijri months

Hijri months๐Ÿ“…

gregorian months

Gregorian months๐Ÿ“…

hijri weekday

Hijri week days

gregorian weekday

Gregorian week days

๐Ÿ–ผSwagger UI

Swagger url: http://127.0.0.1:8000/swagger/

swagger

๐Ÿงช Running Tests

To run tests, run the following command

  python manage.py test
test running

Thanks ๐Ÿ™‚

If you liked the project, don't forget to press a star button :)

Releases

No releases published

Packages

No packages published

Languages