diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2020-12-02 21:48:25 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2020-12-02 21:48:25 +0000 |
commit | 274299c72d5c168f22eddece175d40c4d70c0b4d (patch) | |
tree | c0256b6928a287377b29dd377e5a8eb3a6f658a9 /databases/py-aesqlapius | |
parent | 04d2ea8a9e85e1f814fdd914b77a7b61e9eace7a (diff) | |
download | ports-274299c72d5c168f22eddece175d40c4d70c0b4d.tar.gz ports-274299c72d5c168f22eddece175d40c4d70c0b4d.zip |
- 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/
Notes
Notes:
svn path=/head/; revision=556856
Diffstat (limited to 'databases/py-aesqlapius')
-rw-r--r-- | databases/py-aesqlapius/Makefile | 25 | ||||
-rw-r--r-- | databases/py-aesqlapius/distinfo | 3 | ||||
-rw-r--r-- | databases/py-aesqlapius/pkg-descr | 19 |
3 files changed, 47 insertions, 0 deletions
diff --git a/databases/py-aesqlapius/Makefile b/databases/py-aesqlapius/Makefile new file mode 100644 index 000000000000..fee7d9846a14 --- /dev/null +++ b/databases/py-aesqlapius/Makefile @@ -0,0 +1,25 @@ +# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= aesqlapius +PORTVERSION= 0.0.3 +CATEGORIES= databases python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= amdmi3@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> diff --git a/databases/py-aesqlapius/distinfo b/databases/py-aesqlapius/distinfo new file mode 100644 index 000000000000..147aa4d94549 --- /dev/null +++ b/databases/py-aesqlapius/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1606938806 +SHA256 (aesqlapius-0.0.3.tar.gz) = 8fbc97bba50ce0dc534e57b7a2d7cf0c49d6df66aa8c0f84826488572b5cd01a +SIZE (aesqlapius-0.0.3.tar.gz) = 17863 diff --git a/databases/py-aesqlapius/pkg-descr b/databases/py-aesqlapius/pkg-descr new file mode 100644 index 000000000000..a7c84680032a --- /dev/null +++ b/databases/py-aesqlapius/pkg-descr @@ -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/ |