真的。Python SDK,

aitoai的Python项目详细描述


Info:Check Github for the latest source code and documentation for more information.
Maintainer:Aito <admin@aito.ai>

PyPIPyPI version

关于

aitopythonsdk是一个开源库,可以帮助您集成Python应用程序 使Aito更快更有效。在

SDK还包括Aito Command Line Interface (CLI),使您能够与Aito交互 在命令行shell中使用命令,例如:从文件推断表模式或将文件上载到Aito。在

支持/反馈

有关的问题、问题或反馈,请加入我们的support channels。在

安装

Aito Python SDK可以与pip一起安装

$ pip install aitoai

有关更多信息,请查看我们的installation guide

文件

您需要安装sphinx来生成文档。 文档可以通过以下方式生成:

$cd docs
$ make clean html

生成的文档可以在docs/build/html/*目录中找到。在

测试

安装所需的软件包:

$ pip install -r requirements/build.txt
$ pip install -r requirements/test.txt

您可以使用我们的测试cli来运行测试:

$ python -m tests -h

注意

有些测试需要设置一些环境变量。使用testclilist命令来发现和显示测试套件和用例

有多个测试套件:

  1. CLI套件:
$ python -m tests -v suite cli

Note

You need an Aito instance and set up the credentials with ^{tt2}$ and ^{tt3}$ to test some functions.

  1. SDK套件:
$ python -m tests -v suite sdk

Note

You need an Aito instance and set up the credentials with ^{tt2}$ and ^{tt3}$ to test some functions

  1. SQL函数测试:
  • Test against Postgres:

    $ python -m tests -v case sql_functions.test_connection.TestPostgresConnection
    $ python -m tests -v case sql_functions.test_cli_sql_functions.TestPostgresFunctions
    
  • Test against MySQL:

    $ python -m tests -v case sql_functions.test_connection.TestMySQLConnection
    $ python -m tests -v case sql_functions.test_cli_sql_functions.TestMySQLFunctions
    

Note

To test the SQL functions, you need to install pyodbc and the specific database ODBC driver.

  1. 生成和测试生成包:
  • To build the package:

    $ pip install -r requirements/deploy.txt
    $ ./scripts/deploy test.pypi --no-publish
    
  • The built wheel should be at ^{tt6}$. To install:

    $ pip install dist/aitoai-<version>.whl
    
  • To test the built package, create an environment variable ^{tt7}$ and run the above tests

  1. 测试文档:
  • To test the inline documentation:

    $ python -m tests -v suite inline_docs
    
  • To test the code blocks in rst files:

    $cd docs
    $ make doctest
    

贡献

  • 做出改变
  • 将unittest添加到适当的测试套件中(例如:Aito Schema的测试用例:tests/sdk/test-Aito_架构.py或在tests文件夹中创建新的测试套件
  • 添加文档:
    • 内联文档(如适用)
    • 更新docs/source文件夹中的.rst文件(例如:向docs/source添加一个新的客户端函数/软件开发工具包.rst)在
  • 如果适用,添加内联文档测试(例如:Aito客户机的内联文档测试:测试/内联文档/测试客户机内联测试_文档.py

注意

请记住在中更新autodoc_mock_导入配置文件如有其他要求,提交

  • 检查电路并发布PR
  • 审查请购单后,使用适当的版本部署到生产(脚本/部署)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Android:在ListView上使用setOnItemClickListener   使用Netbeans 7.0连接到SQL Server的java正在挂起   java Spring3依赖项注入不适用于mule   java Flink SQL结果字段与LocalDateTime上请求的类型错误不匹配   java找不到文件的结尾   考虑到NamingStrategy,java有没有办法将字符串转换为JsonNode?   使用Netbeans/ant部署java(命令行)应用程序   java如何修复Spring引导多部分上载中的“所需请求部分不存在”   java在应用程序启动时通过引用获取映射未知目标实体属性异常   java形状旋转问题Java2d   Weblogic服务器上的java ExecuteAndWaitInterceptor问题   JavaSpringBoot:project将图像保存在错误的路径中,并且在使用IDEIntellji打开时不显示图像   类向java接口添加方法   Swing组件上的Java 7泛型   sql server如何从java获取用户名。sql。联系   java如何检查该行是否与正则表达式(regex)冲突?   java如何在spring引导安全中为计数失败登录设置验证登录为false   图像如何在Java中使PNG的白色透明?