Convenience wrapper for accessing Subsalt datastore
Project description
Subsalt is a synthetic datastore that makes sensitive datasets shareable. This library provides an interface for retrieving data from Subsalt tables for use in other applications.
Installation
pip install subsalt
Usage
This library is a thin convenience wrapper around psycopg2. psycopg2 or similar connectors can also be used directly if more flexibility is required.
Note: this library is currently in beta, and the interface may change significantly over time.
Retrieving data from Subsalt requires valid credentials. For access, contact the data owner or email hello@getsubsalt.com.
Authentication
client = subsalt.Client(
username=os.getenv('SUBSALT_USERNAME'),
password=os.getenv('SUBSALT_PASSWORD'),
)
# `client` can retrieve data on your behalf
Retrieving data
client = subsalt.Client(
username=os.getenv('SUBSALT_USERNAME'),
password=os.getenv('SUBSALT_PASSWORD'),
)
# Optional - get a list of tables you can access
for table in client.tables():
print('{}.{}'.format(table.schema, table.table)
# Retrieve data via SQL
df = client.sql('select * from my_schema.my_table limit 250')
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file subsalt-0.2.2.tar.gz.
File metadata
- Download URL: subsalt-0.2.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af7992b795e634d4598b2b0b4e7577e0ac64ff72b45b386fbb421d4068fc4be7
|
|
| MD5 |
10795cf011f5ce7c517f087a34ab8da4
|
|
| BLAKE2b-256 |
87d5d0af3663acb11a8a44ada385024faf4a17e22d7d8b774d130b692888a12b
|
File details
Details for the file subsalt-0.2.2-py3-none-any.whl.
File metadata
- Download URL: subsalt-0.2.2-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99f5fd26bc7ce3d392d9afecdb1a4bb9c4c0a7c8a80430be31a05c2990d87346
|
|
| MD5 |
6895b890a8af32e17cfe269f0d9c0fdc
|
|
| BLAKE2b-256 |
224fb408e105d0fd0f88a3f4813a5a2202a968690d3a7ebab9a48711d2db59e8
|