%global _empty_manifest_terminate_build 0 Name: python-sqlalchemy-orm Version: 1.2.8 Release: 1 Summary: Data Relation Mapping framework for Python. License: MIT URL: https://gitlab.com/parob/sqlalchemy-orm Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a4/3e/4b759693790147992a39df48ad84127a05883d048b0d682fe20bd5a8dc9e/sqlalchemy-orm-1.2.8.tar.gz BuildArch: noarch %description # SQLAlchemy-ORM ORM framework for Python. Designed for simplicity, based on [SQLAlchemy](https://www.sqlalchemy.org/). [![coverage report](https://gitlab.com/parob/sqlalchemy-orm/badges/master/coverage.svg)](https://gitlab.com/parob/sqlalchemy-orm/commits/master) [![pipeline status](https://gitlab.com/parob/sqlalchemy-orm/badges/master/pipeline.svg)](https://gitlab.com/parob/sqlalchemy-orm/commits/master) Check out the tests directory for more examples. ## Basic Example ``` python from sqlalachemy_orm import Model, Database Base = Model() class Animal(Base): name: str age: int db = Database("sqlite:///:memory:") # use an in-memory SQLite database db.create(Animal) # Create the `Animal` table in the database bea = Animal(name="bea", age=5) session = db.session() session.create(bea) # Create a row in the `Animal` table print(session.query(Animal).filter(Animal.name == "bea").one()) session.commit() # commit the session to the database ``` ``` text $ python example.py >>> Animal(name='bea', age=5) ``` %package -n python3-sqlalchemy-orm Summary: Data Relation Mapping framework for Python. Provides: python-sqlalchemy-orm BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-sqlalchemy-orm # SQLAlchemy-ORM ORM framework for Python. Designed for simplicity, based on [SQLAlchemy](https://www.sqlalchemy.org/). [![coverage report](https://gitlab.com/parob/sqlalchemy-orm/badges/master/coverage.svg)](https://gitlab.com/parob/sqlalchemy-orm/commits/master) [![pipeline status](https://gitlab.com/parob/sqlalchemy-orm/badges/master/pipeline.svg)](https://gitlab.com/parob/sqlalchemy-orm/commits/master) Check out the tests directory for more examples. ## Basic Example ``` python from sqlalachemy_orm import Model, Database Base = Model() class Animal(Base): name: str age: int db = Database("sqlite:///:memory:") # use an in-memory SQLite database db.create(Animal) # Create the `Animal` table in the database bea = Animal(name="bea", age=5) session = db.session() session.create(bea) # Create a row in the `Animal` table print(session.query(Animal).filter(Animal.name == "bea").one()) session.commit() # commit the session to the database ``` ``` text $ python example.py >>> Animal(name='bea', age=5) ``` %package help Summary: Development documents and examples for sqlalchemy-orm Provides: python3-sqlalchemy-orm-doc %description help # SQLAlchemy-ORM ORM framework for Python. Designed for simplicity, based on [SQLAlchemy](https://www.sqlalchemy.org/). [![coverage report](https://gitlab.com/parob/sqlalchemy-orm/badges/master/coverage.svg)](https://gitlab.com/parob/sqlalchemy-orm/commits/master) [![pipeline status](https://gitlab.com/parob/sqlalchemy-orm/badges/master/pipeline.svg)](https://gitlab.com/parob/sqlalchemy-orm/commits/master) Check out the tests directory for more examples. ## Basic Example ``` python from sqlalachemy_orm import Model, Database Base = Model() class Animal(Base): name: str age: int db = Database("sqlite:///:memory:") # use an in-memory SQLite database db.create(Animal) # Create the `Animal` table in the database bea = Animal(name="bea", age=5) session = db.session() session.create(bea) # Create a row in the `Animal` table print(session.query(Animal).filter(Animal.name == "bea").one()) session.commit() # commit the session to the database ``` ``` text $ python example.py >>> Animal(name='bea', age=5) ``` %prep %autosetup -n sqlalchemy-orm-1.2.8 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-sqlalchemy-orm -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 1.2.8-1 - Package Spec generated