svn commit: r556856 - in head/databases: . py-aesqlapius
Dmitry Marakasov
amdmi3 at FreeBSD.org
Wed Dec 2 21:48:27 UTC 2020
Author: amdmi3
Date: Wed Dec 2 21:48:25 2020
New Revision: 556856
URL: https://svnweb.freebsd.org/changeset/ports/556856
Log:
- Add databases/py-aesqlapius
So you don't want to use ORM, and want to organize your SQL queries
in a convenient way. Don't mix them with your python code, don't
write `execute` and `fetchrow`s by hand for each query. With
aesqlapius:
- Store your SQL queries separate from the code, in a dedicated
file or directory hierarchy
- Annotate each query with python-like function definition specifying
input arguments and output types and patterns
aesqlapius builds a class out of this, where you can call your
queries as plain methods. It handles arguments (pass positional
or keyword arguments as you like, default values are also handled) and
output types and patterns (you may specify whether a method returns
iterator, list, dict of rows, or a single row, where row may
be represented as a tuple, list, dict, single value or a custom
type such as a dataclass).
WWW: https://pypi.org/project/aesqlapius/
Added:
head/databases/py-aesqlapius/
head/databases/py-aesqlapius/Makefile (contents, props changed)
head/databases/py-aesqlapius/distinfo (contents, props changed)
head/databases/py-aesqlapius/pkg-descr (contents, props changed)
Modified:
head/databases/Makefile
Modified: head/databases/Makefile
==============================================================================
--- head/databases/Makefile Wed Dec 2 21:22:08 2020 (r556855)
+++ head/databases/Makefile Wed Dec 2 21:48:25 2020 (r556856)
@@ -746,6 +746,7 @@
SUBDIR += py-MySQLdb
SUBDIR += py-PyGreSQL
SUBDIR += py-Pyrseas
+ SUBDIR += py-aesqlapius
SUBDIR += py-agate-sql
SUBDIR += py-aiopg
SUBDIR += py-aioredis
Added: head/databases/py-aesqlapius/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/py-aesqlapius/Makefile Wed Dec 2 21:48:25 2020 (r556856)
@@ -0,0 +1,25 @@
+# Created by: Dmitry Marakasov <amdmi3 at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= aesqlapius
+PORTVERSION= 0.0.3
+CATEGORIES= databases python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= amdmi3 at FreeBSD.org
+COMMENT= Manage SQL queries as a Python API
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
+
+USES= python:3.9+
+USE_PYTHON= autoplist distutils
+NO_ARCH= yes
+
+do-test:
+ @cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs
+
+.include <bsd.port.mk>
Added: head/databases/py-aesqlapius/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/py-aesqlapius/distinfo Wed Dec 2 21:48:25 2020 (r556856)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1606938806
+SHA256 (aesqlapius-0.0.3.tar.gz) = 8fbc97bba50ce0dc534e57b7a2d7cf0c49d6df66aa8c0f84826488572b5cd01a
+SIZE (aesqlapius-0.0.3.tar.gz) = 17863
Added: head/databases/py-aesqlapius/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/py-aesqlapius/pkg-descr Wed Dec 2 21:48:25 2020 (r556856)
@@ -0,0 +1,19 @@
+So you don't want to use ORM, and want to organize your SQL queries
+in a convenient way. Don't mix them with your python code, don't
+write `execute` and `fetchrow`s by hand for each query. With
+aesqlapius:
+
+- Store your SQL queries separate from the code, in a dedicated
+ file or directory hierarchy
+- Annotate each query with python-like function definition specifying
+ input arguments and output types and patterns
+
+aesqlapius builds a class out of this, where you can call your
+queries as plain methods. It handles arguments (pass positional
+or keyword arguments as you like, default values are also handled) and
+output types and patterns (you may specify whether a method returns
+iterator, list, dict of rows, or a single row, where row may
+be represented as a tuple, list, dict, single value or a custom
+type such as a dataclass).
+
+WWW: https://pypi.org/project/aesqlapius/
More information about the svn-ports-head
mailing list