diff options
author | Hiroki Tagato <tagattie@FreeBSD.org> | 2025-08-29 18:05:28 +0900 |
---|---|---|
committer | Hiroki Tagato <tagattie@FreeBSD.org> | 2025-08-29 18:06:49 +0900 |
commit | 70dd655ae95515856fc40a63df843bb412bd451d (patch) | |
tree | 179c1ca0dd43f303d83f32e3e487ae67cfdc1e77 | |
parent | devel/R-cran-later: Update to 1.4.4 (diff) |
databases/py-sqlmodel: add port: SQL databases in Python, designed for simplicity, compatibility, and robustness
SQLModel is a library for interacting with SQL databases from Python
code, with Python objects. It is designed to be intuitive, easy to
use, highly compatible, and robust.
SQLModel is based on Python type annotations, and powered by Pydantic
and SQLAlchemy.
The key features are:
- Intuitive to write: Great editor support. Completion
everywhere. Less time debugging. Designed to be easy to use and
learn. Less time reading docs.
- Easy to use: It has sensible defaults and does a lot of work
underneath to simplify the code you write.
- Compatible: It is designed to be compatible with FastAPI, Pydantic,
and SQLAlchemy.
- Extensible: You have all the power of SQLAlchemy and Pydantic
underneath.
- Short: Minimize code duplication. A single type annotation does a
lot of work. No need to duplicate models in SQLAlchemy and Pydantic.
WWW: https://sqlmodel.tiangolo.com/
-rw-r--r-- | databases/Makefile | 1 | ||||
-rw-r--r-- | databases/py-sqlmodel/Makefile | 46 | ||||
-rw-r--r-- | databases/py-sqlmodel/distinfo | 3 | ||||
-rw-r--r-- | databases/py-sqlmodel/pkg-descr | 19 |
4 files changed, 69 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile index 4c7bc1198675..ef5d3508bdae 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -861,6 +861,7 @@ SUBDIR += py-sqlite-migrate SUBDIR += py-sqlite-utils SUBDIR += py-sqlite3 + SUBDIR += py-sqlmodel SUBDIR += py-sqlobject SUBDIR += py-sqloxide SUBDIR += py-sqlparse diff --git a/databases/py-sqlmodel/Makefile b/databases/py-sqlmodel/Makefile new file mode 100644 index 000000000000..0bf8f21d1d33 --- /dev/null +++ b/databases/py-sqlmodel/Makefile @@ -0,0 +1,46 @@ +PORTNAME= sqlmodel +DISTVERSION= 0.0.24 +CATEGORIES= databases python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= tagattie@FreeBSD.org +COMMENT= SQL databases in Python, designed for simplicity, compatibility, and robustness +WWW= https://sqlmodel.tiangolo.com/ + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pdm-backend>0:devel/py-pdm-backend@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlalchemy20>=2.0.14<2.1.0:databases/py-sqlalchemy20@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pydantic2>=1.10.13<3.0.0:devel/py-pydantic2@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}coverage>=6.2<8.0:devel/py-coverage@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mypy>=1.4.1:devel/py-mypy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ruff>=0.9.6:devel/py-ruff@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}fastapi>=0.103.2:www/py-fastapi@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}httpx>=0.24.1:www/py-httpx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dirty-equals>=0.9.0:devel/py-dirty-equals@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.1.4:devel/py-Jinja2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.12.2:devel/py-typing-extensions@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}black>0:devel/py-black@${PY_FLAVOR} + +USES= python shebangfix +USE_PYTHON= autoplist pep517 pytest + +SHEBANG_FILES= scripts/test.sh +bash_CMD= ${SH} + +NO_ARCH= yes + +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} + +do-test: + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ./scripts/test.sh + +.include <bsd.port.mk> diff --git a/databases/py-sqlmodel/distinfo b/databases/py-sqlmodel/distinfo new file mode 100644 index 000000000000..606cd3026abd --- /dev/null +++ b/databases/py-sqlmodel/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1756455526 +SHA256 (sqlmodel-0.0.24.tar.gz) = cc5c7613c1a5533c9c7867e1aab2fd489a76c9e8a061984da11b4e613c182423 +SIZE (sqlmodel-0.0.24.tar.gz) = 116780 diff --git a/databases/py-sqlmodel/pkg-descr b/databases/py-sqlmodel/pkg-descr new file mode 100644 index 000000000000..ea96d894e9fd --- /dev/null +++ b/databases/py-sqlmodel/pkg-descr @@ -0,0 +1,19 @@ +SQLModel is a library for interacting with SQL databases from Python +code, with Python objects. It is designed to be intuitive, easy to +use, highly compatible, and robust. + +SQLModel is based on Python type annotations, and powered by Pydantic +and SQLAlchemy. + +The key features are: +- Intuitive to write: Great editor support. Completion + everywhere. Less time debugging. Designed to be easy to use and + learn. Less time reading docs. +- Easy to use: It has sensible defaults and does a lot of work + underneath to simplify the code you write. +- Compatible: It is designed to be compatible with FastAPI, Pydantic, + and SQLAlchemy. +- Extensible: You have all the power of SQLAlchemy and Pydantic + underneath. +- Short: Minimize code duplication. A single type annotation does a + lot of work. No need to duplicate models in SQLAlchemy and Pydantic. |