Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperthought-1.2.2.tar.gz (67.3 kB view details)

Uploaded Source

Built Distribution

hyperthought-1.2.2-py3-none-any.whl (72.6 kB view details)

Uploaded Python 3

File details

Details for the file hyperthought-1.2.2.tar.gz.

File metadata

  • Download URL: hyperthought-1.2.2.tar.gz
  • Upload date:
  • Size: 67.3 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

Hashes for hyperthought-1.2.2.tar.gz
Algorithm Hash digest
SHA256 e8a3b60b468c7ce87fbb9751fbf80316c9701d6bc2edc8762cb6f055622c5957
MD5 19239fa9e0ce2d1836ba05d5259dac6d
BLAKE2b-256 1286b64f92ee7c29adc8acfbc3b191ab7f01dc4d09b25e59422a20b9d0d8eae3

See more details on using hashes here.

File details

Details for the file hyperthought-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: hyperthought-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 72.6 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

Hashes for hyperthought-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a194ba1dff7a9eaebe972225355eb9f65cbc8e2c4695f05baf0297760c1b5df
MD5 c44db5d16a87d84c5b9d496a1f34ee98
BLAKE2b-256 bbb17e6d3e5ead19ab891ba2af03f57683bef97f0498ebf128a4f2dca8b57ac3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page