Primary goal
This library realize Python Database API Specification v2.0 PEP 249 for JSON-RPC. Standart python database api, but under the hood you make remote procedure call.
DB API v2.0 for JSON-RPC
This library realize Python Database API Specification v2.0 PEP 249 for JSON-RPC. Standart python database api, but under the hood you make remote procedure call.
pip install jsonrpcdb
import jsonrpcdb
# without authentication
conn_params = {
'host': 'ip/hostname', # default localhost
'port': 4000, # default 4000
'database': 'uri path', # default empty value
'schema': 'http/https', # default http
}
# with token authentication
conn_params = {
'host': 'ip/hostname',
'port': 4000,
'database': 'uri path',
'schema': 'http/https',
'user': 'username',
'password': 'password',
'auth_type': 'token'
}
conn = jsonrpcdb.connect(**conn_params)
cur = conn.cursor()
data = {
'params': {} # remote procedure parameters
}
cur.execute('some_method', data)
results = cur.fetchall()
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41601739a3d673a4a4891dba6400b3affc9b574345f48eabd4da73c233468c83 |
|
MD5 | 84a9dfd28f2fdef8f98c7d1e4f48b59d |
|
BLAKE2b-256 | 4a8177a87b6454e6509f7a81e24d2998dd894686792109c06f46958519e3d4cc |