Wrappers for HyperThought® API
Project description
Modules that encapsulate HyperThought API calls and make operations like authentication and file transfer (upload or download) easier to accomplish.
Description
Example usage:
Here is the code needed to upload a file to a HyperThought workspace.
from getpass import getpass
import hyperthought as ht
auth_info = getpass("Enter encoded auth info from your HyperThought profile page: ")
auth = ht.auth.Authorization(auth_info)
files_api = ht.api.files.FilesAPI(auth)
# space_id can be found in the url for the workspace
# e.g. https://www.hyperthought.io/workspace/<space_id>/detail
space_id = input("Enter destination project id (in url of project): ")
# Create a folder.
# Use default (root) path and don't specify any metadata for the folder.
# (See method docstring for info on unused parameters.)
folder_id = files_api.create_folder(
name="Tests",
space_id=space_id,
)
# Get a path for the file.
# Paths consist of comma-separated parent folder ids.
path = f",{folder_id},"
local_file_path = input("Enter path to local file: ")
files_api.upload(
local_path=local_file_path,
space_id=space_id,
path=path,
)
# Look in the HyperThought UI to see the uploaded file.
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
hyperthought-0.9.42.tar.gz
(62.6 kB
view details)
Built Distribution
File details
Details for the file hyperthought-0.9.42.tar.gz
.
File metadata
- Download URL: hyperthought-0.9.42.tar.gz
- Upload date:
- Size: 62.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75197d7b10c297249121398cfb765b0bda9213d0ac6401ea21840cfc07316d34 |
|
MD5 | c33acdf6134c5e65447861c1ba29bbd9 |
|
BLAKE2b-256 | 0cc149874b0c12b66ae0f6dfb237f5b802684d202d8ab896c381886d08fa5906 |
File details
Details for the file hyperthought-0.9.42-py3-none-any.whl
.
File metadata
- Download URL: hyperthought-0.9.42-py3-none-any.whl
- Upload date:
- Size: 65.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5a2e07e987e87cb1e0e349b98d09b7f8dbb074df9ee956d023a2e70d1f14a9d |
|
MD5 | 31fec31cef764521f3ca4948507a17bc |
|
BLAKE2b-256 | 1f8c694a9dc4316502350f505d89fec29ca82661b753e6501f19d3e3e1505864 |