Skip to main content

Admin Consult Python SDK

Syneton Hermes Consult API Version

This SDK facilitates interaction with a Syneton Admin Consult client through both API endpoints and direct SQL access.

Support

For support on this Python library or questions regarding interfacing options with Admin Consult, please feel free to contact the repository owner ward.cornette@num3rix.fr.

Example usage REST API

To setup and configure the Admin Consult REST API, please consult the documentation by Syneton.

from examples.api.auth.auth import get_cred
from adminconsult.api.clientcredentials import ClientCredentials
from adminconsult.api.customer import Customer

admin_cred: ClientCredentials = get_cred()

# Get one customer
admin_customer = Customer(admin_cred)
admin_customer.get(id=9580)
print(admin_customer.name)

Example usage SQL

For use of SQL implementation, you must have SQL Anywhere driver installed: download SQL Anywhere (Sybase). Also, you need to request a DB user with read access via Syneton Support.

from examples.sql.auth.auth import get_cred
from adminconsult.sql import DbEngine

admin_cred_sql = get_cred()
admin_db = DbEngine(admin_cred_sql)

df_customers = admin_db.sql_query_df('''
                                     SELECT *
                                     FROM DBA.CUSTOMER c
                                     WHERE c.COMPANY LIKE '%A' ''')

print('{} customers'.format(df_customers.shape[0]))

Authentication methods

Use or create a subclass of the ClientCredentials class for API or SQL authentication. This object reads and writes tokens using external storage.

Use one of the pre-implemented storage methods:

  • json file
  • hvac vault

Run examples

The examples in this repo use credentials stored in a local json files. Create a .env file which contains the path to the folder with these local json files. The .env file should look like this:

credentials_dir='C:\..'

API dependant improvements

Developments which might be improved but require an extension/change of the Admin Consult API are marked with #IMPROV#

Metadata

Release files for adminconsult-sdk 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adminconsult-sdk 1.0.7
File Size Uploaded Provenance Actions
adminconsult_sdk-1.0.7.tar.gz 52.1 kB Without provenance Details for adminconsult_sdk-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for adminconsult-sdk 1.0.7
File Interpreter ABI Platform Actions
adminconsult_sdk-1.0.7-py3-none-any.whl Python 3 none any Details for adminconsult_sdk-1.0.7-py3-none-any.whl

Total release size: 144.6 kB

Release files / adminconsult_sdk-1.0.7.tar.gz

Download URL adminconsult_sdk-1.0.7.tar.gz
Size 52.1 kB
Tags Source
SHA-256 checksum
How to use checksums
930a2638fc4cbc5c0443a7787ddc6caeb4ef54d34a591dd080b50498332e598d
BLAKE2b-256 checksum
How to use checksums
03483f375f1c932f0d4af2def9baa89bc2f57c510eb96972f78feee7fccf2509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / adminconsult_sdk-1.0.7-py3-none-any.whl

Download URL adminconsult_sdk-1.0.7-py3-none-any.whl
Size 92.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af8a78e639cfe59cd6dfdd88818e322695d07013b760c93ae90bc62f87f90a50
BLAKE2b-256 checksum
How to use checksums
41ab3ae6114909c55fc63fc37502f6e1244f435c4f54b171e094a635b8240966
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Security for adminconsult-sdk 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page