Skip to main content

Python library for Sql Data Api

Project description

sql-data-api-client-Python

SQL Data Api client for Python

Usage

pip install SqlDataApi

import SqlDataApi as sql

"""Sql Data Api"""
sql.SqlDataApi.set_api_url("https://localhost:44302")
sql.SqlDataApi.set_authentication("12121212-token-21121212")

# query data
result = sql.SqlDataApi("SQL-Shared").run_query_to_array("test1.Sample100",
    filter="country = @country",
    filter_params={"country": "UK"}
)
print(result)

# save data
status = sql.SqlDataApi("SQL-Shared").save_array("test1.Sample100", result)
print(status)

# execute stored procedure
sp_res = sql.SqlDataApi("northwind-db-connection").execute_sp_to_array("northwind.NorthwindEmployeesSummary", {'startDate': "2019-01-01", 'endDate': "2020-05-14"})
print(sp_res)


"""
result = sql.SqlDataApi("SQL-Shared").run_query_to_array("test1.Sample100",
    filter="country = @country",
    filter_params={"country": "UK"}
)

# load to frame
dataFrame = pd.DataFrame.from_records(result)

# manipulate dataFrame here ...

listOfItems = json.loads(dataFrame.to_json(orient='records'))

# save data
status = sql.SqlDataApi("SQL-Shared").save_array("test1.Sample100", listOfItems)
print(status)
"""

License

A permissive MIT License (c) FalconSoft Ltd.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SqlDataApi-0.1.17.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SqlDataApi-0.1.17-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file SqlDataApi-0.1.17.tar.gz.

File metadata

  • Download URL: SqlDataApi-0.1.17.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for SqlDataApi-0.1.17.tar.gz
Algorithm Hash digest
SHA256 4d6d05843d05dc3ee3cce6299c85c97999fa4404693192209fd01926af2cc92e
MD5 63676f3674c9c3ca7d171bb1876bcfcd
BLAKE2b-256 1c2883b5b0416c404197e1addc151608e0f1512b347c61178b8dae621ee3a72f

See more details on using hashes here.

File details

Details for the file SqlDataApi-0.1.17-py3-none-any.whl.

File metadata

  • Download URL: SqlDataApi-0.1.17-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for SqlDataApi-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 cac62c894a8b5055a108fe8c53c2d260ecd715f874f97ef35d0eecf67052dbff
MD5 2c23058071f546655a11c14894dacc6b
BLAKE2b-256 d0c5d137b99dc3a0587049019cbe3b45a7122175d09fbe851471e8dd5abfefc4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page