From ee9a0de33408e5b9403af80a041931a5701b30e4 Mon Sep 17 00:00:00 2001 From: Daniil Fajnberg Date: Sat, 6 Aug 2022 10:59:55 +0200 Subject: [PATCH] Add license and package level import --- setup.cfg | 1 + src/orm2pydantic/__init__.py | 1 + src/orm2pydantic/sqla.py | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/setup.cfg b/setup.cfg index 0083b4d..ac6121f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,6 +13,7 @@ project_urls = classifiers = Development Status :: 3 - Alpha Intended Audience :: Developers + License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) Operating System :: OS Independent Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3.9 diff --git a/src/orm2pydantic/__init__.py b/src/orm2pydantic/__init__.py index e69de29..a9c8e19 100644 --- a/src/orm2pydantic/__init__.py +++ b/src/orm2pydantic/__init__.py @@ -0,0 +1 @@ +from .sqla import from_sqla diff --git a/src/orm2pydantic/sqla.py b/src/orm2pydantic/sqla.py index ff778f1..a608c92 100644 --- a/src/orm2pydantic/sqla.py +++ b/src/orm2pydantic/sqla.py @@ -1,3 +1,23 @@ +__author__ = "Daniil Fajnberg" +__copyright__ = "Copyright © 2022 Daniil Fajnberg" +__license__ = """GNU LGPLv3.0 + +This file is part of orm2pydantic. + +orm2pydantic is free software: you can redistribute it and/or modify it under the terms of +version 3.0 of the GNU Lesser General Public License as published by the Free Software Foundation. + +orm2pydantic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along with orm2pydantic. +If not, see .""" + +__doc__ = """ +Functions for turning SQLAlchemy objects into corresponding Pydantic objects. +""" + from typing import Container, Type from pydantic import create_model, BaseConfig, BaseModel, Field