diff --git a/.cliff.toml b/.cliff.toml index 31d574d6..1c4bdfac 100644 --- a/.cliff.toml +++ b/.cliff.toml @@ -48,14 +48,14 @@ footer = """""" conventional_commits = true # regex for parsing and grouping commits commit_parsers = [ - { message = "^feat", group = "โ›ฐ๏ธ Features" }, - { message = "^fix", group = "๐Ÿ› Bug Fixes" }, - { message = "^refactor", group = "๐Ÿšœ Refactor" }, - { message = "^doc", group = "๐Ÿ“š Documentation" }, - { message = "^perf", group = "โšก Performance" }, - { message = "^test", group = "๐Ÿงช Testing" }, - { message = "^build", group = "๐Ÿ—๏ธ Build" }, - { message = "^ci", group = "๐Ÿค– CI" }, + { message = "^feat", group = "โ›ฐ๏ธ Features" }, + { message = "^fix", group = "๐Ÿ› Bug Fixes" }, + { message = "^refactor", group = "๐Ÿšœ Refactor" }, + { message = "^doc", group = "๐Ÿ“š Documentation" }, + { message = "^perf", group = "โšก Performance" }, + { message = "^test", group = "๐Ÿงช Testing" }, + { message = "^build", group = "๐Ÿ—๏ธ Build" }, + { message = "^ci", group = "๐Ÿค– CI" }, ] # glob pattern for matching git tags tag_pattern = "v[0-9]*" diff --git a/.dprint.jsonc b/.dprint.jsonc index a4a7b974..91a367c6 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -2,6 +2,7 @@ "markdown": { }, "toml": { + "indentWidth": 4, }, "dockerfile": { }, diff --git a/.github/workflows/ci_agent.yml b/.github/workflows/ci_agent.yml index e2509275..380fdd59 100644 --- a/.github/workflows/ci_agent.yml +++ b/.github/workflows/ci_agent.yml @@ -1,8 +1,5 @@ name: CI (Agent) -env: - VENV_PATH: "~/.venv-agent" - on: push: paths: @@ -28,44 +25,21 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11.3' - - - name: Cache poetry install - uses: actions/cache@v4 - with: - path: ~/.local - key: poetry - - - name: Install Poetry - uses: snok/install-poetry@v1 + - name: Install the latest version of rye + uses: eifinger/setup-rye@v4 with: - virtualenvs-create: true - virtualenvs-in-project: false - virtualenvs-path: ${{ env.VENV_PATH }} - - - name: Cache deps - id: cache-deps - uses: actions/cache@v4 - with: - path: ${{ env.VENV_PATH }} - key: venv-agent-${{ hashFiles('**/poetry.lock') }} + enable-cache: true - name: Install confluent-kafka prerequisites run: | sudo apt-get install --yes gcc librdkafka-dev python3-dev - - name: Install dependencies - run: | - poetry install --no-interaction --no-root + - name: Sync dependencies + run: rye sync - uses: taiki-e/install-action@just - uses: taiki-e/install-action@dprint - name: Lint # currently cli is not-maintained - run: | - just fmt-check - just lint + run: just check diff --git a/.github/workflows/ci_api.yml b/.github/workflows/ci_api.yml index 28d848b4..e43f1f39 100644 --- a/.github/workflows/ci_api.yml +++ b/.github/workflows/ci_api.yml @@ -28,30 +28,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 + - name: Install the latest version of rye + uses: eifinger/setup-rye@v4 with: - python-version: '3.11.3' - - - name: Cache poetry install - uses: actions/cache@v4 - with: - path: ~/.local - key: poetry - - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: false - virtualenvs-path: ${{ env.VENV_PATH }} - - - name: Cache deps - id: cache-deps - uses: actions/cache@v4 - with: - path: ${{ env.VENV_PATH }} - key: venv-api-${{ hashFiles('**/poetry.lock') }} + enable-cache: true - name: Install confluent-kafka prerequisites run: | @@ -61,9 +41,8 @@ jobs: run: | sudo apt-get install --yes build-essential libpq-dev - - name: Install dependencies - run: | - poetry install --no-interaction --no-root + - name: Sync dependencies + run: rye sync - uses: taiki-e/install-action@just - uses: taiki-e/install-action@dprint @@ -112,30 +91,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: Install the latest version of rye + uses: eifinger/setup-rye@v4 with: - python-version: ${{ matrix.python-version }} - - - name: Cache poetry install - uses: actions/cache@v4 - with: - path: ~/.local - key: poetry - - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - virtualenvs-path: ${{ env.VENV_PATH }} - - - name: Cache deps - id: cache-deps - uses: actions/cache@v4 - with: - path: ${{ env.VENV_PATH }} - key: venv-api-${{ hashFiles('**/poetry.lock') }} + enable-cache: true - name: Install confluent-kafka prerequisites run: | @@ -145,9 +104,8 @@ jobs: run: | sudo apt-get install --yes build-essential libpq-dev - - name: Install dependencies - run: | - poetry install --no-interaction --no-root + - name: Sync dependencies + run: rye sync - uses: taiki-e/install-action@just @@ -171,7 +129,7 @@ jobs: - name: Prepare for Integration tests run: | # use default location, instead setting the `RESTKNOT_CONFIG_FILE` - cp config.example.yml config.yml + cp config.example.yml src/rkapi/config.yml - name: Integration tests run: | diff --git a/.gitignore b/.gitignore index c66391b1..18db339b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,113 +1,16 @@ # Byte-compiled / optimized / DLL files __pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so # Distribution / packaging -.Python -env/ -build/ -develop-eggs/ dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -temp/ -.pytest_cache/ -*.egg-info/ -.installed.cfg -*.egg - -# 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/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# neo stuff: -.deploy/ - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# dotenv -.env - -# virtualenv -.venv -venv/ -ENV/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ - -.vscode +# Docs +_build/ # RESTKnot **/integration/schema.sql config.yml -docker-compose.yml +compose.yml +.env + +cdata diff --git a/agent/.dockerignore b/agent/.dockerignore index a5423643..697b44bc 100644 --- a/agent/.dockerignore +++ b/agent/.dockerignore @@ -15,4 +15,4 @@ __pycache__/ # other .flake8 .env -docker-compose.yml +compose.yml diff --git a/agent/.gitignore b/agent/.gitignore deleted file mode 100644 index d48b7238..00000000 --- a/agent/.gitignore +++ /dev/null @@ -1,105 +0,0 @@ -# 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/ -*.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/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.venv -venv/ -ENV/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ - -# visual studio files -.vscode - -.dockerignore diff --git a/agent/.python-version b/agent/.python-version new file mode 100644 index 00000000..2419ad5b --- /dev/null +++ b/agent/.python-version @@ -0,0 +1 @@ +3.11.9 diff --git a/agent/Dockerfile b/agent/Dockerfile index 8f3aba41..c11aa1f2 100644 --- a/agent/Dockerfile +++ b/agent/Dockerfile @@ -1,38 +1,12 @@ # didn't work with apline FROM python:3.11.3-slim-buster -ENV PIP_DEFAULT_TIMEOUT=100 \ - POETRY_VERSION=1.4 - RUN apt-get update # working with timezones RUN apt-get install --no-install-recommends --yes tzdata # confluent-kafka-python needs these RUN apt-get install --no-install-recommends --yes gcc librdkafka-dev python3-dev -# activate virtualenv -ENV VIRTUAL_ENV=/opt/venv -RUN python3 -m venv $VIRTUAL_ENV -ENV PATH="$VIRTUAL_ENV/bin:$PATH" - -# upgrading pip solves many installation problems -RUN pip3 install --upgrade pip -RUN pip3 install "poetry==$POETRY_VERSION" - -WORKDIR /dnsagent - -# leverage Docker cache -COPY poetry.lock pyproject.toml /dnsagent/ - -RUN poetry install --only main --no-interaction --no-ansi - -ARG VCS_REVISION -RUN echo "$VCS_REVISION" > version - -COPY . /dnsagent - -# check build version -RUN cat /dnsagent/version +RUN --mount=source=dist,target=/dist PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir /dist/*.whl -ENV PYTHONPATH="${PYTHONPATH}:/dnsagent" -CMD ["python3", "dnsagent/start.py"] +CMD ["python3", "-m", "rkagent"] diff --git a/agent/compose.example.yml b/agent/compose.example.yml index ff39a268..a46228fd 100644 --- a/agent/compose.example.yml +++ b/agent/compose.example.yml @@ -1,39 +1,40 @@ -version: '3' services: restknot-agent: - image: biznetgio/restknot-agent:0.7.12 - environment: - # Pay attention to your agent type! - - RESTKNOT_AGENT_TYPE=master - - # the libknot.so location is distro dependant. - # e.g in CentOS it is `/usr/lib64/libknot.so.10.0.0` - - RESTKNOT_KNOT_LIB=/usr/lib/x86_64-linux-gnu/libknot.so - - RESTKNOT_KNOT_SOCKET=/var/run/knot/knot.sock - - # Control socket timeout. - # Set to 0 for infinity. Default is 2000 seconds - # - RESTKNOT_SOCKET_TIMEOUT=5000 - # Maximum attempts to retry connection to the socket. Default is 10 times - - RESTKNOT_SOCKET_RETRY=10 - - # Wait for n seconds before firing new command to knotd - - RESTKNOT_COMMAND_DELAY=5 - - # using 127.0.0.1 or localhost won't make it work - # set it to RESTKNOT API IP - - RESTKNOT_KAFKA_BROKERS=10.0.0.1:9092,10.0.0.2:9092,10.0.0.3:9092 - # topic to subscribe - - RESTKNOT_KAFKA_TOPIC=domaindata - # consumer group id - - RESTKNOT_KAFKA_GROUP_ID=master1 - volumes: - # on CentOS family you need to add `:z` - # .e.g `/var/run/knot/:/var/run/knot/:z` - - # on CentOS: `/usr/lib64/:/usr/lib64` - - /usr/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/ #ro - - - /etc/knot/:/etc/knot/ #ro - - /var/lib/knot/:/var/lib/knot/ - - /var/run/knot/:/var/run/knot/:z + image: biznetgio/restknot-agent:latest + environment: + # Pay attention to your agent type! + - RESTKNOT_AGENT_TYPE=master + + # The libknot.so location is distro dependant. + # e.g., in CentOS it is `/usr/lib64/libknot.so.10.0.0` + - RESTKNOT_KNOT_LIB=/usr/lib/x86_64-linux-gnu/libknot.so + - RESTKNOT_KNOT_SOCKET=/var/run/knot/knot.sock + + # Control socket timeout. + # Set to 0 for infinity. Default is 2000 seconds + # - RESTKNOT_SOCKET_TIMEOUT=5000 + + # Maximum attempts to retry connection to the socket. Default is 10 times + - RESTKNOT_SOCKET_RETRY=10 + + # Wait for n seconds before firing new command to knotd + - RESTKNOT_COMMAND_DELAY=5 + + # Using 127.0.0.1 or localhost won't make it work + # Set it to RESTKNOT API IP + - RESTKNOT_KAFKA_BROKERS=10.0.0.1:9092,10.0.0.2:9092,10.0.0.3:9092 + + # Topic to subscribe + - RESTKNOT_KAFKA_TOPIC=domaindata + + # Consumer group id + - RESTKNOT_KAFKA_GROUP_ID=master1 + volumes: + # On CentOS family you need to add `:z` + # e.g., `/var/run/knot/:/var/run/knot/:z` + + # On CentOS: `/usr/lib64/:/usr/lib64` + - /usr/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/ #ro + - /etc/knot/:/etc/knot/ #ro + - /var/lib/knot/:/var/lib/knot/ + - /var/run/knot/:/var/run/knot/:z diff --git a/agent/dnsagent/__init__.py b/agent/dnsagent/__init__.py deleted file mode 100644 index 49e0fc1e..00000000 --- a/agent/dnsagent/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "0.7.0" diff --git a/agent/justfile b/agent/justfile index f593b410..9785c4d8 100755 --- a/agent/justfile +++ b/agent/justfile @@ -9,7 +9,7 @@ _default: # Setup the repository. setup: - poetry install && poetry shell + rye sync # Tasks to make the code-base comply with the rules. Mostly used in git hooks. comply: fmt lint @@ -19,31 +19,29 @@ check: fmt-check lint # Build the container image. image-build: - podman build --tag restknot-agent:latest --build-arg VCS_REVISION=$(git rev-parse --short HEAD) . + rye build --wheel --clean + docker build --tag restknot-agent:latest --build-arg VCS_REVISION=$(git rev-parse --short HEAD) . # Run the container image. image-start: - podman-compose up -d + docker compose up -d # Stop the container image. image-stop: - podman-compose down + docker compose down # Format the codebase. fmt: - poetry run black . - poetry run isort . + rye fmt # Check is the codebase properly formatted. fmt-check: - poetry run black --check . + rye fmt --check # Lint the codebase. lint: - poetry run ruff . + rye lint # Check dependencies health. up: - #!/usr/bin/env bash - poetry lock - poetry show --outdated | grep --file=<(poetry show --tree | grep '^\w' | cut -d' ' -f1) || echo "All dependencies are up to date, yay!" + rye sync --update-all diff --git a/agent/poetry.lock b/agent/poetry.lock deleted file mode 100644 index 0025c570..00000000 --- a/agent/poetry.lock +++ /dev/null @@ -1,353 +0,0 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. - -[[package]] -name = "attrs" -version = "23.1.0" -description = "Classes Without Boilerplate" -optional = false -python-versions = ">=3.7" -files = [ - {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, - {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, -] - -[package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[docs,tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] - -[[package]] -name = "black" -version = "23.7.0" -description = "The uncompromising code formatter." -optional = false -python-versions = ">=3.8" -files = [ - {file = "black-23.7.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:5c4bc552ab52f6c1c506ccae05681fab58c3f72d59ae6e6639e8885e94fe2587"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:552513d5cd5694590d7ef6f46e1767a4df9af168d449ff767b13b084c020e63f"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:86cee259349b4448adb4ef9b204bb4467aae74a386bce85d56ba4f5dc0da27be"}, - {file = "black-23.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:501387a9edcb75d7ae8a4412bb8749900386eaef258f1aefab18adddea1936bc"}, - {file = "black-23.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:fb074d8b213749fa1d077d630db0d5f8cc3b2ae63587ad4116e8a436e9bbe995"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b5b0ee6d96b345a8b420100b7d71ebfdd19fab5e8301aff48ec270042cd40ac2"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:893695a76b140881531062d48476ebe4a48f5d1e9388177e175d76234ca247cd"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:c333286dc3ddca6fdff74670b911cccedacb4ef0a60b34e491b8a67c833b343a"}, - {file = "black-23.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831d8f54c3a8c8cf55f64d0422ee875eecac26f5f649fb6c1df65316b67c8926"}, - {file = "black-23.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:7f3bf2dec7d541b4619b8ce526bda74a6b0bffc480a163fed32eb8b3c9aed8ad"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:f9062af71c59c004cd519e2fb8f5d25d39e46d3af011b41ab43b9c74e27e236f"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:01ede61aac8c154b55f35301fac3e730baf0c9cf8120f65a9cd61a81cfb4a0c3"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:327a8c2550ddc573b51e2c352adb88143464bb9d92c10416feb86b0f5aee5ff6"}, - {file = "black-23.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1c6022b86f83b632d06f2b02774134def5d4d4f1dac8bef16d90cda18ba28a"}, - {file = "black-23.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:27eb7a0c71604d5de083757fbdb245b1a4fae60e9596514c6ec497eb63f95320"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:8417dbd2f57b5701492cd46edcecc4f9208dc75529bcf76c514864e48da867d9"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:47e56d83aad53ca140da0af87678fb38e44fd6bc0af71eebab2d1f59b1acf1d3"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:25cc308838fe71f7065df53aedd20327969d05671bac95b38fdf37ebe70ac087"}, - {file = "black-23.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:642496b675095d423f9b8448243336f8ec71c9d4d57ec17bf795b67f08132a91"}, - {file = "black-23.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:ad0014efc7acf0bd745792bd0d8857413652979200ab924fbf239062adc12491"}, - {file = "black-23.7.0-py3-none-any.whl", hash = "sha256:9fd59d418c60c0348505f2ddf9609c1e1de8e7493eab96198fc89d9f865e7a96"}, - {file = "black-23.7.0.tar.gz", hash = "sha256:022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - -[[package]] -name = "click" -version = "8.1.6" -description = "Composable command line interface toolkit" -optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"}, - {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "confluent-kafka" -version = "2.0.2" -description = "Confluent's Python client for Apache Kafka" -optional = false -python-versions = "*" -files = [ - {file = "confluent-kafka-2.0.2.tar.gz", hash = "sha256:3b342ea4226ed105ca8bc035b0877e4dc2f115ffda74e3a350f363683356515b"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bf71b92cb06ca24ef5395f985e6999cfaafa1cc437f4301798706dc88f8c131b"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd026438cc12372836f7b474e070b71af4b1fb5b45636930893c620336c92f89"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6d3af0cfbd1aa7c57c03ad0e991b18bbb5a1a2067d517214b745dcda53f2f99"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-win32.whl", hash = "sha256:4957a099b896b3088f889f4f45b62c86ce8d86e8f2110b67fb967d80ffc01b26"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:cca1d06241cf2f9b70beb60302a3f583d1c2d7f7232750091e6d062cef75971a"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:66730c4a4faca872e9cff458895c139b956741c9fa9b0a226770eca43b616c9b"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a07c49ac59914a5490f2453491be5d9b36f7b24a26ef1a171eb4d3ff50c9aa1c"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69f2582420b5c010b64812c0ff1f391d32fbca2f5783f00b19e9f296bbf70202"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-win32.whl", hash = "sha256:cb651eb11bfc5fe66a7b1a5b858049c2cbc4320060161e651da9ecfce43f1158"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:2369a1ee740a0e3d7cd50cb1e7715ad56d7d9b561c5925d9d9abc298df1a1eb2"}, - {file = "confluent_kafka-2.0.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:be13fc582129a2944a400dd76d1bf5e1284006cb907f0e0606ba821bc5fe59a8"}, - {file = "confluent_kafka-2.0.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e30da9ff531fea072fb984ec54e56e466587e072d1b386f7bc0b8887b0ae1e1"}, - {file = "confluent_kafka-2.0.2-cp36-cp36m-win32.whl", hash = "sha256:48f397de635a4c3205846dc8d65c1dda38a821b2db300a2e38739383e44cf931"}, - {file = "confluent_kafka-2.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:a43e40ccc26be0dbdc2772fa8fd1a8422f830e94ffc468f52888040be1669d32"}, - {file = "confluent_kafka-2.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:634f1a78a99fa48fe86748b30f5cc96166e0082bbc169697807a448f4e01175c"}, - {file = "confluent_kafka-2.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89801e255aad013b5305285811ad32c00010c29ce07e10c10eefee8ddd1dcfe0"}, - {file = "confluent_kafka-2.0.2-cp37-cp37m-win32.whl", hash = "sha256:0a39a1a63fcaa4e029e5afb676664b5328b71756d91dc27cfa3f2121b128b95a"}, - {file = "confluent_kafka-2.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:608b100f2fcd4f2ede2e7bdf966bcee799218c1d9da5d87e7a1bae21aa0a8e35"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b72a086dd3f14f4bb8b97b3b7b62325ed2a1389f11d4acbd56b298615133395"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:50c3074df49be6d0e39532c099fd3f2a2f3c71652cb4cc37082e8382d3da2a22"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c89117d983b13746185713b4f1151e29bb467377b570301c1db5807d2eca567"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-win32.whl", hash = "sha256:f2ac3554429be8ea26e16d83a33cd69ad38a3b6b4d5411beb245d928e4562994"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:470b3618259761616999915029d2cb24066657ecb864b7e1558e59cf2e8f748d"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d2d66c413ee810abd22253dae770365a89b4a4e9d99645724793c85a0c7e286b"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6fac92f55ed526188bf38ec718251cc4b301c4dd2f97f786f8b08d64e459f10f"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b89f96743829775c89b902b16cdc3189ff3c6a86b27fc713c73523d461c87d7a"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-win32.whl", hash = "sha256:25ff4b322ce62f50402a3120c4b9eb73a093a80d829c3f0b11de12d85262b99b"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:23fbaa99cda5ae04ac9249236c581e6b1856624e5abd7ec88d9faf7ec18046fb"}, -] - -[package.extras] -avro = ["avro (>=1.11.1,<2)", "fastavro (>=0.23.0,<1.0)", "fastavro (>=1.0)", "requests"] -dev = ["avro (>=1.11.1,<2)", "fastavro (>=0.23.0,<1.0)", "fastavro (>=1.0)", "flake8", "pytest", "pytest (==4.6.4)", "pytest-timeout", "requests"] -doc = ["avro (>=1.11.1,<2)", "fastavro (>=0.23.0,<1.0)", "fastavro (>=1.0)", "requests", "sphinx", "sphinx-rtd-theme"] -json = ["jsonschema", "pyrsistent", "pyrsistent (==0.16.1)", "requests"] -protobuf = ["protobuf", "requests"] -schema-registry = ["requests"] - -[[package]] -name = "iniconfig" -version = "2.0.0" -description = "brain-dead simple config-ini parsing" -optional = false -python-versions = ">=3.7" -files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, -] - -[[package]] -name = "isort" -version = "5.12.0" -description = "A Python utility / library to sort Python imports." -optional = false -python-versions = ">=3.8.0" -files = [ - {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, - {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, -] - -[package.extras] -colors = ["colorama (>=0.4.3)"] -pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] -plugins = ["setuptools"] -requirements-deprecated-finder = ["pip-api", "pipreqs"] - -[[package]] -name = "libknot" -version = "3.2.5" -description = "Python bindings for libknot" -optional = false -python-versions = ">=3.5" -files = [ - {file = "libknot-3.2.5.tar.gz", hash = "sha256:35cccbed1d2f5c807a8ec9ceb4b2e371772bd686a152a4ca41e5d62473557fc3"}, -] - -[[package]] -name = "mypy-extensions" -version = "1.0.0" -description = "Type system extensions for programs checked with the mypy type checker." -optional = false -python-versions = ">=3.5" -files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, -] - -[[package]] -name = "packaging" -version = "23.1" -description = "Core utilities for Python packages" -optional = false -python-versions = ">=3.7" -files = [ - {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, - {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, -] - -[[package]] -name = "pathspec" -version = "0.11.1" -description = "Utility library for gitignore style pattern matching of file paths." -optional = false -python-versions = ">=3.7" -files = [ - {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, - {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, -] - -[[package]] -name = "platformdirs" -version = "3.9.1" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -optional = false -python-versions = ">=3.7" -files = [ - {file = "platformdirs-3.9.1-py3-none-any.whl", hash = "sha256:ad8291ae0ae5072f66c16945166cb11c63394c7a3ad1b1bc9828ca3162da8c2f"}, - {file = "platformdirs-3.9.1.tar.gz", hash = "sha256:1b42b450ad933e981d56e59f1b97495428c9bd60698baab9f3eb3d00d5822421"}, -] - -[package.extras] -docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)"] - -[[package]] -name = "pluggy" -version = "1.2.0" -description = "plugin and hook calling mechanisms for python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, - {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, -] - -[package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] - -[[package]] -name = "pytest" -version = "7.2.2" -description = "pytest: simple powerful testing with Python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pytest-7.2.2-py3-none-any.whl", hash = "sha256:130328f552dcfac0b1cec75c12e3f005619dc5f874f0a06e8ff7263f0ee6225e"}, - {file = "pytest-7.2.2.tar.gz", hash = "sha256:c99ab0c73aceb050f68929bc93af19ab6db0558791c6a0715723abe9d0ade9d4"}, -] - -[package.dependencies] -attrs = ">=19.2.0" -colorama = {version = "*", markers = "sys_platform == \"win32\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" - -[package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] - -[[package]] -name = "pytest-mock" -version = "3.10.0" -description = "Thin-wrapper around the mock package for easier use with pytest" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pytest-mock-3.10.0.tar.gz", hash = "sha256:fbbdb085ef7c252a326fd8cdcac0aa3b1333d8811f131bdcc701002e1be7ed4f"}, - {file = "pytest_mock-3.10.0-py3-none-any.whl", hash = "sha256:f4c973eeae0282963eb293eb173ce91b091a79c1334455acfac9ddee8a1c784b"}, -] - -[package.dependencies] -pytest = ">=5.0" - -[package.extras] -dev = ["pre-commit", "pytest-asyncio", "tox"] - -[[package]] -name = "pyyaml" -version = "6.0" -description = "YAML parser and emitter for Python" -optional = false -python-versions = ">=3.6" -files = [ - {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, - {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, - {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, - {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, - {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, - {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, - {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, - {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, - {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, - {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, - {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, - {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, - {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, - {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, - {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, - {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, - {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, - {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, -] - -[[package]] -name = "ruff" -version = "0.0.280" -description = "An extremely fast Python linter, written in Rust." -optional = false -python-versions = ">=3.7" -files = [ - {file = "ruff-0.0.280-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:48ed5aca381050a4e2f6d232db912d2e4e98e61648b513c350990c351125aaec"}, - {file = "ruff-0.0.280-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:ef6ee3e429fd29d6a5ceed295809e376e6ece5b0f13c7e703efaf3d3bcb30b96"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d878370f7e9463ac40c253724229314ff6ebe4508cdb96cb536e1af4d5a9cd4f"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:83e8f372fa5627eeda5b83b5a9632d2f9c88fc6d78cead7e2a1f6fb05728d137"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7008fc6ca1df18b21fa98bdcfc711dad5f94d0fc3c11791f65e460c48ef27c82"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:fe7118c1eae3fda17ceb409629c7f3b5a22dffa7caf1f6796776936dca1fe653"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:37359cd67d2af8e09110a546507c302cbea11c66a52d2a9b6d841d465f9962d4"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd58af46b0221efb95966f1f0f7576df711cb53e50d2fdb0e83c2f33360116a4"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e7c15828d09f90e97bea8feefcd2907e8c8ce3a1f959c99f9b4b3469679f33c"}, - {file = "ruff-0.0.280-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:2dae8f2d9c44c5c49af01733c2f7956f808db682a4193180dedb29dd718d7bbe"}, - {file = "ruff-0.0.280-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5f972567163a20fb8c2d6afc60c2ea5ef8b68d69505760a8bd0377de8984b4f6"}, - {file = "ruff-0.0.280-py3-none-musllinux_1_2_i686.whl", hash = "sha256:8ffa7347ad11643f29de100977c055e47c988cd6d9f5f5ff83027600b11b9189"}, - {file = "ruff-0.0.280-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:7a37dab70114671d273f203268f6c3366c035fe0c8056614069e90a65e614bfc"}, - {file = "ruff-0.0.280-py3-none-win32.whl", hash = "sha256:7784e3606352fcfb193f3cd22b2e2117c444cb879ef6609ec69deabd662b0763"}, - {file = "ruff-0.0.280-py3-none-win_amd64.whl", hash = "sha256:4a7d52457b5dfcd3ab24b0b38eefaead8e2dca62b4fbf10de4cd0938cf20ce30"}, - {file = "ruff-0.0.280-py3-none-win_arm64.whl", hash = "sha256:b7de5b8689575918e130e4384ed9f539ce91d067c0a332aedef6ca7188adac2d"}, - {file = "ruff-0.0.280.tar.gz", hash = "sha256:581c43e4ac5e5a7117ad7da2120d960a4a99e68ec4021ec3cd47fe1cf78f8380"}, -] - -[metadata] -lock-version = "2.0" -python-versions = "3.11.3" -content-hash = "1679736e20b7114b7456997e40f8fe954eb30cf317775b060c7eb81e0e6f280b" diff --git a/agent/pyproject.toml b/agent/pyproject.toml index 5cc84910..dd16e965 100644 --- a/agent/pyproject.toml +++ b/agent/pyproject.toml @@ -1,33 +1,31 @@ -[tool.poetry] -name = "agent" +[project] +name = "rkagent" # restknot-agent version = "0.7.12" description = "RESTKnot Agent" -authors = ["Azzam S.A "] -license = "MIT" +authors = [ + { name = "Azzam S.A", email = "azzam@biznetgio.com" }, +] +dependencies = [ + "confluent-kafka==2.0.2", + "libknot==3.3.8", + "PyYAML==6.0", +] readme = "README.md" +requires-python = ">= 3.11" -[tool.poetry.dependencies] -python = "3.11.3" -confluent-kafka = "2.0.2" -libknot = "3.2.5" -PyYAML = "6.0" - -[tool.poetry.group.dev.dependencies] -pytest = "7.2.2" -pytest-mock = "3.10.0" -black = "23.7.0" -ruff = "0.0.280" -isort = "5.12.0" - -[tool.isort] -profile = "black" -known_first_party = "app" +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.ruff] -ignore = [ - "E501", +[tool.rye] +managed = true +dev-dependencies = [ + "pytest>=8.3.2", + "pytest-mock>=3.14.0", ] -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["src/rkagent"] diff --git a/agent/requirements-dev.lock b/agent/requirements-dev.lock new file mode 100644 index 00000000..258cfc4f --- /dev/null +++ b/agent/requirements-dev.lock @@ -0,0 +1,27 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false +# universal: false + +-e file:. +confluent-kafka==2.0.2 + # via rkagent +iniconfig==2.0.0 + # via pytest +libknot==3.3.8 + # via rkagent +packaging==24.1 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.3.2 + # via pytest-mock +pytest-mock==3.14.0 +pyyaml==6.0 + # via rkagent diff --git a/agent/requirements.lock b/agent/requirements.lock new file mode 100644 index 00000000..8e51f716 --- /dev/null +++ b/agent/requirements.lock @@ -0,0 +1,18 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false +# universal: false + +-e file:. +confluent-kafka==2.0.2 + # via rkagent +libknot==3.3.8 + # via rkagent +pyyaml==6.0 + # via rkagent diff --git a/agent/src/rkagent/__init__.py b/agent/src/rkagent/__init__.py new file mode 100644 index 00000000..41770f2e --- /dev/null +++ b/agent/src/rkagent/__init__.py @@ -0,0 +1,6 @@ +from rkagent import consumer + + +def main() -> int: + consumer.main() + return 0 diff --git a/agent/src/rkagent/__main__.py b/agent/src/rkagent/__main__.py new file mode 100644 index 00000000..da5177f8 --- /dev/null +++ b/agent/src/rkagent/__main__.py @@ -0,0 +1,4 @@ +import rkagent +import sys + +sys.exit(rkagent.main()) diff --git a/agent/dnsagent/start.py b/agent/src/rkagent/consumer.py similarity index 92% rename from agent/dnsagent/start.py rename to agent/src/rkagent/consumer.py index 6b481b89..659093aa 100644 --- a/agent/dnsagent/start.py +++ b/agent/src/rkagent/consumer.py @@ -6,7 +6,7 @@ from confluent_kafka import Consumer, KafkaException -from dnsagent import agent +from rkagent import knot logger = logging.getLogger(__name__) @@ -34,7 +34,7 @@ def consume(): topic = os.environ.get("RESTKNOT_KAFKA_TOPIC") group_id = os.environ.get("RESTKNOT_KAFKA_GROUP_ID") agent_type = os.environ.get("RESTKNOT_AGENT_TYPE") - command_delay = int(os.environ.get("RESTKNOT_COMMAND_DELAY", 5)) + command_delay = float(os.environ.get("RESTKNOT_COMMAND_DELAY", 5.0)) conf = { "bootstrap.servers": brokers, @@ -66,14 +66,10 @@ def print_assignment(consumer, partitions): for query in knot_queries: print(f"Delaying next command by {command_delay} seconds...") time.sleep(command_delay) - agent.execute(query) + knot.execute(query) except KeyboardInterrupt: print(" dnsagent stopped. Aborted by user") finally: # Close down consumer to commit final offsets. consumer.close() - - -if __name__ == "__main__": - main() diff --git a/agent/dnsagent/agent.py b/agent/src/rkagent/knot.py similarity index 100% rename from agent/dnsagent/agent.py rename to agent/src/rkagent/knot.py diff --git a/api/.gitignore b/api/.gitignore deleted file mode 100644 index d6023e00..00000000 --- a/api/.gitignore +++ /dev/null @@ -1,71 +0,0 @@ -# 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/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# SageMath parsed files -*.sage.py - -# Environments -.env - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ - -# visual studio files -.vscode - -config.yml diff --git a/api/.python-version b/api/.python-version new file mode 100644 index 00000000..2419ad5b --- /dev/null +++ b/api/.python-version @@ -0,0 +1 @@ +3.11.9 diff --git a/api/Dockerfile b/api/Dockerfile index a8c66bdd..c934b9a4 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,8 +1,6 @@ FROM python:3.11.3-slim-buster -ENV PIP_DEFAULT_TIMEOUT=100 \ - POETRY_VERSION=1.4 \ - GUNICORN_VERSION=20.1.0 +WORKDIR /app RUN apt-get update # working with timezones @@ -12,31 +10,11 @@ RUN apt-get install --no-install-recommends --yes librdkafka-dev python3-dev # psycopg2 needs these RUN apt-get install --no-install-recommends --yes build-essential libpq-dev -# activate virtualenv -ENV VIRTUAL_ENV=/opt/venv -RUN python3 -m venv $VIRTUAL_ENV -ENV PATH="$VIRTUAL_ENV/bin:$PATH" - -# upgrading pip solves many installation problems -RUN pip3 install --upgrade pip -RUN pip3 install "gunicorn==$GUNICORN_VERSION" -RUN pip3 install "poetry==$POETRY_VERSION" - -WORKDIR /restknotapi - -# leverage Docker cache -COPY poetry.lock pyproject.toml /restknotapi/ - -COPY ./config.example.yml /restknotapi/config.yml - -RUN poetry install --only main --no-interaction --no-ansi +RUN --mount=source=dist,target=/dist PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir /dist/*.whl ARG VCS_REVISION RUN echo "$VCS_REVISION" > version -COPY . /restknotapi -# check build version -RUN cat /restknotapi/version - -EXPOSE 5000 -CMD ["gunicorn", "autoapp:app", "-b", "0.0.0.0:5000"] +COPY src . +COPY gunicorn.conf.py gunicorn.conf.py +COPY config.example.yml config.yml diff --git a/api/compose.example.yml b/api/compose.example.yml index bb49650e..dff6f88b 100644 --- a/api/compose.example.yml +++ b/api/compose.example.yml @@ -1,21 +1,21 @@ -version: '3' services: restknot-api: - image: biznetgio/restknot-api:0.7.14 + image: biznetgio/restknot-api:latest # depends_on: # - kafka1 ports: - '5000:5000' environment: - TZ=Asia/Jakarta - - FLASK_APP=autoapp.py - - FLASK_ENV=production - - FLASK_DEBUG=0 - # server + # + # Server - APP_HOST=0.0.0.0 # default 0.0.0.0 + # If you change this, make sure to update the `ports` as well. - APP_PORT=5000 # default 8000 + # + # Database - DB_NAME=knotdb # don't add whitespace between = - DB_HOST=roach - DB_PORT=26257 @@ -35,4 +35,4 @@ services: # - RESTKNOT_CONFIG_FILE= # default timeout:30 - command: gunicorn 'autoapp:app' -c 'gunicorn.conf.py' --timeout 60 + command: gunicorn "rkapi.autoapp:app" --config "gunicorn.conf.py" --timeout 60 diff --git a/api/justfile b/api/justfile index 1844de4e..d28fd6dd 100755 --- a/api/justfile +++ b/api/justfile @@ -14,9 +14,10 @@ _default: # Setup the repository. setup: _areyousure # psycopg2 needs these - sudo apt-get install --no-install-recommends --yes build-essential libpq-dev + # sudo apt-get install --no-install-recommends --yes build-essential libpq-dev + # sudo dnf install libpq-devel - poetry install && poetry shell + rye sync # Tasks to make the code-base comply with the rules. Mostly used in git hooks. comply: fmt lint test-unit @@ -24,47 +25,45 @@ comply: fmt lint test-unit # Check if the repository comply with the rules and ready to be pushed. check: fmt-check lint test -# Develop the app. +[doc('Run the app')] run: - flask run + FLASK_APP=rkapi.autoapp rye run flask run --port 8001 # Build the docker image. image-build: - podman build -t restknot-api:latest --build-arg VCS_REVISION=$(git rev-parse --short HEAD) . + rye build --wheel --clean + docker build -t restknot-api:latest --build-arg VCS_REVISION=$(git rev-parse --short HEAD) . # Run the container image. image-start: - podman-compose up -d + docker compose up -d # Stop the container image. image-stop: - podman-compose down + docker compose down # Format the codebase. fmt: - poetry run black . - poetry run isort . + rye fmt # Check is the codebase properly formatted. fmt-check: - poetry run black --check . + rye fmt --check # Lint the codebase. lint: - poetry run ruff . + rye lint # Test the codebase. test: test-unit - poetry run pytest -s tests/integration/ + rye test -- tests/integration/ test-unit: - poetry run pytest -s tests/unit/ + rye test -- tests/unit/ # Check dependencies health. up: - #!/usr/bin/env bash - poetry lock - poetry show --outdated | grep --file=<(poetry show --tree | grep '^\w' | cut -d' ' -f1) || echo "All dependencies are up to date, yay!" + rye sync --update-all # # Helper diff --git a/api/poetry.lock b/api/poetry.lock deleted file mode 100644 index f4cbe88e..00000000 --- a/api/poetry.lock +++ /dev/null @@ -1,750 +0,0 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. - -[[package]] -name = "aniso8601" -version = "9.0.1" -description = "A library for parsing ISO 8601 strings." -optional = false -python-versions = "*" -files = [ - {file = "aniso8601-9.0.1-py2.py3-none-any.whl", hash = "sha256:1d2b7ef82963909e93c4f24ce48d4de9e66009a21bf1c1e1c85bdd0812fe412f"}, - {file = "aniso8601-9.0.1.tar.gz", hash = "sha256:72e3117667eedf66951bb2d93f4296a56b94b078a8a95905a052611fb3f1b973"}, -] - -[package.extras] -dev = ["black", "coverage", "isort", "pre-commit", "pyenchant", "pylint"] - -[[package]] -name = "black" -version = "23.7.0" -description = "The uncompromising code formatter." -optional = false -python-versions = ">=3.8" -files = [ - {file = "black-23.7.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:5c4bc552ab52f6c1c506ccae05681fab58c3f72d59ae6e6639e8885e94fe2587"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:552513d5cd5694590d7ef6f46e1767a4df9af168d449ff767b13b084c020e63f"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:86cee259349b4448adb4ef9b204bb4467aae74a386bce85d56ba4f5dc0da27be"}, - {file = "black-23.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:501387a9edcb75d7ae8a4412bb8749900386eaef258f1aefab18adddea1936bc"}, - {file = "black-23.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:fb074d8b213749fa1d077d630db0d5f8cc3b2ae63587ad4116e8a436e9bbe995"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b5b0ee6d96b345a8b420100b7d71ebfdd19fab5e8301aff48ec270042cd40ac2"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:893695a76b140881531062d48476ebe4a48f5d1e9388177e175d76234ca247cd"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:c333286dc3ddca6fdff74670b911cccedacb4ef0a60b34e491b8a67c833b343a"}, - {file = "black-23.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831d8f54c3a8c8cf55f64d0422ee875eecac26f5f649fb6c1df65316b67c8926"}, - {file = "black-23.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:7f3bf2dec7d541b4619b8ce526bda74a6b0bffc480a163fed32eb8b3c9aed8ad"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:f9062af71c59c004cd519e2fb8f5d25d39e46d3af011b41ab43b9c74e27e236f"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:01ede61aac8c154b55f35301fac3e730baf0c9cf8120f65a9cd61a81cfb4a0c3"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:327a8c2550ddc573b51e2c352adb88143464bb9d92c10416feb86b0f5aee5ff6"}, - {file = "black-23.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1c6022b86f83b632d06f2b02774134def5d4d4f1dac8bef16d90cda18ba28a"}, - {file = "black-23.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:27eb7a0c71604d5de083757fbdb245b1a4fae60e9596514c6ec497eb63f95320"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:8417dbd2f57b5701492cd46edcecc4f9208dc75529bcf76c514864e48da867d9"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:47e56d83aad53ca140da0af87678fb38e44fd6bc0af71eebab2d1f59b1acf1d3"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:25cc308838fe71f7065df53aedd20327969d05671bac95b38fdf37ebe70ac087"}, - {file = "black-23.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:642496b675095d423f9b8448243336f8ec71c9d4d57ec17bf795b67f08132a91"}, - {file = "black-23.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:ad0014efc7acf0bd745792bd0d8857413652979200ab924fbf239062adc12491"}, - {file = "black-23.7.0-py3-none-any.whl", hash = "sha256:9fd59d418c60c0348505f2ddf9609c1e1de8e7493eab96198fc89d9f865e7a96"}, - {file = "black-23.7.0.tar.gz", hash = "sha256:022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - -[[package]] -name = "certifi" -version = "2023.7.22" -description = "Python package for providing Mozilla's CA Bundle." -optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, - {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, -] - -[[package]] -name = "charset-normalizer" -version = "3.2.0" -description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -optional = false -python-versions = ">=3.7.0" -files = [ - {file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-win32.whl", hash = "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-win32.whl", hash = "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-win32.whl", hash = "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-win32.whl", hash = "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80"}, - {file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"}, -] - -[[package]] -name = "click" -version = "8.1.6" -description = "Composable command line interface toolkit" -optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"}, - {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "confluent-kafka" -version = "2.0.2" -description = "Confluent's Python client for Apache Kafka" -optional = false -python-versions = "*" -files = [ - {file = "confluent-kafka-2.0.2.tar.gz", hash = "sha256:3b342ea4226ed105ca8bc035b0877e4dc2f115ffda74e3a350f363683356515b"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bf71b92cb06ca24ef5395f985e6999cfaafa1cc437f4301798706dc88f8c131b"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd026438cc12372836f7b474e070b71af4b1fb5b45636930893c620336c92f89"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6d3af0cfbd1aa7c57c03ad0e991b18bbb5a1a2067d517214b745dcda53f2f99"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-win32.whl", hash = "sha256:4957a099b896b3088f889f4f45b62c86ce8d86e8f2110b67fb967d80ffc01b26"}, - {file = "confluent_kafka-2.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:cca1d06241cf2f9b70beb60302a3f583d1c2d7f7232750091e6d062cef75971a"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:66730c4a4faca872e9cff458895c139b956741c9fa9b0a226770eca43b616c9b"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a07c49ac59914a5490f2453491be5d9b36f7b24a26ef1a171eb4d3ff50c9aa1c"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69f2582420b5c010b64812c0ff1f391d32fbca2f5783f00b19e9f296bbf70202"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-win32.whl", hash = "sha256:cb651eb11bfc5fe66a7b1a5b858049c2cbc4320060161e651da9ecfce43f1158"}, - {file = "confluent_kafka-2.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:2369a1ee740a0e3d7cd50cb1e7715ad56d7d9b561c5925d9d9abc298df1a1eb2"}, - {file = "confluent_kafka-2.0.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:be13fc582129a2944a400dd76d1bf5e1284006cb907f0e0606ba821bc5fe59a8"}, - {file = "confluent_kafka-2.0.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e30da9ff531fea072fb984ec54e56e466587e072d1b386f7bc0b8887b0ae1e1"}, - {file = "confluent_kafka-2.0.2-cp36-cp36m-win32.whl", hash = "sha256:48f397de635a4c3205846dc8d65c1dda38a821b2db300a2e38739383e44cf931"}, - {file = "confluent_kafka-2.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:a43e40ccc26be0dbdc2772fa8fd1a8422f830e94ffc468f52888040be1669d32"}, - {file = "confluent_kafka-2.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:634f1a78a99fa48fe86748b30f5cc96166e0082bbc169697807a448f4e01175c"}, - {file = "confluent_kafka-2.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89801e255aad013b5305285811ad32c00010c29ce07e10c10eefee8ddd1dcfe0"}, - {file = "confluent_kafka-2.0.2-cp37-cp37m-win32.whl", hash = "sha256:0a39a1a63fcaa4e029e5afb676664b5328b71756d91dc27cfa3f2121b128b95a"}, - {file = "confluent_kafka-2.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:608b100f2fcd4f2ede2e7bdf966bcee799218c1d9da5d87e7a1bae21aa0a8e35"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b72a086dd3f14f4bb8b97b3b7b62325ed2a1389f11d4acbd56b298615133395"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:50c3074df49be6d0e39532c099fd3f2a2f3c71652cb4cc37082e8382d3da2a22"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c89117d983b13746185713b4f1151e29bb467377b570301c1db5807d2eca567"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-win32.whl", hash = "sha256:f2ac3554429be8ea26e16d83a33cd69ad38a3b6b4d5411beb245d928e4562994"}, - {file = "confluent_kafka-2.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:470b3618259761616999915029d2cb24066657ecb864b7e1558e59cf2e8f748d"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d2d66c413ee810abd22253dae770365a89b4a4e9d99645724793c85a0c7e286b"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6fac92f55ed526188bf38ec718251cc4b301c4dd2f97f786f8b08d64e459f10f"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b89f96743829775c89b902b16cdc3189ff3c6a86b27fc713c73523d461c87d7a"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-win32.whl", hash = "sha256:25ff4b322ce62f50402a3120c4b9eb73a093a80d829c3f0b11de12d85262b99b"}, - {file = "confluent_kafka-2.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:23fbaa99cda5ae04ac9249236c581e6b1856624e5abd7ec88d9faf7ec18046fb"}, -] - -[package.extras] -avro = ["avro (>=1.11.1,<2)", "fastavro (>=0.23.0,<1.0)", "fastavro (>=1.0)", "requests"] -dev = ["avro (>=1.11.1,<2)", "fastavro (>=0.23.0,<1.0)", "fastavro (>=1.0)", "flake8", "pytest", "pytest (==4.6.4)", "pytest-timeout", "requests"] -doc = ["avro (>=1.11.1,<2)", "fastavro (>=0.23.0,<1.0)", "fastavro (>=1.0)", "requests", "sphinx", "sphinx-rtd-theme"] -json = ["jsonschema", "pyrsistent", "pyrsistent (==0.16.1)", "requests"] -protobuf = ["protobuf", "requests"] -schema-registry = ["requests"] - -[[package]] -name = "environs" -version = "9.5.0" -description = "simplified environment variable parsing" -optional = false -python-versions = ">=3.6" -files = [ - {file = "environs-9.5.0-py2.py3-none-any.whl", hash = "sha256:1e549569a3de49c05f856f40bce86979e7d5ffbbc4398e7f338574c220189124"}, - {file = "environs-9.5.0.tar.gz", hash = "sha256:a76307b36fbe856bdca7ee9161e6c466fd7fcffc297109a118c59b54e27e30c9"}, -] - -[package.dependencies] -marshmallow = ">=3.0.0" -python-dotenv = "*" - -[package.extras] -dev = ["dj-database-url", "dj-email-url", "django-cache-url", "flake8 (==4.0.1)", "flake8-bugbear (==21.9.2)", "mypy (==0.910)", "pre-commit (>=2.4,<3.0)", "pytest", "tox"] -django = ["dj-database-url", "dj-email-url", "django-cache-url"] -lint = ["flake8 (==4.0.1)", "flake8-bugbear (==21.9.2)", "mypy (==0.910)", "pre-commit (>=2.4,<3.0)"] -tests = ["dj-database-url", "dj-email-url", "django-cache-url", "pytest"] - -[[package]] -name = "flask" -version = "2.2.3" -description = "A simple framework for building complex web applications." -optional = false -python-versions = ">=3.7" -files = [ - {file = "Flask-2.2.3-py3-none-any.whl", hash = "sha256:c0bec9477df1cb867e5a67c9e1ab758de9cb4a3e52dd70681f59fa40a62b3f2d"}, - {file = "Flask-2.2.3.tar.gz", hash = "sha256:7eb373984bf1c770023fce9db164ed0c3353cd0b53f130f4693da0ca756a2e6d"}, -] - -[package.dependencies] -click = ">=8.0" -itsdangerous = ">=2.0" -Jinja2 = ">=3.0" -Werkzeug = ">=2.2.2" - -[package.extras] -async = ["asgiref (>=3.2)"] -dotenv = ["python-dotenv"] - -[[package]] -name = "flask-cors" -version = "3.0.10" -description = "A Flask extension adding a decorator for CORS support" -optional = false -python-versions = "*" -files = [ - {file = "Flask-Cors-3.0.10.tar.gz", hash = "sha256:b60839393f3b84a0f3746f6cdca56c1ad7426aa738b70d6c61375857823181de"}, - {file = "Flask_Cors-3.0.10-py2.py3-none-any.whl", hash = "sha256:74efc975af1194fc7891ff5cd85b0f7478be4f7f59fe158102e91abb72bb4438"}, -] - -[package.dependencies] -Flask = ">=0.9" -Six = "*" - -[[package]] -name = "flask-restful" -version = "0.3.9" -description = "Simple framework for creating REST APIs" -optional = false -python-versions = "*" -files = [ - {file = "Flask-RESTful-0.3.9.tar.gz", hash = "sha256:ccec650b835d48192138c85329ae03735e6ced58e9b2d9c2146d6c84c06fa53e"}, - {file = "Flask_RESTful-0.3.9-py2.py3-none-any.whl", hash = "sha256:4970c49b6488e46c520b325f54833374dc2b98e211f1b272bd4b0c516232afe2"}, -] - -[package.dependencies] -aniso8601 = ">=0.82" -Flask = ">=0.8" -pytz = "*" -six = ">=1.3.0" - -[package.extras] -docs = ["sphinx"] - -[[package]] -name = "idna" -version = "3.4" -description = "Internationalized Domain Names in Applications (IDNA)" -optional = false -python-versions = ">=3.5" -files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, -] - -[[package]] -name = "iniconfig" -version = "2.0.0" -description = "brain-dead simple config-ini parsing" -optional = false -python-versions = ">=3.7" -files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, -] - -[[package]] -name = "isort" -version = "5.12.0" -description = "A Python utility / library to sort Python imports." -optional = false -python-versions = ">=3.8.0" -files = [ - {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, - {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, -] - -[package.extras] -colors = ["colorama (>=0.4.3)"] -pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] -plugins = ["setuptools"] -requirements-deprecated-finder = ["pip-api", "pipreqs"] - -[[package]] -name = "itsdangerous" -version = "2.1.2" -description = "Safely pass data to untrusted environments and back." -optional = false -python-versions = ">=3.7" -files = [ - {file = "itsdangerous-2.1.2-py3-none-any.whl", hash = "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44"}, - {file = "itsdangerous-2.1.2.tar.gz", hash = "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a"}, -] - -[[package]] -name = "jinja2" -version = "3.1.2" -description = "A very fast and expressive template engine." -optional = false -python-versions = ">=3.7" -files = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, -] - -[package.dependencies] -MarkupSafe = ">=2.0" - -[package.extras] -i18n = ["Babel (>=2.7)"] - -[[package]] -name = "libknot" -version = "3.2.5" -description = "Python bindings for libknot" -optional = false -python-versions = ">=3.5" -files = [ - {file = "libknot-3.2.5.tar.gz", hash = "sha256:35cccbed1d2f5c807a8ec9ceb4b2e371772bd686a152a4ca41e5d62473557fc3"}, -] - -[[package]] -name = "markupsafe" -version = "2.1.3" -description = "Safely add untrusted strings to HTML/XML markup." -optional = false -python-versions = ">=3.7" -files = [ - {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, - {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, - {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, - {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, - {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, - {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, - {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, -] - -[[package]] -name = "marshmallow" -version = "3.20.1" -description = "A lightweight library for converting complex datatypes to and from native Python datatypes." -optional = false -python-versions = ">=3.8" -files = [ - {file = "marshmallow-3.20.1-py3-none-any.whl", hash = "sha256:684939db93e80ad3561392f47be0230743131560a41c5110684c16e21ade0a5c"}, - {file = "marshmallow-3.20.1.tar.gz", hash = "sha256:5d2371bbe42000f2b3fb5eaa065224df7d8f8597bc19a1bbfa5bfe7fba8da889"}, -] - -[package.dependencies] -packaging = ">=17.0" - -[package.extras] -dev = ["flake8 (==6.0.0)", "flake8-bugbear (==23.7.10)", "mypy (==1.4.1)", "pre-commit (>=2.4,<4.0)", "pytest", "pytz", "simplejson", "tox"] -docs = ["alabaster (==0.7.13)", "autodocsumm (==0.2.11)", "sphinx (==7.0.1)", "sphinx-issues (==3.0.1)", "sphinx-version-warning (==1.1.2)"] -lint = ["flake8 (==6.0.0)", "flake8-bugbear (==23.7.10)", "mypy (==1.4.1)", "pre-commit (>=2.4,<4.0)"] -tests = ["pytest", "pytz", "simplejson"] - -[[package]] -name = "mypy-extensions" -version = "1.0.0" -description = "Type system extensions for programs checked with the mypy type checker." -optional = false -python-versions = ">=3.5" -files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, -] - -[[package]] -name = "packaging" -version = "23.1" -description = "Core utilities for Python packages" -optional = false -python-versions = ">=3.7" -files = [ - {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, - {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, -] - -[[package]] -name = "pathspec" -version = "0.11.1" -description = "Utility library for gitignore style pattern matching of file paths." -optional = false -python-versions = ">=3.7" -files = [ - {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, - {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, -] - -[[package]] -name = "platformdirs" -version = "3.9.1" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -optional = false -python-versions = ">=3.7" -files = [ - {file = "platformdirs-3.9.1-py3-none-any.whl", hash = "sha256:ad8291ae0ae5072f66c16945166cb11c63394c7a3ad1b1bc9828ca3162da8c2f"}, - {file = "platformdirs-3.9.1.tar.gz", hash = "sha256:1b42b450ad933e981d56e59f1b97495428c9bd60698baab9f3eb3d00d5822421"}, -] - -[package.extras] -docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)"] - -[[package]] -name = "pluggy" -version = "1.2.0" -description = "plugin and hook calling mechanisms for python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, - {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, -] - -[package.extras] -dev = ["pre-commit", "tox"] -testing = ["pytest", "pytest-benchmark"] - -[[package]] -name = "psycopg2" -version = "2.9.5" -description = "psycopg2 - Python-PostgreSQL Database Adapter" -optional = false -python-versions = ">=3.6" -files = [ - {file = "psycopg2-2.9.5-cp310-cp310-win32.whl", hash = "sha256:d3ef67e630b0de0779c42912fe2cbae3805ebaba30cda27fea2a3de650a9414f"}, - {file = "psycopg2-2.9.5-cp310-cp310-win_amd64.whl", hash = "sha256:4cb9936316d88bfab614666eb9e32995e794ed0f8f6b3b718666c22819c1d7ee"}, - {file = "psycopg2-2.9.5-cp311-cp311-win32.whl", hash = "sha256:093e3894d2d3c592ab0945d9eba9d139c139664dcf83a1c440b8a7aa9bb21955"}, - {file = "psycopg2-2.9.5-cp311-cp311-win_amd64.whl", hash = "sha256:920bf418000dd17669d2904472efeab2b20546efd0548139618f8fa305d1d7ad"}, - {file = "psycopg2-2.9.5-cp36-cp36m-win32.whl", hash = "sha256:b9ac1b0d8ecc49e05e4e182694f418d27f3aedcfca854ebd6c05bb1cffa10d6d"}, - {file = "psycopg2-2.9.5-cp36-cp36m-win_amd64.whl", hash = "sha256:fc04dd5189b90d825509caa510f20d1d504761e78b8dfb95a0ede180f71d50e5"}, - {file = "psycopg2-2.9.5-cp37-cp37m-win32.whl", hash = "sha256:922cc5f0b98a5f2b1ff481f5551b95cd04580fd6f0c72d9b22e6c0145a4840e0"}, - {file = "psycopg2-2.9.5-cp37-cp37m-win_amd64.whl", hash = "sha256:1e5a38aa85bd660c53947bd28aeaafb6a97d70423606f1ccb044a03a1203fe4a"}, - {file = "psycopg2-2.9.5-cp38-cp38-win32.whl", hash = "sha256:f5b6320dbc3cf6cfb9f25308286f9f7ab464e65cfb105b64cc9c52831748ced2"}, - {file = "psycopg2-2.9.5-cp38-cp38-win_amd64.whl", hash = "sha256:1a5c7d7d577e0eabfcf15eb87d1e19314c8c4f0e722a301f98e0e3a65e238b4e"}, - {file = "psycopg2-2.9.5-cp39-cp39-win32.whl", hash = "sha256:322fd5fca0b1113677089d4ebd5222c964b1760e361f151cbb2706c4912112c5"}, - {file = "psycopg2-2.9.5-cp39-cp39-win_amd64.whl", hash = "sha256:190d51e8c1b25a47484e52a79638a8182451d6f6dff99f26ad9bd81e5359a0fa"}, - {file = "psycopg2-2.9.5.tar.gz", hash = "sha256:a5246d2e683a972e2187a8714b5c2cf8156c064629f9a9b1a873c1730d9e245a"}, -] - -[[package]] -name = "pytest" -version = "7.4.0" -description = "pytest: simple powerful testing with Python" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32"}, - {file = "pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "sys_platform == \"win32\""} -iniconfig = "*" -packaging = "*" -pluggy = ">=0.12,<2.0" - -[package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] - -[[package]] -name = "pytest-mock" -version = "3.10.0" -description = "Thin-wrapper around the mock package for easier use with pytest" -optional = false -python-versions = ">=3.7" -files = [ - {file = "pytest-mock-3.10.0.tar.gz", hash = "sha256:fbbdb085ef7c252a326fd8cdcac0aa3b1333d8811f131bdcc701002e1be7ed4f"}, - {file = "pytest_mock-3.10.0-py3-none-any.whl", hash = "sha256:f4c973eeae0282963eb293eb173ce91b091a79c1334455acfac9ddee8a1c784b"}, -] - -[package.dependencies] -pytest = ">=5.0" - -[package.extras] -dev = ["pre-commit", "pytest-asyncio", "tox"] - -[[package]] -name = "python-dotenv" -version = "1.0.0" -description = "Read key-value pairs from a .env file and set them as environment variables" -optional = false -python-versions = ">=3.8" -files = [ - {file = "python-dotenv-1.0.0.tar.gz", hash = "sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba"}, - {file = "python_dotenv-1.0.0-py3-none-any.whl", hash = "sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a"}, -] - -[package.extras] -cli = ["click (>=5.0)"] - -[[package]] -name = "pytz" -version = "2023.3" -description = "World timezone definitions, modern and historical" -optional = false -python-versions = "*" -files = [ - {file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb"}, - {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, -] - -[[package]] -name = "pyyaml" -version = "6.0" -description = "YAML parser and emitter for Python" -optional = false -python-versions = ">=3.6" -files = [ - {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, - {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, - {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, - {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, - {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, - {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, - {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, - {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, - {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, - {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, - {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, - {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, - {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, - {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, - {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, - {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, - {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, - {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, - {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, - {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, - {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, - {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, - {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, - {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, - {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, - {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, -] - -[[package]] -name = "requests" -version = "2.28.2" -description = "Python HTTP for Humans." -optional = false -python-versions = ">=3.7, <4" -files = [ - {file = "requests-2.28.2-py3-none-any.whl", hash = "sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa"}, - {file = "requests-2.28.2.tar.gz", hash = "sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf"}, -] - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<4" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<1.27" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "ruff" -version = "0.0.280" -description = "An extremely fast Python linter, written in Rust." -optional = false -python-versions = ">=3.7" -files = [ - {file = "ruff-0.0.280-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:48ed5aca381050a4e2f6d232db912d2e4e98e61648b513c350990c351125aaec"}, - {file = "ruff-0.0.280-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:ef6ee3e429fd29d6a5ceed295809e376e6ece5b0f13c7e703efaf3d3bcb30b96"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d878370f7e9463ac40c253724229314ff6ebe4508cdb96cb536e1af4d5a9cd4f"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:83e8f372fa5627eeda5b83b5a9632d2f9c88fc6d78cead7e2a1f6fb05728d137"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7008fc6ca1df18b21fa98bdcfc711dad5f94d0fc3c11791f65e460c48ef27c82"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:fe7118c1eae3fda17ceb409629c7f3b5a22dffa7caf1f6796776936dca1fe653"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:37359cd67d2af8e09110a546507c302cbea11c66a52d2a9b6d841d465f9962d4"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd58af46b0221efb95966f1f0f7576df711cb53e50d2fdb0e83c2f33360116a4"}, - {file = "ruff-0.0.280-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e7c15828d09f90e97bea8feefcd2907e8c8ce3a1f959c99f9b4b3469679f33c"}, - {file = "ruff-0.0.280-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:2dae8f2d9c44c5c49af01733c2f7956f808db682a4193180dedb29dd718d7bbe"}, - {file = "ruff-0.0.280-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5f972567163a20fb8c2d6afc60c2ea5ef8b68d69505760a8bd0377de8984b4f6"}, - {file = "ruff-0.0.280-py3-none-musllinux_1_2_i686.whl", hash = "sha256:8ffa7347ad11643f29de100977c055e47c988cd6d9f5f5ff83027600b11b9189"}, - {file = "ruff-0.0.280-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:7a37dab70114671d273f203268f6c3366c035fe0c8056614069e90a65e614bfc"}, - {file = "ruff-0.0.280-py3-none-win32.whl", hash = "sha256:7784e3606352fcfb193f3cd22b2e2117c444cb879ef6609ec69deabd662b0763"}, - {file = "ruff-0.0.280-py3-none-win_amd64.whl", hash = "sha256:4a7d52457b5dfcd3ab24b0b38eefaead8e2dca62b4fbf10de4cd0938cf20ce30"}, - {file = "ruff-0.0.280-py3-none-win_arm64.whl", hash = "sha256:b7de5b8689575918e130e4384ed9f539ce91d067c0a332aedef6ca7188adac2d"}, - {file = "ruff-0.0.280.tar.gz", hash = "sha256:581c43e4ac5e5a7117ad7da2120d960a4a99e68ec4021ec3cd47fe1cf78f8380"}, -] - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - -[[package]] -name = "urllib3" -version = "1.26.16" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" -files = [ - {file = "urllib3-1.26.16-py2.py3-none-any.whl", hash = "sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f"}, - {file = "urllib3-1.26.16.tar.gz", hash = "sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14"}, -] - -[package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] - -[[package]] -name = "werkzeug" -version = "2.3.6" -description = "The comprehensive WSGI web application library." -optional = false -python-versions = ">=3.8" -files = [ - {file = "Werkzeug-2.3.6-py3-none-any.whl", hash = "sha256:935539fa1413afbb9195b24880778422ed620c0fc09670945185cce4d91a8890"}, - {file = "Werkzeug-2.3.6.tar.gz", hash = "sha256:98c774df2f91b05550078891dee5f0eb0cb797a522c757a2452b9cee5b202330"}, -] - -[package.dependencies] -MarkupSafe = ">=2.1.1" - -[package.extras] -watchdog = ["watchdog (>=2.3)"] - -[metadata] -lock-version = "2.0" -python-versions = "3.11.3" -content-hash = "3bfe40adb1dbe2e00555c4406d1de5412ce09bd9b4905be0edd11604073b5e91" diff --git a/api/pyproject.toml b/api/pyproject.toml index 05ef0c18..9b13e3bb 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -1,39 +1,41 @@ -[tool.poetry] -name = "api" +[project] +name = "rkapi" # restknot-api version = "0.7.12" description = "RESTKnot API" -authors = ["Azzam S.A "] -license = "MIT" +authors = [ + { name = "Azzam S.A", email = "azzam@biznetgio.com" }, +] +dependencies = [ + "confluent-kafka==2.0.2", + "environs==9.5.0", + "Flask==2.2.3", + "Werkzeug==2.2.2", + "Flask-Cors==3.0.10", + "Flask-RESTful==0.3.9", + "libknot==3.2.5", + "psycopg2==2.9.5", + "python-dotenv==1.0.0", + "PyYAML==6.0", + "requests==2.28.2", + "gunicorn==20.1.0", +] readme = "README.md" +requires-python = ">= 3.11" -[tool.poetry.dependencies] -python = "3.11.3" -confluent-kafka = "2.0.2" -environs = "9.5.0" -Flask = "2.2.3" -Flask-Cors = "3.0.10" -Flask-RESTful = "0.3.9" -libknot = "3.2.5" -psycopg2 = "2.9.5" -python-dotenv = "1.0.0" -PyYAML = "6.0" -requests = "2.28.2" - -[tool.poetry.group.dev.dependencies] -pytest-mock = "3.10.0" -black = "23.7.0" -ruff = "0.0.280" -isort = "5.12.0" - -[tool.isort] -profile = "black" -known_first_party = "app" +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" -[tool.ruff] -ignore = [ - "E501", +[tool.rye] +managed = true +dev-dependencies = [ + "pytest>=8.3.2", + "pytest-mock>=3.14.0", + "ipdb>=0.13.13", ] -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["src/rkapi"] diff --git a/api/requirements-dev.lock b/api/requirements-dev.lock new file mode 100644 index 00000000..6004192a --- /dev/null +++ b/api/requirements-dev.lock @@ -0,0 +1,114 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false +# universal: false + +-e file:. +aniso8601==9.0.1 + # via flask-restful +asttokens==2.4.1 + # via stack-data +certifi==2024.7.4 + # via requests +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via flask +confluent-kafka==2.0.2 + # via rkapi +decorator==5.1.1 + # via ipdb + # via ipython +environs==9.5.0 + # via rkapi +executing==2.0.1 + # via stack-data +flask==2.2.3 + # via flask-cors + # via flask-restful + # via rkapi +flask-cors==3.0.10 + # via rkapi +flask-restful==0.3.9 + # via rkapi +gunicorn==20.1.0 + # via rkapi +idna==3.7 + # via requests +iniconfig==2.0.0 + # via pytest +ipdb==0.13.13 +ipython==8.26.0 + # via ipdb +itsdangerous==2.2.0 + # via flask +jedi==0.19.1 + # via ipython +jinja2==3.1.4 + # via flask +libknot==3.2.5 + # via rkapi +markupsafe==2.1.5 + # via jinja2 + # via werkzeug +marshmallow==3.21.3 + # via environs +matplotlib-inline==0.1.7 + # via ipython +packaging==24.1 + # via marshmallow + # via pytest +parso==0.8.4 + # via jedi +pexpect==4.9.0 + # via ipython +pluggy==1.5.0 + # via pytest +prompt-toolkit==3.0.47 + # via ipython +psycopg2==2.9.5 + # via rkapi +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.3 + # via stack-data +pygments==2.18.0 + # via ipython +pytest==8.3.2 + # via pytest-mock +pytest-mock==3.14.0 +python-dotenv==1.0.0 + # via environs + # via rkapi +pytz==2024.1 + # via flask-restful +pyyaml==6.0 + # via rkapi +requests==2.28.2 + # via rkapi +setuptools==72.1.0 + # via gunicorn +six==1.16.0 + # via asttokens + # via flask-cors + # via flask-restful +stack-data==0.6.3 + # via ipython +traitlets==5.14.3 + # via ipython + # via matplotlib-inline +typing-extensions==4.12.2 + # via ipython +urllib3==1.26.19 + # via requests +wcwidth==0.2.13 + # via prompt-toolkit +werkzeug==2.2.2 + # via flask + # via rkapi diff --git a/api/requirements.lock b/api/requirements.lock new file mode 100644 index 00000000..ab32943b --- /dev/null +++ b/api/requirements.lock @@ -0,0 +1,70 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false +# generate-hashes: false +# universal: false + +-e file:. +aniso8601==9.0.1 + # via flask-restful +certifi==2024.7.4 + # via requests +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via flask +confluent-kafka==2.0.2 + # via rkapi +environs==9.5.0 + # via rkapi +flask==2.2.3 + # via flask-cors + # via flask-restful + # via rkapi +flask-cors==3.0.10 + # via rkapi +flask-restful==0.3.9 + # via rkapi +gunicorn==20.1.0 + # via rkapi +idna==3.7 + # via requests +itsdangerous==2.2.0 + # via flask +jinja2==3.1.4 + # via flask +libknot==3.2.5 + # via rkapi +markupsafe==2.1.5 + # via jinja2 + # via werkzeug +marshmallow==3.21.3 + # via environs +packaging==24.1 + # via marshmallow +psycopg2==2.9.5 + # via rkapi +python-dotenv==1.0.0 + # via environs + # via rkapi +pytz==2024.1 + # via flask-restful +pyyaml==6.0 + # via rkapi +requests==2.28.2 + # via rkapi +setuptools==72.1.0 + # via gunicorn +six==1.16.0 + # via flask-cors + # via flask-restful +urllib3==1.26.19 + # via requests +werkzeug==2.2.2 + # via flask + # via rkapi diff --git a/api/app/helpers/__init__.py b/api/src/rkapi/__init__.py similarity index 100% rename from api/app/helpers/__init__.py rename to api/src/rkapi/__init__.py diff --git a/api/app/__init__.py b/api/src/rkapi/app/__init__.py similarity index 94% rename from api/app/__init__.py rename to api/src/rkapi/app/__init__.py index 3a50e354..15fbd802 100644 --- a/api/app/__init__.py +++ b/api/src/rkapi/app/__init__.py @@ -4,7 +4,7 @@ from flask import Flask from flask_cors import CORS -from app.controllers import api_blueprint +from rkapi.app.controllers import api_blueprint def create_app(): diff --git a/api/app/configs/__init__.py b/api/src/rkapi/app/configs/__init__.py similarity index 99% rename from api/app/configs/__init__.py rename to api/src/rkapi/app/configs/__init__.py index 81dfc368..d025f92d 100644 --- a/api/app/configs/__init__.py +++ b/api/src/rkapi/app/configs/__init__.py @@ -6,6 +6,7 @@ For local development, use a .env file to set environment variables. """ + from environs import Env env = Env() diff --git a/api/app/controllers/__init__.py b/api/src/rkapi/app/controllers/__init__.py similarity index 100% rename from api/app/controllers/__init__.py rename to api/src/rkapi/app/controllers/__init__.py diff --git a/api/app/controllers/api/__init__.py b/api/src/rkapi/app/controllers/api/__init__.py similarity index 100% rename from api/app/controllers/api/__init__.py rename to api/src/rkapi/app/controllers/api/__init__.py diff --git a/api/app/controllers/api/domain.py b/api/src/rkapi/app/controllers/api/domain.py similarity index 95% rename from api/app/controllers/api/domain.py rename to api/src/rkapi/app/controllers/api/domain.py index be0125bf..4c7d45fe 100644 --- a/api/app/controllers/api/domain.py +++ b/api/src/rkapi/app/controllers/api/domain.py @@ -3,13 +3,13 @@ from flask import current_app, request from flask_restful import Resource, reqparse -from app.helpers import command, helpers, validator -from app.middlewares import auth -from app.models import domain as domain_model -from app.models import model -from app.models import record as record_model -from app.models import zone as zone_model -from app.vendors.rest import response +from rkapi.app.helpers import command, helpers, validator +from rkapi.app.middlewares import auth +from rkapi.app.models import domain as domain_model +from rkapi.app.models import model +from rkapi.app.models import record as record_model +from rkapi.app.models import zone as zone_model +from rkapi.app.vendors.rest import response def insert_zone(zone, user_id): diff --git a/api/app/controllers/api/health.py b/api/src/rkapi/app/controllers/api/health.py similarity index 89% rename from api/app/controllers/api/health.py rename to api/src/rkapi/app/controllers/api/health.py index e49c9fdb..e49deeb2 100644 --- a/api/app/controllers/api/health.py +++ b/api/src/rkapi/app/controllers/api/health.py @@ -1,8 +1,8 @@ from confluent_kafka import KafkaError, KafkaException from flask_restful import Resource -from app.helpers.producer import kafka_admin -from app.vendors.rest import response +from rkapi.app.helpers.producer import kafka_admin +from rkapi.app.vendors.rest import response class HealthCheck(Resource): diff --git a/api/app/controllers/api/meta.py b/api/src/rkapi/app/controllers/api/meta.py similarity index 73% rename from api/app/controllers/api/meta.py rename to api/src/rkapi/app/controllers/api/meta.py index a47f8451..8c10f734 100644 --- a/api/app/controllers/api/meta.py +++ b/api/src/rkapi/app/controllers/api/meta.py @@ -1,13 +1,13 @@ from flask_restful import Resource -from app.helpers import helpers -from app.middlewares import auth -from app.vendors.rest import response +from rkapi.app.helpers import helpers +from rkapi.app.middlewares import auth +from rkapi.app.vendors.rest import response class MetaVersion(Resource): def get(self): - build = helpers.read_version("pyproject.toml", "version") + build = helpers.read_version() data = {"build": build} return response(200, data=data, message="OK") diff --git a/api/app/controllers/api/record.py b/api/src/rkapi/app/controllers/api/record.py similarity index 96% rename from api/app/controllers/api/record.py rename to api/src/rkapi/app/controllers/api/record.py index ff43ccfd..bc3f3904 100644 --- a/api/app/controllers/api/record.py +++ b/api/src/rkapi/app/controllers/api/record.py @@ -1,14 +1,14 @@ from flask import current_app from flask_restful import Resource, reqparse -from app.helpers import command, helpers, rules, validator -from app.middlewares import auth -from app.models import model -from app.models import record as record_model -from app.models import ttl as ttl_model -from app.models import type_ as type_model -from app.models import zone as zone_model -from app.vendors.rest import response +from rkapi.app.helpers import command, helpers, rules, validator +from rkapi.app.middlewares import auth +from rkapi.app.models import model +from rkapi.app.models import record as record_model +from rkapi.app.models import ttl as ttl_model +from rkapi.app.models import type_ as type_model +from rkapi.app.models import zone as zone_model +from rkapi.app.vendors.rest import response def get_serial_resource(zone): diff --git a/api/app/controllers/api/ttl.py b/api/src/rkapi/app/controllers/api/ttl.py similarity index 95% rename from api/app/controllers/api/ttl.py rename to api/src/rkapi/app/controllers/api/ttl.py index bbabbe16..d1b0ae4a 100644 --- a/api/app/controllers/api/ttl.py +++ b/api/src/rkapi/app/controllers/api/ttl.py @@ -1,8 +1,8 @@ from flask_restful import Resource, reqparse -from app.middlewares import auth -from app.models import model -from app.vendors.rest import response +from rkapi.app.middlewares import auth +from rkapi.app.models import model +from rkapi.app.vendors.rest import response class GetTtlData(Resource): diff --git a/api/app/controllers/api/type_.py b/api/src/rkapi/app/controllers/api/type_.py similarity index 94% rename from api/app/controllers/api/type_.py rename to api/src/rkapi/app/controllers/api/type_.py index 92f39207..25d8f814 100644 --- a/api/app/controllers/api/type_.py +++ b/api/src/rkapi/app/controllers/api/type_.py @@ -1,8 +1,8 @@ from flask_restful import Resource, reqparse -from app.middlewares import auth -from app.models import model -from app.vendors.rest import response +from rkapi.app.middlewares import auth +from rkapi.app.models import model +from rkapi.app.vendors.rest import response class GetTypeData(Resource): diff --git a/api/app/controllers/api/user.py b/api/src/rkapi/app/controllers/api/user.py similarity index 95% rename from api/app/controllers/api/user.py rename to api/src/rkapi/app/controllers/api/user.py index 7d0d566c..94932c26 100644 --- a/api/app/controllers/api/user.py +++ b/api/src/rkapi/app/controllers/api/user.py @@ -1,10 +1,10 @@ from flask import current_app, request from flask_restful import Resource, reqparse -from app.helpers import helpers, validator -from app.middlewares import auth -from app.models import model -from app.vendors.rest import response +from rkapi.app.helpers import helpers, validator +from rkapi.app.middlewares import auth +from rkapi.app.models import model +from rkapi.app.vendors.rest import response class GetUserData(Resource): diff --git a/api/app/database.py b/api/src/rkapi/app/database.py similarity index 100% rename from api/app/database.py rename to api/src/rkapi/app/database.py diff --git a/api/app/middlewares/__init__.py b/api/src/rkapi/app/helpers/__init__.py similarity index 100% rename from api/app/middlewares/__init__.py rename to api/src/rkapi/app/helpers/__init__.py diff --git a/api/app/helpers/command.py b/api/src/rkapi/app/helpers/command.py similarity index 98% rename from api/app/helpers/command.py rename to api/src/rkapi/app/helpers/command.py index 90fa8cb5..d3b4a763 100644 --- a/api/app/helpers/command.py +++ b/api/src/rkapi/app/helpers/command.py @@ -1,7 +1,7 @@ import json -from app.helpers import helpers, producer -from app.models import model +from rkapi.app.helpers import helpers, producer +from rkapi.app.models import model def get_other_data(record_id): diff --git a/api/app/helpers/helpers.py b/api/src/rkapi/app/helpers/helpers.py similarity index 79% rename from api/app/helpers/helpers.py rename to api/src/rkapi/app/helpers/helpers.py index 131e06d1..234f31f7 100644 --- a/api/app/helpers/helpers.py +++ b/api/src/rkapi/app/helpers/helpers.py @@ -2,11 +2,12 @@ import os import pathlib from functools import wraps +from flask import current_app import yaml -from app.helpers import producer -from app.vendors.rest import response +from rkapi.app.helpers import producer +from rkapi.app.vendors.rest import response def soa_time_set(): @@ -78,21 +79,25 @@ def decorated_function(*args, **kwargs): return decorated_function -def read_file(other_file_name, filename): - root_dir = pathlib.Path(other_file_name).resolve().parent - path = root_dir.joinpath(filename) +def root_path() -> pathlib.Path: + """Get root path of the app""" + return pathlib.Path(os.path.dirname(current_app.instance_path)) + +def read_file(path) -> str | None: + path = pathlib.Path(path) if path.is_file(): with open(path, "rb") as f: content = f.read().decode("utf-8") return content -def read_version(other_file_name, filename): +def read_version() -> str: """Read the the current version or build of the app""" version = "" - version = read_file(other_file_name, filename) + path = root_path().joinpath("version") + version = read_file(path) if version: version = version.rstrip() @@ -102,21 +107,20 @@ def read_version(other_file_name, filename): return version -def config_file(): +def config_file() -> pathlib.Path: """Return config file path.""" - path = os.environ.get("RESTKNOT_CONFIG_FILE") + path = os.environ.get("RESTKNOT_CONFIG_FILE") # custom path if not path: - current_path = pathlib.Path(__file__) - path = current_path.parents[2].joinpath("config.yml") + path = root_path().joinpath("config.yml") - is_exists = os.path.exists(path) - if is_exists: + path = pathlib.Path(path) + if path.exists(): return path else: raise ValueError(f"Config File Not Found: {path}") -def get_config(): +def get_config() -> str: """Return config file content.""" file_ = config_file() config = yaml.safe_load(open(file_)) diff --git a/api/app/helpers/producer.py b/api/src/rkapi/app/helpers/producer.py similarity index 97% rename from api/app/helpers/producer.py rename to api/src/rkapi/app/helpers/producer.py index a39ed4e6..f64a01a3 100644 --- a/api/app/helpers/producer.py +++ b/api/src/rkapi/app/helpers/producer.py @@ -5,7 +5,7 @@ from confluent_kafka.admin import AdminClient from flask import current_app -from app.helpers import helpers +from rkapi.app.helpers import helpers def kafka_admin(): diff --git a/api/app/helpers/rules.py b/api/src/rkapi/app/helpers/rules.py similarity index 97% rename from api/app/helpers/rules.py rename to api/src/rkapi/app/helpers/rules.py index 89bc2fb6..7efeb5dd 100644 --- a/api/app/helpers/rules.py +++ b/api/src/rkapi/app/helpers/rules.py @@ -12,9 +12,9 @@ # 2. owner CAN'T coexist with the same CNAME owner # -------------------------------------------------------------------- -from app.models import rules as rules_model -from app.models import type_ as type_model -from app.models import zone as zone_model +from rkapi.app.models import rules as rules_model +from rkapi.app.models import type_ as type_model +from rkapi.app.models import zone as zone_model def is_allowed(zone_id, type_id, owner, rdata, ttl_id, record_id=None): diff --git a/api/app/helpers/validator.py b/api/src/rkapi/app/helpers/validator.py similarity index 100% rename from api/app/helpers/validator.py rename to api/src/rkapi/app/helpers/validator.py diff --git a/api/app/models/__init__.py b/api/src/rkapi/app/middlewares/__init__.py similarity index 100% rename from api/app/models/__init__.py rename to api/src/rkapi/app/middlewares/__init__.py diff --git a/api/app/middlewares/auth.py b/api/src/rkapi/app/middlewares/auth.py similarity index 91% rename from api/app/middlewares/auth.py rename to api/src/rkapi/app/middlewares/auth.py index 388924db..c031302e 100644 --- a/api/app/middlewares/auth.py +++ b/api/src/rkapi/app/middlewares/auth.py @@ -3,7 +3,7 @@ from flask import request -from app.vendors.rest import response +from rkapi.app.vendors.rest import response def auth_required(f): diff --git a/api/src/rkapi/app/models/__init__.py b/api/src/rkapi/app/models/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/api/app/models/domain.py b/api/src/rkapi/app/models/domain.py similarity index 83% rename from api/app/models/domain.py rename to api/src/rkapi/app/models/domain.py index a7214d2b..47934f4e 100644 --- a/api/app/models/domain.py +++ b/api/src/rkapi/app/models/domain.py @@ -1,6 +1,6 @@ -from app.helpers import helpers -from app.models import model -from app.models import record as record_model +from rkapi.app.helpers import helpers +from rkapi.app.models import model +from rkapi.app.models import record as record_model def get_other_data(zone): diff --git a/api/app/models/model.py b/api/src/rkapi/app/models/model.py similarity index 98% rename from api/app/models/model.py rename to api/src/rkapi/app/models/model.py index 240efeaf..4acb101f 100644 --- a/api/app/models/model.py +++ b/api/src/rkapi/app/models/model.py @@ -1,7 +1,7 @@ import psycopg2 -from app import database -from app.vendors.prepare import PreparingCursor +from rkapi.app import database +from rkapi.app.vendors.prepare import PreparingCursor def get_db(): diff --git a/api/app/models/record.py b/api/src/rkapi/app/models/record.py similarity index 90% rename from api/app/models/record.py rename to api/src/rkapi/app/models/record.py index 33cb0b96..766b2048 100644 --- a/api/app/models/record.py +++ b/api/src/rkapi/app/models/record.py @@ -1,9 +1,9 @@ from flask import current_app -from app.helpers import helpers -from app.models import model -from app.models import type_ as type_model -from app.models import zone as zone_model +from rkapi.app.helpers import helpers +from rkapi.app.models import model +from rkapi.app.models import type_ as type_model +from rkapi.app.models import zone as zone_model def get_other_data(record): diff --git a/api/app/models/rules.py b/api/src/rkapi/app/models/rules.py similarity index 97% rename from api/app/models/rules.py rename to api/src/rkapi/app/models/rules.py index be10c050..8d7343aa 100644 --- a/api/app/models/rules.py +++ b/api/src/rkapi/app/models/rules.py @@ -1,4 +1,4 @@ -from app.models import model +from rkapi.app.models import model class Rules: diff --git a/api/app/models/ttl.py b/api/src/rkapi/app/models/ttl.py similarity index 91% rename from api/app/models/ttl.py rename to api/src/rkapi/app/models/ttl.py index 8179ada2..1492b75c 100644 --- a/api/app/models/ttl.py +++ b/api/src/rkapi/app/models/ttl.py @@ -1,4 +1,4 @@ -from app.models import model +from rkapi.app.models import model def is_exists(ttl_id): diff --git a/api/app/models/type_.py b/api/src/rkapi/app/models/type_.py similarity index 95% rename from api/app/models/type_.py rename to api/src/rkapi/app/models/type_.py index 3247fc0c..4856dfa3 100644 --- a/api/app/models/type_.py +++ b/api/src/rkapi/app/models/type_.py @@ -1,4 +1,4 @@ -from app.models import model +from rkapi.app.models import model def get_typeid_by_rtype(rtype): diff --git a/api/app/models/zone.py b/api/src/rkapi/app/models/zone.py similarity index 96% rename from api/app/models/zone.py rename to api/src/rkapi/app/models/zone.py index 87a2ab03..a847a2e6 100644 --- a/api/app/models/zone.py +++ b/api/src/rkapi/app/models/zone.py @@ -1,4 +1,4 @@ -from app.models import model +from rkapi.app.models import model def get_zone(zone_id): diff --git a/api/app/vendors/__init__.py b/api/src/rkapi/app/vendors/__init__.py similarity index 100% rename from api/app/vendors/__init__.py rename to api/src/rkapi/app/vendors/__init__.py diff --git a/api/app/vendors/prepare.py b/api/src/rkapi/app/vendors/prepare.py similarity index 100% rename from api/app/vendors/prepare.py rename to api/src/rkapi/app/vendors/prepare.py diff --git a/api/app/vendors/rest.py b/api/src/rkapi/app/vendors/rest.py similarity index 96% rename from api/app/vendors/rest.py rename to api/src/rkapi/app/vendors/rest.py index 0026883e..e3902c4e 100644 --- a/api/app/vendors/rest.py +++ b/api/src/rkapi/app/vendors/rest.py @@ -55,9 +55,9 @@ def response(status_code, message=None, data=None): if status_code in success_status: count = 0 - if type(data) is list: + if isinstance(data, list): count = len(data) - if type(data) is dict: + if isinstance(data, dict): count = 1 status["count"] = count status["data"] = data if data else None diff --git a/api/autoapp.py b/api/src/rkapi/autoapp.py similarity index 70% rename from api/autoapp.py rename to api/src/rkapi/autoapp.py index cfff8c97..7ae3010a 100644 --- a/api/autoapp.py +++ b/api/src/rkapi/autoapp.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- """Create an application instance.""" -from app import create_app + +from rkapi.app import create_app app = create_app() diff --git a/api/tests/functional/conftest.py b/api/tests/functional/conftest.py index b370afad..b689afb7 100644 --- a/api/tests/functional/conftest.py +++ b/api/tests/functional/conftest.py @@ -3,8 +3,8 @@ import pytest from dotenv import load_dotenv -from app import create_app -from app.models import model +from rkapi.app import create_app +from rkapi.app.models import model def clean_users(): diff --git a/api/tests/integration/conftest.py b/api/tests/integration/conftest.py index 6c2f56b5..4b031d8a 100644 --- a/api/tests/integration/conftest.py +++ b/api/tests/integration/conftest.py @@ -3,8 +3,8 @@ import pytest from dotenv import load_dotenv -from app import create_app -from app.models import model +from rkapi.app import create_app +from rkapi.app.models import model def clean_users(): diff --git a/api/tests/integration/test_domain.py b/api/tests/integration/test_domain.py index 945e4aef..84e67edb 100644 --- a/api/tests/integration/test_domain.py +++ b/api/tests/integration/test_domain.py @@ -1,4 +1,4 @@ -import app.helpers.producer +import rkapi.app.helpers.producer class TestDomain: @@ -18,8 +18,8 @@ def test_domain(self, client, mocker): - List the domain - Delete the domain """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -52,5 +52,5 @@ def test_domain(self, client, mocker): # 4: set_config, set_zone, delegate, delegate (creation) # 5: unset_config, unset_zone (SOA, NS, NS, CNAME) - assert app.helpers.producer.send.call_count == 9 + assert rkapi.app.helpers.producer.send.call_count == 9 assert delete_domain_data.status_code == 204 diff --git a/api/tests/integration/test_messages.py b/api/tests/integration/test_messages.py index 526b5bf1..b555fa18 100644 --- a/api/tests/integration/test_messages.py +++ b/api/tests/integration/test_messages.py @@ -1,4 +1,4 @@ -import app.helpers.producer +import rkapi.app.helpers.producer import tests.fixtures.messages as message_fx @@ -15,8 +15,8 @@ def test_messages(self, client, monkeypatch, mocker): - Create a domain (with default SOA,NS,CNAME created) - Assert the sent command """ - mocker.patch("app.helpers.producer.kafka_producer") - monkeypatch.setattr(app.helpers.producer, "send", self.fake_send) + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + monkeypatch.setattr(rkapi.app.helpers.producer, "send", self.fake_send) headers = {"X-Api-Key": "123"} # create user diff --git a/api/tests/integration/test_record.py b/api/tests/integration/test_record.py index 99774baa..b4b736e4 100644 --- a/api/tests/integration/test_record.py +++ b/api/tests/integration/test_record.py @@ -1,8 +1,8 @@ import datetime -import app.helpers.helpers -from app.controllers.api import record as record_api -from app.helpers import helpers +import rkapi.app.helpers.helpers +from rkapi.app.controllers.api import record as record_api +from rkapi.app.helpers import helpers class TestRecord: @@ -27,8 +27,8 @@ def test_add_record(self, client, mocker): - Add a record - Query the db to assure it's created """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -75,8 +75,8 @@ def test_edit_record(self, client, mocker): - Edit a record - Query the db to assure it's edited """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -125,8 +125,8 @@ def test_edit_record_no_ttl_change(self, client, mocker): - Create a domain (with default SOA,NS,CNAME created) - Edit a record with the same TTL """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -168,8 +168,8 @@ def test_edit_record_with_ttl_change(self, client, mocker): - Edit a record with the different TTL - Query the db to assure it's edited """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -220,8 +220,8 @@ def test_delete_record(self, client, mocker): - Delete one of the record - Query the db to assure it's deleted """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -260,8 +260,8 @@ def test_edit_record_no_ttl_change_MX(self, client, mocker): - Add MX record - Edit a record with the same TTL """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -310,8 +310,8 @@ def test_edit_record_with_ttl_change_MX(self, client, mocker): - Edit a record with the different TTL - Query the db to assure it's edited """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -368,8 +368,8 @@ def test_edit_record_respect_zone_limit(self, client, monkeypatch, mocker): - Edit a record with the different TXT value until it reaches a limit - Edit a record with tomorrows date """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -430,7 +430,9 @@ def fake_soa_time_set(): tomorrow_date = datetime.datetime.now() + datetime.timedelta(days=1) return tomorrow_date.strftime("%Y%m%d") - monkeypatch.setattr(app.helpers.helpers, "soa_time_set", fake_soa_time_set) + monkeypatch.setattr( + rkapi.app.helpers.helpers, "soa_time_set", fake_soa_time_set + ) data = { "zone": "company.com", "owner": "txt1", diff --git a/api/tests/integration/test_rules.py b/api/tests/integration/test_rules.py index fa8cb9be..d2d126f7 100644 --- a/api/tests/integration/test_rules.py +++ b/api/tests/integration/test_rules.py @@ -7,8 +7,8 @@ def test_duplicate_record(self, client, mocker): - # default CNAME owner is `www` - Add CNAME record with `www` as owner -> must be FAIL (duplicate record) """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} @@ -44,8 +44,8 @@ def test_possible_duplicate_record(self, client, mocker): - Add CNAME record with `www1` as owner. - Edit CNAME record with `wwww` as owner and `company.com.` as rdata -> must be FAIL (duplicate record) """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} @@ -93,8 +93,8 @@ def test_unique_host(self, client, mocker): - # default CNAME owner is `www` - Add CNAME record with `www1` as owner -> must be SUCCESS (unique allowed) """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} @@ -130,8 +130,8 @@ def test_not_unique_host(self, client, mocker): - # default CNAME owner is `www` - Add CNAME record with `www` as owner -> must be FAIL (duplicate owner) """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -167,8 +167,8 @@ def test_clash_with_A_owner(self, client, mocker): - Add A record with `host` as owner - Add CNAME record with `host` as owner -> must be FAIL (clash with A owner) """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -213,8 +213,8 @@ def test_duplicate_record(self, client, mocker): - Add A record with `a1` as owner and `1.1.1.1` as rdata - Add A record with `a1` as owner and `1.1.1.1` as rdata -> must be FAIL (duplicate record) """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} @@ -260,8 +260,8 @@ def test_possible_duplicate_record(self, client, mocker): - Add A record with `a1` as owner and `2.2.2.2` as rdata - Edit A record with `a1` as owner and `1.1.1.1` as rdata -> must be FAIL (duplicate record) """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} @@ -318,8 +318,8 @@ def test_not_unique_owner(self, client, mocker): - Add A record with `host` as owner - Add A record with `host` as owner -> must be SUCCESS (same owner allowed) """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user @@ -363,8 +363,8 @@ def test_clash_with_cname_owner(self, client, mocker): - Add CNAME record with `host` as owner - Add A record with `host` as owner -> must be FAIL (clash with CNAME owner) """ - mocker.patch("app.helpers.producer.kafka_producer") - mocker.patch("app.helpers.producer.send") + mocker.patch("rkapi.app.helpers.producer.kafka_producer") + mocker.patch("rkapi.app.helpers.producer.send") headers = {"X-Api-Key": "123"} # create user diff --git a/api/tests/unit/test_helpers.py b/api/tests/unit/test_helpers.py index 8e45c397..5020b186 100644 --- a/api/tests/unit/test_helpers.py +++ b/api/tests/unit/test_helpers.py @@ -1,5 +1,5 @@ -import app -from app.helpers import helpers +import rkapi +from rkapi.app.helpers import helpers def test_replace_serial(): @@ -12,7 +12,7 @@ def test_replace_serial(): def test_increment_serial(monkeypatch): - monkeypatch.setattr(app.helpers.helpers, "soa_time_set", lambda: "20180704") + monkeypatch.setattr(rkapi.app.helpers.helpers, "soa_time_set", lambda: "20180704") incremented_serial1 = helpers.increment_serial("2018070401") incremented_serial2 = helpers.increment_serial("2018070401", "02") diff --git a/api/tests/unit/test_validator.py b/api/tests/unit/test_validator.py index 7b6e1cda..118b3fb0 100644 --- a/api/tests/unit/test_validator.py +++ b/api/tests/unit/test_validator.py @@ -1,6 +1,6 @@ import pytest -from app.helpers import validator +from rkapi.app.helpers import validator def test_valid_ip(): diff --git a/docs/project/contributing.rst b/docs/project/contributing.rst index b558fa7c..e0e3b960 100644 --- a/docs/project/contributing.rst +++ b/docs/project/contributing.rst @@ -119,7 +119,6 @@ To create a release. Run the following steps. - Run linting ``just check``. To check if the codebase adheres to the rules. - Update the CHANGELOG. -- Update version numbers using ``./scripts/bump_version ``. - Create a commit with a message format: `v[0-9]+.[0-9]+.[0-9]+`, and push it to a feature branch (as a pull request). - Wait for a check to pass, merge the specified pull request to the master branch. - Wait for a check to pass, create a release tag from GitHub UI, then copy the appropriate CHANGELOG to the release page. diff --git a/scripts/bump_version b/scripts/bump_version deleted file mode 100755 index 1f1d072a..00000000 --- a/scripts/bump_version +++ /dev/null @@ -1,9 +0,0 @@ -#! /usr/bin/env bash - -# -# Bumps the version number to ${2}. -# Run the script with `./scripts/bump_version ` -# - -sed -i "s/$1/$2/g" api/compose.example.yml -sed -i "s/$1/$2/g" agent/compose.example.yml