Инициализация репозитория

This commit is contained in:
2026-07-10 11:00:02 +03:00
commit 3ae58015c7
7 changed files with 319 additions and 0 deletions

18
.editorconfig Normal file
View File

@@ -0,0 +1,18 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.html]
max_line_length = 240
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = true

166
.gitignore vendored Normal file
View File

@@ -0,0 +1,166 @@
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
#
# This is a library; therefore, the uv.lock file is not needed.
#
uv.lock

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.14

18
LICENSE Normal file
View File

@@ -0,0 +1,18 @@
MIT License
Copyright (c) 2026 xeaf-public
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# DRF Rack
Надстройка над Django REST Framework

62
THIRDPATY.md Normal file
View File

@@ -0,0 +1,62 @@
# СВЕДЕНИЯ ОБ ИСПОЛЬЗУЕМЫХ СТОРОННИХ КОМПОНЕНТАХ (БИБЛИОТЕКАХ) И ИХ ЛИЦЕНЗИЯХ
В составе Программного обеспечения (далее — ПО) используются исключительно
свободно распространяемые компоненты (библиотеки) с открытым исходным кодом.
Использование данных компонентов не накладывает ограничений на коммерческое лицензирование
основного ПО, не налагает обязательств по раскрытию исходного текста разработанного ПО
и полностью соответствует требованиям, установленным Министерством цифрового развития,
связи и массовых коммуникаций Российской Федерации для включения сведений в единый
реестр российского программного обеспечения.
## Таблица. Перечень сторонних библиотек и компонентов
| № п/п | Наименование компонента | Версия | Тип лицензии | Функциональное назначение компонента |
|---|---|---|---|---|
| 1 | Django | 6.0.7 | BSD-3-Clause | Основной веб-фреймворк архитектуры ПО |
| 2 | djangorestframework | 3.17.1 | BSD-3-Clause | Построение REST API интерфейсов |
| 3 | asgiref | 3.11.1 | BSD License | Поддержка асинхронных интерфейсов веб-сервера |
| 4 | boto3 | 1.43.44 | Apache-2.0 | Интеграция и управление облачным объектным хранилищем |
| 5 | botocore | 1.43.44 | Apache-2.0 | Ядро низкоуровневых запросов к облачной инфраструктуре |
| 6 | s3transfer | 0.19.0 | Apache-2.0 | Управление многопоточной загрузкой файлов в хранилище |
| 7 | django-storages | 1.14.6 | BSD License | Подключение внешних хранилищ данных к медиа-файлам |
| 8 | concurrent-log-handler | 0.9.29 | Apache-2.0 | Безопасное многопоточное логирование процессов |
| 9 | django-cors-headers | 4.9.0 | MIT | Регулирование правил кросс-доменных запросов (CORS) |
| 10 | django-environ | 0.14.0 | MIT | Безопасная конфигурация проекта через переменные окружения |
| 11 | django-split-settings | 1.3.2 | BSD License | Модульное разделение настроек проекта по окружениям |
| 12 | split-settings | 1.0.0 | BSD License | Вспомогательная утилита разделения конфигурационных файлов |
| 13 | gunicorn | 26.0.0 | MIT | WSGI-сервер для развертывания веб-приложения |
| 14 | jmespath | 1.1.0 | MIT | Декларативный синтаксис для фильтрации JSON-данных |
| 15 | packaging | 26.2 | BSD-2-Clause | Парсинг и валидация версий пакетов зависимостей |
| 16 | python-dateutil | 2.9.0.post0 | Apache-2.0 | Расширенная работа с форматами даты и часовыми поясами |
| 17 | pillow | 12.3.0 | MIT-CMU | Обработка, оптимизация и валидация графических файлов |
| 18 | portalocker | 3.2.0 | BSD-3-Clause | Кроссплатформенная блокировка файлов при записи |
| 19 | psycopg | 3.3.4 | LGPL-3.0-only | См. Особые примечания (Драйвер СУБД) |
| 20 | psycopg-binary | 3.3.4 | LGPL-3.0-only | См. Особые примечания (Драйвер СУБД) |
| 21 | pywin32 | 312 | PSF License | Обеспечение совместимости со средой разработки Windows |
| 22 | redis (Python-пакет) | 8.0.1 | MIT | Клиентская библиотека сетевого протокола RESP |
| 23 | KeyDB (Инфраструктура) | любая | BSD-3-Clause | База данных в ОЗУ для кэширования (вместо ПО Redis) |
| 24 | six | 1.17.0 | MIT | Утилита совместимости кодовой базы |
| 25 | sqlparse | 0.5.5 | BSD License | Форматирование и невалидирующий парсинг SQL-запросов |
| 26 | typing_extensions | 4.16.0 | PSF-2.0 | Поддержка продвинутой статической типизации кода |
| 27 | tzdata | 2026.2 | Apache-2.0 | Системный провайдер актуальной базы часовых поясов |
| 28 | urllib3 | 2.7.0 | MIT | Клиент HTTP-запросов к внешним сервисам |
| 29 | djangorestframework-camel-case | 1.4.2 | BSD License | Автоматическая конвертация стилей JSON-ключей в API |
| 30 | djangorestframework-dataclasses | 1.4.0 | BSD License | Интеграция структур данных Dataclasses в сериализаторы |
| 31 | drf-rack | 0.1.0 | MIT | Дополнительные инструменты профилирования REST API |
| 32 | django-stubs / ext | 6.0.6 | MIT | Аннотации типов для статического анализатора кода |
| 33 | djangorestframework-stubs | 317.0 | MIT | Аннотации типов для валидации API-слоя |
| 34 | types-PyYAML | 6.0.12 | Apache-2.0 | Аннотации типов конфигурационных файлов YAML |
## Особые примечания по компонентам с лицензией LGPL (psycopg / psycopg-binary)
Компоненты psycopg и psycopg-binary версии 3.3.4 являются стандартными драйверами системы
управления базами данных PostgreSQL для языка программирования Python. Данные компоненты используются
в составе разрабатываемого ПО исключительно в качестве внешних динамически подключаемых библиотек
(посредством штатных инструкций импорта).
Исходный текст самих компонентов модификации не подвергается, в состав разрабатываемого ПО статически
не интегрируется и загружается изолированно из официального публичного репозитория.В соответствии с
условиями Раздела 4 лицензии GNU Lesser General Public License (LGPLv3), данная схема динамического
связывания является правомерной, не распространяет действие условий указанной лицензии на разработанное ПО,
не накладывает обязательств по предоставлению исходного текста основного программного продукта и не
препятствует его защите в качестве интеллектуальной собственности.

51
pyproject.toml Normal file
View File

@@ -0,0 +1,51 @@
[project]
name = "drf-rack"
version = "0.1.0"
description = "DRF Rack library for xeaf.net"
readme = "README.md"
requires-python = ">=3.14"
authors = [{name = "Nick V. Anokhin", email = "n.anokhin@xeaf.net"}]
classifiers = [
"License :: OSI Approved :: MIT License",
]
dependencies = [
"boto3",
"concurrent-log-handler",
"django",
"django-cors-headers",
"django-environ",
"django-split-settings",
"django-storages",
"djangorestframework",
"djangorestframework-camel-case",
"djangorestframework-dataclasses",
"djangorestframework-stubs",
"gunicorn",
"pillow",
"psycopg[binary]",
"redis",
"split_settings",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["net"]
# ---- НАСТРОЙКА ДЛЯ ПУБЛИКАЦИИ В GITEA ----
[[tool.uv.index]]
name = "xeaf-public"
url = "https://gitea.xeaf.net/api/packages/xeaf-public/pypi/simple/"
publish-url = "https://gitea.xeaf.net/api/packages/xeaf-public/pypi/"
explicit = true
[tool.uv.sources]
drf-rack = { index = "xeaf-public" }
[dependency-groups]
dev = [
"pip-licenses",
]