معرفی شرکت ها


django-urlconfchecks-0.9.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

a python package for type checking the urls and associated views.
ویژگی مقدار
سیستم عامل -
نام فایل django-urlconfchecks-0.9.0
نام django-urlconfchecks
نسخه کتابخانه 0.9.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده ali sayyah
ایمیل نویسنده ali.sayyah2@gmail.com
آدرس صفحه اصلی https://github.com/AliSayyah/django-urlconfchecks
آدرس اینترنتی https://pypi.org/project/django-urlconfchecks/
مجوز GPLv3
# Django UrlConf Checks [![pypi](https://img.shields.io/pypi/v/django-urlconfchecks.svg)](https://pypi.org/project/django-urlconfchecks/) [![python](https://img.shields.io/pypi/pyversions/django-urlconfchecks.svg)](https://pypi.org/project/django-urlconfchecks/) [![Build Status](https://github.com/AliSayyah/django-urlconfchecks/actions/workflows/dev.yml/badge.svg)](https://github.com/AliSayyah/django-urlconfchecks/actions/workflows/dev.yml) [![codecov](https://codecov.io/gh/AliSayyah/django-urlconfchecks/branch/main/graphs/badge.svg)](https://codecov.io/github/AliSayyah/django-urlconfchecks) [![License](https://img.shields.io/github/license/AliSayyah/django-urlconfchecks.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) django-urlconfchecks is a static type checker that checks your URLconf parameter types with argument types specified in associated views. It leverages the Django's static check system. * [Documentation](https://AliSayyah.github.io/django-urlconfchecks) * [GitHub](https://github.com/AliSayyah/django-urlconfchecks) * [PyPI](https://pypi.org/project/django-urlconfchecks/) ## Installation pip install django-urlconfchecks Python 3.7 or later is required. However, before Python 3.10 some checks relating to `Optional` types in view signatures are skipped due to stdlib limitations. ## Usage You can use this package in different ways: ### As a Django app Add `django_urlconfchecks` to your `INSTALLED_APPS` list in your `settings.py` file. ```python INSTALLED_APPS = [ ... 'django_urlconfchecks', ] ``` ### As a command line tool Run this command from the root of your project, were `manage.py` is located: ```bash $ urlconfchecks --help Usage: urlconfchecks [OPTIONS] Check all URLConfs for errors. Options: --version -u, --urlconf PATH Specify the URLconf to check. --install-completion Install completion for the current shell. --show-completion Show completion for the current shell, to copy it or customize the installation. --help Show this message and exit. ``` ### As a pre-commit hook Add the following to your `.pre-commit-config.yaml` file: ```yaml - repo: https://github.com/AliSayyah/django-urlconfchecks rev: v0.9.0 hooks: - id: django-urlconfchecks ``` For more information, see the [usage documentation](https://alisayyah.github.io/django-urlconfchecks/usage/). ## Features Using this package, URL pattern types will automatically be matched with associated views, and in case of mismatch, an error will be raised. Example: ```python # urls.py from django.urls import path from . import views urlpatterns = [ path('articles/<str:year>/', views.year_archive), path('articles/<int:year>/<int:month>/', views.month_archive), path('articles/<int:year>/<int:month>/<slug:slug>/', views.article_detail), ] ``` ```python # views.py def year_archive(request, year: int): pass def month_archive(request, year: int, month: int): pass def article_detail(request, year: int, month: int, slug: str): pass ``` output will be: ``` (urlchecker.E002) For parameter `year`, annotated type int does not match expected `str` from urlconf ``` * TODO: - Handle type checking parameterized generics e.g. `typing.List[int]`, `list[str]` etc. - Should only warn for each unhandled Converter once. - Regex patterns perhaps? (only RoutePattern supported at the moment). ## Credits - [Luke Plant](https://github.com/spookylukey) for providing the idea and the initial code. - This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [waynerv/cookiecutter-pypackage](https://github.com/waynerv/cookiecutter-pypackage) project template.


نیازمندی

مقدار نام
>=3.2 Django
>=3.3.4,<4.0.0 Markdown
>=22.3.0 black
>=1.0.1,<2.0.0 bump2version
>=4.0.1,<6.0.0 flake8
>=1.6.0,<2.0.0 flake8-docstrings
>=5.8.0,<6.0.0 isort
>=1.1.2,<2.0.0 mkdocs
>=0.2.1,<0.5.0 mkdocs-autorefs
>=3.2.3,<4.0.0 mkdocs-include-markdown-plugin
>=8.1.8,<9.0.0 mkdocs-material
>=1.0.1,<2.0.0 mkdocs-material-extensions
>=0.17,<0.20 mkdocstrings
>=0.931,<0.972 mypy
>=2.12.0,<3.0.0 pre-commit
>=6.2.4,<8.0.0 pytest
>=3,<5 pytest-cov
>=4.5.2,<5.0.0 pytest-django
>=0.10.2,<0.11.0 toml
>=3.20.1,<4.0.0 tox
>=4.0.1,<5.0.0 twine
>=0.4.1,<0.8.0 typer[all]
>=20.2.2,<21.0.0 virtualenv


زبان مورد نیاز

مقدار نام
>=3.7.0,<4 Python


نحوه نصب


نصب پکیج whl django-urlconfchecks-0.9.0:

    pip install django-urlconfchecks-0.9.0.whl


نصب پکیج tar.gz django-urlconfchecks-0.9.0:

    pip install django-urlconfchecks-0.9.0.tar.gz