Skip to main content

Help to build APIs Faster

Project description

Methodism

Methodism sizga djangoda API larni tezroq yaratish va tez ishlatish imkoni beradi.
Egamberdiyav Xudoyberdi Tomonidan Yaratilgan

    pip install methodism

About

Ushbu Kutubxona Egamberdiyev Xudoyberdi Tomonidan yaratilgan bo'lib tog'ridan tog'ri django kutubxonasi ustiga qurulgan. Bu sizga API lar yozganda uni tez ishlatish va tezroq API yozish imkoni beradi. Avtomatik tarzda siz yozgan funksiyani method ga aylantirgan holatda api hosil qiladi

filelar

  • methodism/costumizing.py ushbu file tayyor bir qator claslarni custum holarga o'tqazilgan varianti hisoblandi.
  • methodism/decors.py Ushbu file kerakli bo'lgan decoratorlarni yozish uchun ishlatiluvchi file.
  • methodism/error_messages.py bo'lishi mumkin bo'lgan xatoliklar yig'ilgan lug'at ko'rinishidagi file.
  • methodism/helper.py Yordamchi funksiyalar joylangan file.
  • methodism/main.py Asosiy class yozilgan file

Ishlatish ketma ketligi

Birinchi navbatda kerakli kutubxonalarni o'rnatib olishingiz kerak

From GitHub

  pip install -r requirements.txt

From PyPi

  pip install Django==4.2 django-rest-framework==0.1.0 djangorestframework==3.14.0

Yuklab olib bo'lgach O'zingizga views.py faylida kerakli bo'lgan classni yozing va uni urls.py ga ulang, class ga esa methodism/main.py dagi METHODIZM classidan vorislik bering.

Example in views.py

from methodism.main import METHODIZM

# agar bundan foydalansangiz settings.INSTALLED_APPS ga 'rest_framework.authtoken' ni qo'shib qo'ying
from rest_framework.authtoken.models import Token 


class YourClass(METHODIZM):

    file = '__main__'
    token_key = "Bearer"
    auth_headers = "Authorization"
    token_class = Token
    not_auth_methods = [] # ro'yxatdan o'tish shart bo'lmagan kutubxonalarni qo'shib qo'ying
    
    
    """ Misol uchun yozgan funksiyangiz:
        def salom_dunyo(requests, params):
            return "salom"
        methodizm:
            salom.dunyo
        
        siz yozgan har qanday ostki chiziqli yoki oddiy chiziqli funksiyalar nuqta orqali avtomatik ajratiladi!
        not_auth_methods = ['salom.dunyo']
     """

GitHub Manba

PyPi Manba

Happy Time. Enjoy IT ;)

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

methodism-0.0.63.tar.gz (8.2 kB view hashes)

Uploaded Source

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