`Pytsql` allows to run mssql sripts, typically run via GUIs, via CLI.
Project description
pytsql
pytsql
allows to run mssql scripts, typically run from GUIs, from Python.
This, in turn, eases concurrent, scheduled and chained execution of scripts in a workflow. Put differently, it enables automated execution of Microsoft sql server scripts.
Moreover, pytsql
supports parametrization of scripts, akin to templating.
Please have a look at our documentation if you're curious about more details.
Installation
To install, execute:
pip install pytsql
or in a conda
environment
mamba install pytsql
Be aware that depending on your platform, you'will need specific drivers (Windows, Linux, macOS).
Usage
pytsql
is tailored to run with MSSQL. Other sql dialects are not supported.
The main function of interest is execute
. It requires a sqlalchemy
Engine
object as well as the path to the sql script of interest. A typical use case might look as follows:
import pytsql
from sqlalchemy import sa
db_connection_string = "connection_to_my_database"
engine = sa.get_engine(db_connection_string)
pytsql.execute("my_sql_script.sql", engine)
Please also have a look at our documentation sections on usage and development.
Credits
Grammar is based on antlr4/grammars-v4.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pytsql-1.2.3-pp310-pypy310_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 719fee59b9d1941d5ea5fb315fbb109f58ea703a066825f5d893587f1582107e |
|
MD5 | ebd8e84a9c5c50cb9052e6215d30579e |
|
BLAKE2b-256 | 21a567f1e4c6ab1f69599b95846a3624f40b08e14bbd0c55375bdd1f35f919e7 |
Hashes for pytsql-1.2.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0243fb92e6ce32f281892248d76884158a560a998f47a20afb81411da81935e2 |
|
MD5 | 3b6a3c56a4adcbdbc67fb8cc49032ec3 |
|
BLAKE2b-256 | ec70b758e6ebe07d522c56e20fff15475ee10700838055f9798f5765b45a7391 |
Hashes for pytsql-1.2.3-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee0e48d3ec8223ddcc3322a611942aa7bc4bec1abed8800cb66f79b2b85690e3 |
|
MD5 | d0ea86306a50c0fffc26b20bf5ff24f9 |
|
BLAKE2b-256 | 971b29539c6a5aa69fe7e61e01e9854795ea2ecbb048301154b28a36584c84e0 |
Hashes for pytsql-1.2.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34a8e82a2f210ff6dbfb0aadadb8dd2c8fa2ba3edc38c7945e1164be3dc7f1b3 |
|
MD5 | 50361e7ccda800f71ad7bac2f339bb0b |
|
BLAKE2b-256 | de0fc762592f8c1de8e7f47b62e83fe4d2a161699aff1b83c82ae66d1941699e |
Hashes for pytsql-1.2.3-pp39-pypy39_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf65fa1e5cc946cb98435f36a1cd54d97eecfdba2fd494663e18ae0d15be2b2c |
|
MD5 | 6a8f7359f8dcd3981a28b05f488a6809 |
|
BLAKE2b-256 | 8582cb43985443d2cfc9cc64d851beff75d8f52580b9a901631521c18c53caa7 |
Hashes for pytsql-1.2.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d99926dc846ecdf97b3ab70e2a090a02a49b231be551bee566a999637823b55 |
|
MD5 | e20c2a8b15df99a7d4e60efbfd0b1656 |
|
BLAKE2b-256 | 829267bcccd6e380d98c0b5e8fb1b43cad5401e2859314ea4cc1dc8c5bec9446 |
Hashes for pytsql-1.2.3-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f364a5d237072778a9907aa7641681b4340434fdba741968e531a5995a60634 |
|
MD5 | a6fb1ffd1e1fe781186b687c114a110d |
|
BLAKE2b-256 | 632195bb5fee2394e4184f187e7f85426a7ccf754c362e643c4e55a6a1e67e8f |
Hashes for pytsql-1.2.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27d3ddf729d346ea95c01642016c3be88999148a4911a3322b080c48b321f03c |
|
MD5 | b5f8559a8cf2fb6646d4a4cf0a054ce1 |
|
BLAKE2b-256 | 8e979bb21586de7a4713f516aa75a1326a5e14ec8c1a13b11a432403d8d94d18 |
Hashes for pytsql-1.2.3-pp38-pypy38_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94aea233c83a28231b2e0a23c837ecc05b16ccb3155dd9ac4be9677e8ed2bb93 |
|
MD5 | 457baebb9ac6dee9cfc2bb20fc987ddf |
|
BLAKE2b-256 | e24ee50b8f72ee6b48c21118a24eddf48b1ce0ba4492e21bf90674ad98500942 |
Hashes for pytsql-1.2.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7747d2185f92753a4218b5c3e844fae4b8b11b7ee0633a5e7a6064085f501d4 |
|
MD5 | e0d330156407ba40bee7d76ae33a5a52 |
|
BLAKE2b-256 | f1ffc58744c76d8a9c4d97fafbeb89ebeef97168fe6b80190f3cadd6fd87d603 |
Hashes for pytsql-1.2.3-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a398e4660134c86b662702369defdcaa43caed1929da636ab705db95d174a87d |
|
MD5 | 4e821c4508361e8e87585d30dc01b5f9 |
|
BLAKE2b-256 | 77e9af2b2c776b0d8c3455179fd1583b1012528c93be1d3e4aadcef2f4dc5bda |
Hashes for pytsql-1.2.3-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac4ed0be2bcff25e6058a85a0e331fd64b6e06e9d1fcc868169df91920316f01 |
|
MD5 | bf31731f6e81b11ac30a1eb9c3391d41 |
|
BLAKE2b-256 | 867d50e7adb566f02f581097f1226fb905d157e7f91c001605ac226b7e18e1ee |
Hashes for pytsql-1.2.3-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eb9826d9eb028adaae5b776c85661e4d788d535ed4ba7050e6d857b697d46a7 |
|
MD5 | 329331aa10884631335db22da78bbcc7 |
|
BLAKE2b-256 | 6851b4d1d25bcdc9b94ffc0517ecb7cb2526ac60b7a6462c785e18ccb1ee85ec |
Hashes for pytsql-1.2.3-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 640eba4b9ae8f722f3f3f05d7f2ed2d7536d3581fe3bea8e0d8b0611b92a377f |
|
MD5 | 32ee15faa8a9f157d533b14773182dc4 |
|
BLAKE2b-256 | 2d3278fb71c3382286613c695c5d4a4c33282cb9e0dd26cff797390b57dcf39b |
Hashes for pytsql-1.2.3-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 979592e9f6dab30a5e0208a8360c8df72d17caf28a7c8030408ccd167b11325f |
|
MD5 | 20714afc9eab35bec3a30eaa115c0165 |
|
BLAKE2b-256 | 1fec313cd3215f7215feb45be08270447dd018ac90344b83fd33280df8b876f0 |
Hashes for pytsql-1.2.3-cp312-cp312-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1b4342e8ab8f1f1cfc30be3d318bffab7f4f7bd323fe0269b929ce43b7b1d02 |
|
MD5 | 6bec2e79a06d1701604e15e6df823e13 |
|
BLAKE2b-256 | 52a2a0b170114c05132dab90455439c8d8a2c2e698f4e84c70abde4c679c1041 |
Hashes for pytsql-1.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d26808e6aaf32571d78ba3af6d134fd3b308f6d9310dbcbb31425057bc91666 |
|
MD5 | 950e93a89649ac946ed32a889c1e3d6a |
|
BLAKE2b-256 | 7f2323b980b145305534c5e3333c3718d1ddb9355bd384062e0c06cec8bd919b |
Hashes for pytsql-1.2.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2f4dd4bec699279781db7d54db0c6d0d67dd80ac9a5ec5fdda3f21992312754 |
|
MD5 | 2bd046120b7465c2ead6f2b92cb5b705 |
|
BLAKE2b-256 | e46c881e217dbc18c95daaffddef8dd4cccb4a7f86735488ea7dcfff2dcbcdcd |
Hashes for pytsql-1.2.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3f5df4c37fc2c08c094661ea75901d007a505e527b119fa7037a7824c3b05b2 |
|
MD5 | 02e59395e3e82d8d9ff655bf4174108d |
|
BLAKE2b-256 | 79f75b1bc2607b5ad39e86bf61ae3f1acff21d1950c4c136a3bd74540f0d80d3 |
Hashes for pytsql-1.2.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ca7711cc6f4ed2b607438f6fead30e1059525080ae772ef84575d185bdbe7ef |
|
MD5 | ac88b63a5cc98d5c6d157fb9e906f562 |
|
BLAKE2b-256 | c111e80782341a592fac05da1410125956661a991d04d30350c63313e669faa1 |
Hashes for pytsql-1.2.3-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a2a53e5e36da96b31a227567d04c8a089b00b726cd1bc11f2a75d71025697bb |
|
MD5 | a4a94f3075fe7e33582c5b2feca1a49b |
|
BLAKE2b-256 | 3b7fa3a154024d89a53f30406b6605e07f4f6aa968e1f6e47b923a7c8ef16651 |
Hashes for pytsql-1.2.3-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d06b42737e044142329f15adf5d80a54b3e2ca6dfc37e27efae3a781dd2923d6 |
|
MD5 | 51b52e93d6256af33b4365cf3cf0591b |
|
BLAKE2b-256 | 0410ffeb3b0112a9b8aa60dbb98907f2516cf6f5d428326e724600e73e3f14ef |
Hashes for pytsql-1.2.3-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7d674ad910d465d7d5536b5a16f91f67cac6890c04ffe3e3f187c989ecff545 |
|
MD5 | 1ec2695bca4c3c0e9473205c50d966d0 |
|
BLAKE2b-256 | eeef8221c167c38422e66e41fbc6c9bbdaf56530913155807d7029d6c2f837c1 |
Hashes for pytsql-1.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 277afaf1b2b989defaa3cf1a9bd1284bdd739aaea48fc98ff02a099a91462215 |
|
MD5 | 0fe94650bb1ef0e3278d53af143699f5 |
|
BLAKE2b-256 | 630902fb85dc375f807f4def7ce67d74b2deb88e0eae9f27da34167faadea5d7 |
Hashes for pytsql-1.2.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d3406e379e96caa8d75bbda0a880cc777ec97468bbe8de5729af226ac9cf5a2 |
|
MD5 | 88696c5fc296c9a9a00bd707288cc92d |
|
BLAKE2b-256 | a9c00163e62a5fbc811e525a284df745b49d6f30f446b5d6b744c159d8194768 |
Hashes for pytsql-1.2.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d9537102299aa1e2d3e76d924c9181f3cc86d41f17e66e1473eac8b5e53eb8f |
|
MD5 | 30f776015877684c91564f31d64c2bb0 |
|
BLAKE2b-256 | d0f9319bcd379d7344eeb05a2bdea90d68fae16a3c9e19bed9dab706a43c0238 |
Hashes for pytsql-1.2.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54992d32d3b10a753398cb57678bb294e0499f00545bb597c275e8bc43e0922e |
|
MD5 | df1838d7bf0263338628c33a4fa1d275 |
|
BLAKE2b-256 | 2419aa23dcdc59cebf68a4a01036ed1d229157b19dc8ccbb46899fd4d0857708 |
Hashes for pytsql-1.2.3-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cec69824f50621cf6c0bf4480400b5c5a3bf071211e4d9893ba5056a48b54ba5 |
|
MD5 | 0a69adece78f98726ea42c9d3c8bbab4 |
|
BLAKE2b-256 | 188e5cd714b48885d0090c4f7144ecf359d5fc34aeab4ee972cabda82515158c |
Hashes for pytsql-1.2.3-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55fb2dbb78b5387179e8db51ef0f38811022ca3c32e3f72783de41ca4fe134c1 |
|
MD5 | 53488f7ddaeb33944e14a09b3930311b |
|
BLAKE2b-256 | 4534e9904fff3015af7d0ffefed0d164e08a02c0130b0c25fa787baebbdbf3b0 |
Hashes for pytsql-1.2.3-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c25d988a244773f13ba30dfc666cbd38907dbbba3a359e0f98f94334ab3bba9 |
|
MD5 | 1c275891e5d6e2f4b39dd38e265f7270 |
|
BLAKE2b-256 | 4da19be05f6f58bfd00f1927d771ba78e319193f0954da4f03751801f73c8d81 |
Hashes for pytsql-1.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a5c16db039db3637391e999a182532f22c3d1aaa3b8a8edbbd2bcbba4afa804 |
|
MD5 | e46043ff8ab1b76f068329f23c8a71ac |
|
BLAKE2b-256 | ad8907ab09698b9919a1a7bbfe08d4a477bfa3e5a4428b3b04c8cdd6e1b403b3 |
Hashes for pytsql-1.2.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70eaafb2c88f5cc74ead64b7f7c495a93aaf355d9fdacaa6de5ce602105e2580 |
|
MD5 | afef075b540f4f95241ac25bb9d3dba7 |
|
BLAKE2b-256 | b299798f542420e7efdfa455672e6276c90fa086764da8499b249bb076e3a4db |
Hashes for pytsql-1.2.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ea0e3f55f5bba4ec37c2bff6cc1cc8af0a3f840b9e1c381c39ec3e0f69d723e |
|
MD5 | 8f6e5a5ccff56677d73aad27a0b81470 |
|
BLAKE2b-256 | 1e342de1c39e4cf1519afb2c45c3354948ac24c79a6392d8c5020f9dee076db9 |
Hashes for pytsql-1.2.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a2b73b6a9c721028e40f2162c6555f19dbf87b753909ffa0bd3f7ac701d9b03 |
|
MD5 | 5e40561e278b8f13c2207bffdf97b175 |
|
BLAKE2b-256 | 52a680ef3f6315c1c16f22c8844d1bbdc7bc390359ff1c074ac54c8d13e45dff |
Hashes for pytsql-1.2.3-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30fffa58569f8fb21ed43a85c7bcc41ca205d7e5b3d140712391e89c22647e6c |
|
MD5 | 7df757d92e75135da2cfcfaaff5cda38 |
|
BLAKE2b-256 | f810dd09a15b0232d5f4e19a76bfa7855884830950a5c07217468db504a0e0b1 |
Hashes for pytsql-1.2.3-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf19183d6c6d127acf7944efe0cc286259a4448ce3d962c76f2afb70393f8152 |
|
MD5 | cd065a530d3dc3ec15f05a9ab0ba01a0 |
|
BLAKE2b-256 | a454df8f027b65fd18f1acde8725071bd14e40c3cb39eaef940fba9f591d192c |
Hashes for pytsql-1.2.3-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 968d90d1265f5f930b21d344951949be30705316b46c9918ed5445bde3160621 |
|
MD5 | 5f1cd904be3dc41e2353dba7cbbd29c2 |
|
BLAKE2b-256 | c74283a65d6e90ccc17aba53394938f61814a7df8d79d5ef37774fef823cd2fe |
Hashes for pytsql-1.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5250f0052003deed7d23bfcbba47bd84ab50707070e2450dadc0d851f2342fe |
|
MD5 | 09b8db84a66a85d755cd47b3b407fc91 |
|
BLAKE2b-256 | f06c70f95c0f19299fe9cd2a6cfa40df32a962b7bd099555db5ea3baea36e53f |
Hashes for pytsql-1.2.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0591e3b6c851c55e6a2dd4533213a8ddbd90fe0dfc937dd9b7e075b8e91786d |
|
MD5 | 165d7b33c008cc04454eb975b4019320 |
|
BLAKE2b-256 | 90141f9e29355d298142ab635483a75bb76cfc32d85727554413d68ab37038d0 |
Hashes for pytsql-1.2.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d20a475f4c792f2d35d3ec538ace8996bc2eeccc8a4dce4ffeb3a39379c65a9 |
|
MD5 | 7256a241e4cdbfab7e7a850c435ec5a3 |
|
BLAKE2b-256 | 2393a2b3df59eab0ee7ecfcc966a4c1f767c820ae6a7f39e1eff08bbdc8d4401 |
Hashes for pytsql-1.2.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9717b4072c482d9708ab0dc0617a0059e2a68944a2e4bc86238a1dbaffffcf70 |
|
MD5 | 7c2d722aa4d29fb0319f362df43a5703 |
|
BLAKE2b-256 | 814f16ad9b7fb43f074535a98721b3f553e45871f5036d5921dd59f24654ab2b |
Hashes for pytsql-1.2.3-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65b4b7a25c8ae21696c996ca4ee221e1d9841155f42f8df55f42195c7145e3ff |
|
MD5 | f714f9a7c19f8570f635ce76f7ab1c1f |
|
BLAKE2b-256 | e5d25633fb3684d0eb6dd69ad24213f510f2e060844f8f8f0c9a01498d60ad50 |
Hashes for pytsql-1.2.3-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1d383822e5c398c5f1fe3c6c0ee764bda24166ddaad15d9c5730fc88ceaf7ba |
|
MD5 | fa236fcb3e76ddffcfec0152cec8df07 |
|
BLAKE2b-256 | 34a9e8af9241cab91743017fe7399650ff8963b50c95c2c040102c31ad21a3e8 |
Hashes for pytsql-1.2.3-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c0f3f3e612e36d61f3c153b252155bd8d5e487727a492a985d144c2d067dee8 |
|
MD5 | d765faf6c31131b17d71aea6c4f65f07 |
|
BLAKE2b-256 | 5a4c8491d9307da3e993dbb752f12a60a258f36f7a83e964521492672b67ad64 |
Hashes for pytsql-1.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13e59d2fbc7b9596d7b3c80b719c7fafed1ba3715edbaab36683900cea6f2aba |
|
MD5 | b0a8914fe2ac207b9f514bcb4a0bc877 |
|
BLAKE2b-256 | afac2e59314b6fdf9f266a467f839878eb112ac1f7697c85d6ac310031727a51 |
Hashes for pytsql-1.2.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05d5969b14402df951d238abfd9c42ac7cf09b2d13bfeb5fcbbe17cb34580310 |
|
MD5 | 58dd474a6132023e66e0f719baa10e27 |
|
BLAKE2b-256 | d431985ef5fc0cd6a60bbaae27bf77dd847dfb2ae6a5e094ebc3c05ced64c6e9 |
Hashes for pytsql-1.2.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c8b53d30e6c514a119d955a6b69d20974f3f937ab262e5ac1e686ef7b74f019 |
|
MD5 | 1220535b54c55c0aa5f8685bb438b8ec |
|
BLAKE2b-256 | fa0aac11056385894094030ce6383f3923417ded1b428408a9c6e0ec2669a117 |