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.36.tar.gz
(52.8 kB
view details)
Built Distribution
File details
Details for the file hyperthought-0.9.36.tar.gz
.
File metadata
- Download URL: hyperthought-0.9.36.tar.gz
- Upload date:
- Size: 52.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d05a15bbe14b4fcca471b467c645be9cdbc1c0cffe534212abae399d3354ace3 |
|
MD5 | dc23df97c3d2affebe401fa42273c6f3 |
|
BLAKE2b-256 | c679b38ff43d7d717c63d86abb4abbfaaf41dc9877508d154cec2a387c49f384 |
File details
Details for the file hyperthought-0.9.36-py3-none-any.whl
.
File metadata
- Download URL: hyperthought-0.9.36-py3-none-any.whl
- Upload date:
- Size: 65.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc7131fcc20079097ff718bc79fd0db2347713911693e3bd158deb7448fc5a2b |
|
MD5 | f965980c6bace9d6e3f6c5286a10f10c |
|
BLAKE2b-256 | 4a3de2b6fecf1d18412e51ca51bfeeb7241aefa2e06080a7cd70b0f14427a712 |