diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2d6c323..10477ef 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -42,4 +42,3 @@ jobs: echo "show user name:" echo ${{ secrets.TWINE_USERNAME }} twine upload -u ${{ secrets.TWINE_USERNAME }} -p ${{ secrets.TWINE_PASSWORD }} dist/* - diff --git a/databend_py/__init__.py b/databend_py/__init__.py index 54d7a2b..a595ecc 100644 --- a/databend_py/__init__.py +++ b/databend_py/__init__.py @@ -2,4 +2,31 @@ from .connection import Connection from .datetypes import DatabendDataType -__all__ = ['Client', 'Connection', 'DatabendDataType'] +from databend_driver import ( + AsyncDatabendClient, + AsyncDatabendConnection, + BlockingDatabendClient, + BlockingDatabendConnection, + Row, + RowIterator, + Field, + Schema, + ServerStats, + ConnectionInfo, +) + +__all__ = [ + "Client", + "Connection", + "DatabendDataType", + "AsyncDatabendClient", + "AsyncDatabendConnection", + "BlockingDatabendClient", + "BlockingDatabendConnection", + "Row", + "RowIterator", + "Field", + "Schema", + "ServerStats", + "ConnectionInfo", +] diff --git a/setup.py b/setup.py index d87502a..8823cea 100644 --- a/setup.py +++ b/setup.py @@ -7,67 +7,58 @@ def read_version(): - version_py = os.path.join(here, 'databend_py', 'VERSION') - with open(version_py, encoding='utf-8') as f: + version_py = os.path.join(here, "databend_py", "VERSION") + with open(version_py, encoding="utf-8") as f: first_line = f.readline() return first_line.strip() -github_url = 'https://github.com/databendcloud/databend-py' +github_url = "https://github.com/databendcloud/databend-py" -with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: +with open(os.path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() setup( - name='databend-py', + name="databend-py", version=read_version(), include_package_data=True, - - description='Python driver with native interface for Databend', + description="Python driver with native interface for Databend", long_description=long_description, - url=github_url, - packages=find_packages('.', exclude=['tests*']), - python_requires='>=3.4, <4', + packages=find_packages(".", exclude=["tests*"]), + python_requires=">=3.4, <4", install_requires=[ - 'pytz', - 'mysql.connector', - 'environs', - 'requests', + "pytz", + "mysql.connector", + "environs", + "requests", + "databend-driver>=0.11.3", ], - - author='Databend Cloud Team', - author_email='hantmac@outlook.com', - - license='Apache License', + author="Databend Cloud Team", + author_email="hantmac@outlook.com", + license="Apache License", classifiers=[ - 'Development Status :: 4 - Beta', - - 'Environment :: Console', - - 'Intended Audience :: Developers', - 'Intended Audience :: Information Technology', - - 'Operating System :: OS Independent', - - 'Programming Language :: SQL', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: Implementation :: PyPy', - - 'Topic :: Database', - 'Topic :: Software Development', - 'Topic :: Software Development :: Libraries', - 'Topic :: Software Development :: Libraries :: Application Frameworks', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: Scientific/Engineering :: Information Analysis' + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Operating System :: OS Independent", + "Programming Language :: SQL", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Database", + "Topic :: Software Development", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Application Frameworks", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Scientific/Engineering :: Information Analysis", ], - - keywords='databend db database cloud analytics', - test_suite='pytest' + keywords="databend db database cloud analytics", + test_suite="pytest", )