%global _empty_manifest_terminate_build 0 Name: python-execsql Version: 1.115.3 Release: 1 Summary: Runs a SQL script against a PostgreSQL, MS-Access, SQLite, MS-SQL-Server, MySQL, MariaDB, Firebird, or Oracle database, or an ODBC DSN. Provides metacommands to import and export data, copy data between databases, conditionally execute SQL and metacommands, and dynamically alter SQL and metacommands with substitution variables. Data can be exported in 18 different formats, including CSV, TSV, ODS, HTML, JSON, LaTeX, and Markdown tables, and using custom templates. License: GPL URL: https://osdn.net/project/execsql/ Source0: https://mirrors.aliyun.com/pypi/web/packages/0f/eb/65868d3087df1f3a064d447c322c84ad20c385bbb476fecfecaa66405ac2/execsql-1.115.3.tar.gz BuildArch: noarch %description You can use *execsql* to: * Import data from text files or spreadsheets into a database. * Copy data between different databases, even databases using different types of DBMSs. * Export tables and views as formatted text, comma-separated values (CSV), tab-separated values (TSV), OpenDocument spreadsheets, HTML tables, JSON, XML, LaTeX tables, HDF5 tables, unformatted (e.g., binary) data, or several other formats. * Export data to non-tabular formats using several different template processors. * Display a table or view in a GUI dialog, optionally allowing the user to select a data row, enter a data value, or respond to a prompt. * Display a pair of tables or views in a GUI dialog, allowing the user to compare data and find rows with matching or non-matching key values. * Conditionally execute different SQL commands and metacommands based on the DBMS in use, the database in use, data values, user input, and other conditions. * Execute blocks of SQL statements or *execsql* metacommands repeatedly, using any of three different looping methods. * Use simple dynamically-created data entry forms to get user input. * Write status or informational messages to the console or to a file during the processing of a SQL script. Status messages and data exported in text format can be combined in a single text file. Data tables can be exported in a text format that is compatible with Markdown pipe tables, so that script output can be converted into a variety of document formats. * Write more modular and maintainable SQL code by factoring repeated code out into separate scripts, parameterizing the code using substitution variables, and using the INCLUDE or SCRIPT metacommands to merge the modules into a single stream of commands. * Merge multiple elements of a workflow—e.g., data loading, summarization, and reporting—into a single script for better coupling of related steps and more secure maintenance. * Use *execsql* as a CGI script for a web application that needs to run SQL scripts and return database output. Standard SQL provides no features for interacting with external files or with the user, or for controlling the flow of actions to be carried out based either on data or on user input. Some DBMSs provide these features, but capabilities and syntax differ between DBMSs. *execsql* provides these features in a way that operates identically across all supported DBMSs on both Linux and Windows. *execsql* is inherently a command-line program that can operate in a completely non-interactive mode (except for password prompts). Therefore, it is suitable for incorporation into a toolchain controlled by a shell script (on Linux), batch file (on Windows), or other system-level scripting application. When used in this mode, the only interactive elements will be password prompts. However, several metacommands generate interactive prompts and data displays, so *execsql* scripts can be written to provide some user interactivity. In addition, *execsql* automatically maintains a log that documents key information about each run of the program, including the databases that are used, the scripts that are run, and the user's choices in response to interactive prompts. Together, the script and the log provide documentation of all actions carried out that may have altered data. The documentation includes 30 examples showing the use of *execsql*'s metacommands, in both simple and complex scripts. %package -n python3-execsql Summary: Runs a SQL script against a PostgreSQL, MS-Access, SQLite, MS-SQL-Server, MySQL, MariaDB, Firebird, or Oracle database, or an ODBC DSN. Provides metacommands to import and export data, copy data between databases, conditionally execute SQL and metacommands, and dynamically alter SQL and metacommands with substitution variables. Data can be exported in 18 different formats, including CSV, TSV, ODS, HTML, JSON, LaTeX, and Markdown tables, and using custom templates. Provides: python-execsql BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-execsql You can use *execsql* to: * Import data from text files or spreadsheets into a database. * Copy data between different databases, even databases using different types of DBMSs. * Export tables and views as formatted text, comma-separated values (CSV), tab-separated values (TSV), OpenDocument spreadsheets, HTML tables, JSON, XML, LaTeX tables, HDF5 tables, unformatted (e.g., binary) data, or several other formats. * Export data to non-tabular formats using several different template processors. * Display a table or view in a GUI dialog, optionally allowing the user to select a data row, enter a data value, or respond to a prompt. * Display a pair of tables or views in a GUI dialog, allowing the user to compare data and find rows with matching or non-matching key values. * Conditionally execute different SQL commands and metacommands based on the DBMS in use, the database in use, data values, user input, and other conditions. * Execute blocks of SQL statements or *execsql* metacommands repeatedly, using any of three different looping methods. * Use simple dynamically-created data entry forms to get user input. * Write status or informational messages to the console or to a file during the processing of a SQL script. Status messages and data exported in text format can be combined in a single text file. Data tables can be exported in a text format that is compatible with Markdown pipe tables, so that script output can be converted into a variety of document formats. * Write more modular and maintainable SQL code by factoring repeated code out into separate scripts, parameterizing the code using substitution variables, and using the INCLUDE or SCRIPT metacommands to merge the modules into a single stream of commands. * Merge multiple elements of a workflow—e.g., data loading, summarization, and reporting—into a single script for better coupling of related steps and more secure maintenance. * Use *execsql* as a CGI script for a web application that needs to run SQL scripts and return database output. Standard SQL provides no features for interacting with external files or with the user, or for controlling the flow of actions to be carried out based either on data or on user input. Some DBMSs provide these features, but capabilities and syntax differ between DBMSs. *execsql* provides these features in a way that operates identically across all supported DBMSs on both Linux and Windows. *execsql* is inherently a command-line program that can operate in a completely non-interactive mode (except for password prompts). Therefore, it is suitable for incorporation into a toolchain controlled by a shell script (on Linux), batch file (on Windows), or other system-level scripting application. When used in this mode, the only interactive elements will be password prompts. However, several metacommands generate interactive prompts and data displays, so *execsql* scripts can be written to provide some user interactivity. In addition, *execsql* automatically maintains a log that documents key information about each run of the program, including the databases that are used, the scripts that are run, and the user's choices in response to interactive prompts. Together, the script and the log provide documentation of all actions carried out that may have altered data. The documentation includes 30 examples showing the use of *execsql*'s metacommands, in both simple and complex scripts. %package help Summary: Development documents and examples for execsql Provides: python3-execsql-doc %description help You can use *execsql* to: * Import data from text files or spreadsheets into a database. * Copy data between different databases, even databases using different types of DBMSs. * Export tables and views as formatted text, comma-separated values (CSV), tab-separated values (TSV), OpenDocument spreadsheets, HTML tables, JSON, XML, LaTeX tables, HDF5 tables, unformatted (e.g., binary) data, or several other formats. * Export data to non-tabular formats using several different template processors. * Display a table or view in a GUI dialog, optionally allowing the user to select a data row, enter a data value, or respond to a prompt. * Display a pair of tables or views in a GUI dialog, allowing the user to compare data and find rows with matching or non-matching key values. * Conditionally execute different SQL commands and metacommands based on the DBMS in use, the database in use, data values, user input, and other conditions. * Execute blocks of SQL statements or *execsql* metacommands repeatedly, using any of three different looping methods. * Use simple dynamically-created data entry forms to get user input. * Write status or informational messages to the console or to a file during the processing of a SQL script. Status messages and data exported in text format can be combined in a single text file. Data tables can be exported in a text format that is compatible with Markdown pipe tables, so that script output can be converted into a variety of document formats. * Write more modular and maintainable SQL code by factoring repeated code out into separate scripts, parameterizing the code using substitution variables, and using the INCLUDE or SCRIPT metacommands to merge the modules into a single stream of commands. * Merge multiple elements of a workflow—e.g., data loading, summarization, and reporting—into a single script for better coupling of related steps and more secure maintenance. * Use *execsql* as a CGI script for a web application that needs to run SQL scripts and return database output. Standard SQL provides no features for interacting with external files or with the user, or for controlling the flow of actions to be carried out based either on data or on user input. Some DBMSs provide these features, but capabilities and syntax differ between DBMSs. *execsql* provides these features in a way that operates identically across all supported DBMSs on both Linux and Windows. *execsql* is inherently a command-line program that can operate in a completely non-interactive mode (except for password prompts). Therefore, it is suitable for incorporation into a toolchain controlled by a shell script (on Linux), batch file (on Windows), or other system-level scripting application. When used in this mode, the only interactive elements will be password prompts. However, several metacommands generate interactive prompts and data displays, so *execsql* scripts can be written to provide some user interactivity. In addition, *execsql* automatically maintains a log that documents key information about each run of the program, including the databases that are used, the scripts that are run, and the user's choices in response to interactive prompts. Together, the script and the log provide documentation of all actions carried out that may have altered data. The documentation includes 30 examples showing the use of *execsql*'s metacommands, in both simple and complex scripts. %prep %autosetup -n execsql-1.115.3 %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-execsql -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu Jun 08 2023 Python_Bot - 1.115.3-1 - Package Spec generated