- 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/
This commit is contained in:
parent
04d2ea8a9e
commit
274299c72d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=556856
4 changed files with 48 additions and 0 deletions
|
@ -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
|
||||
|
|
25
databases/py-aesqlapius/Makefile
Normal file
25
databases/py-aesqlapius/Makefile
Normal file
|
@ -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>
|
3
databases/py-aesqlapius/distinfo
Normal file
3
databases/py-aesqlapius/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1606938806
|
||||
SHA256 (aesqlapius-0.0.3.tar.gz) = 8fbc97bba50ce0dc534e57b7a2d7cf0c49d6df66aa8c0f84826488572b5cd01a
|
||||
SIZE (aesqlapius-0.0.3.tar.gz) = 17863
|
19
databases/py-aesqlapius/pkg-descr
Normal file
19
databases/py-aesqlapius/pkg-descr
Normal file
|
@ -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/
|
Loading…
Reference in a new issue