From nobody Sat Jan 01 05:09:11 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6EC0A192E16D; Sat, 1 Jan 2022 05:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JQqmm0zyMz4XRH; Sat, 1 Jan 2022 05:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8A4D18CE6; Sat, 1 Jan 2022 05:09:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20159BQi016462; Sat, 1 Jan 2022 05:09:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20159BmC016461; Sat, 1 Jan 2022 05:09:11 GMT (envelope-from git) Date: Sat, 1 Jan 2022 05:09:11 GMT Message-Id: <202201010509.20159BmC016461@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Hiroki Tagato Subject: git: 583287b7d536 - main - databases/py-ormar: add port: Simple async ORM with fastapi in mind and pydantic validation List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tagattie X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 583287b7d536cc849d468332777339542a750f0a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641013752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9J8we5IJ5TEVm9IJhVbfrLhdhG9H2IcoEkwJ6OBW3tc=; b=JdWqAhY9QFzAB7KI+/pCbBZDJALvhop5Z/iVQduZE4t0O2jzbnGRZZbK/c0dTtKu7oQMwz dN7SEK9krd5byHm8cliyJiHvPDj04fkdvrl07JaX6L12iOiXkL8VTZwagaFNy8y4XSUm7W 9ZjfdjSAePYlGow66cGHmmkN6M7L21FVng0vgWCzCTTEA9nw6HtW3qdQoJNFt7wThBhdhz c5Z3nyU8LT+JUmhhN7jeZX1NwSOuydWrc3N//g0cnNmIFcm9Tx4EgkRdxnge21C+IRW2C5 I6YfgRM20q7Hc9roFsuIhjvXHsmPqTmWiOuWB9CjHWuExuoUPBW1HvsVHXehtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641013752; a=rsa-sha256; cv=none; b=JrbR1O7fCi8pToEbbkq7wlXOXXm3hdCFQtWNPKSFUr1HRuSppzLY24cAb8I7tQ+8Hk5Shk IQRm5FBOqfrjl2M9gKa2WIiG1/Vcyn3bLqlyDPs+j4ZXEwIMYdpNNAQQhccj2VC3slk25o KSzU2JuV666qjI4UxzdLD+/pNo60ODOv7aONcMecoR3QwCJpblRis3Bx0XuMmLkDkruIH7 DvRFJWlrD4QBRsaPzv3b+lxcR9g6xenxxAxANP6ksLNbYaSrK4r22fP209ApU8k6BuwgaH LVx84RVf+KM9oNphXdoUxMn9LllKKOX+sMHUrtAKVBZ2n8AP6wVdsiYnUTq/HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tagattie: URL: https://cgit.FreeBSD.org/ports/commit/?id=583287b7d536cc849d468332777339542a750f0a commit 583287b7d536cc849d468332777339542a750f0a Author: Goran Mekić AuthorDate: 2022-01-01 05:06:14 +0000 Commit: Hiroki Tagato CommitDate: 2022-01-01 05:08:51 +0000 databases/py-ormar: add port: Simple async ORM with fastapi in mind and pydantic validation The ormar package is an async mini ORM for Python, with support for Postgres, MySQL, and SQLite. The main benefit of using ormar are: * getting an async ORM that can be used with async frameworks (fastapi, starlette etc.) * getting just one model to maintain - you don't have to maintain pydantic and other orm model (sqlalchemy, peewee, gino etc.) The goal was to create a simple ORM that can be used directly (as request and response models) with fastapi that bases it's data validation on pydantic. WWW: https://github.com/collerek/ormar PR: 257370 Reported by: Goran Mekić (new maintainer) Reviewed by: koobs --- databases/Makefile | 1 + databases/py-ormar/Makefile | 50 ++++++++++++++++++++++++++++++++++++++++++++ databases/py-ormar/distinfo | 3 +++ databases/py-ormar/pkg-descr | 13 ++++++++++++ 4 files changed, 67 insertions(+) diff --git a/databases/Makefile b/databases/Makefile index 2952b5e2e088..4b136c577340 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -796,6 +796,7 @@ SUBDIR += py-mycli SUBDIR += py-mysql-connector-python SUBDIR += py-mysqlclient + SUBDIR += py-ormar SUBDIR += py-partd SUBDIR += py-peewee SUBDIR += py-peewee_migrate diff --git a/databases/py-ormar/Makefile b/databases/py-ormar/Makefile new file mode 100644 index 000000000000..62d78750f417 --- /dev/null +++ b/databases/py-ormar/Makefile @@ -0,0 +1,50 @@ +PORTNAME= ormar +DISTVERSION= 0.10.23 +CATEGORIES= databases python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= meka@tilda.center +COMMENT= Simple async ORM with fastapi in mind and pydantic validation + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}databases>=0.3.2,<0.5.4:databases/py-databases@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pydantic>=1.6.1,<1.8.3:devel/py-pydantic@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlalchemy14>=1.4.0,<1.4.28:databases/py-sqlalchemy14@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.7:devel/py-typing-extensions@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}fastapi>=0:www/py-fastapi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=0:devel/py-pytest-asyncio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= autoplist concurrent distutils + +TEST_ENV= PYTHONPATH=${WRKSRC}/src + +NO_ARCH= yes + +OPTIONS_DEFINE= CRYPTO +OPTIONS_GROUP= DATABASES +OPTIONS_GROUP_DATABASES= MYSQL PGSQL SQLITE +OPTIONS_DEFAULT= SQLITE +DATABASES_DESC= Database Support + +CRYPTO_DESC= Support for password encryption + +CRYPTO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR} +SQLITE_USES= sqlite +SQLITE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiosqlite>0:databases/py-aiosqlite@${PY_FLAVOR} +MYSQL_USES= mysql +MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiomysql>0:databases/py-aiomysql@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pymysql>0:databases/py-pymysql@${PY_FLAVOR} +PGSQL_USES= pgsql +PGSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}asyncpg>0:databases/py-asyncpg@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}psycopg2>0:databases/py-psycopg2@${PY_FLAVOR} + +# Tests require newer pytest +# do-test: + # cd ${WRKSRC} && ${SETENV} ${TEST_ENV} TEST_DATABASE_URLS="sqlite:///testsuite" ${PYTHON_CMD} -m pytest -v -rs -o addopts= + +.include diff --git a/databases/py-ormar/distinfo b/databases/py-ormar/distinfo new file mode 100644 index 000000000000..512cc08cd09d --- /dev/null +++ b/databases/py-ormar/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1640942160 +SHA256 (ormar-0.10.23.tar.gz) = bd8f86389db87f3844b25d7e1e47e18fa52b113877dcbad180f67d5a9597c9d3 +SIZE (ormar-0.10.23.tar.gz) = 125905 diff --git a/databases/py-ormar/pkg-descr b/databases/py-ormar/pkg-descr new file mode 100644 index 000000000000..38f2ef1d47a9 --- /dev/null +++ b/databases/py-ormar/pkg-descr @@ -0,0 +1,13 @@ +The ormar package is an async mini ORM for Python, with support for Postgres, +MySQL, and SQLite. + +The main benefit of using ormar are: +* getting an async ORM that can be used with async frameworks (fastapi, + starlette etc.) +* getting just one model to maintain - you don't have to maintain pydantic and + other orm model (sqlalchemy, peewee, gino etc.) + +The goal was to create a simple ORM that can be used directly (as request and +response models) with fastapi that bases it's data validation on pydantic. + +WWW: https://github.com/collerek/ormar