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.1.1.tar.gz (66.7 kB view details)

Uploaded Source

Built Distribution

hyperthought-1.1.1-py3-none-any.whl (69.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hyperthought-1.1.1.tar.gz
  • Upload date:
  • Size: 66.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for hyperthought-1.1.1.tar.gz
Algorithm Hash digest
SHA256 3d27ad864809231e322dab2985fc63121aa8c547722fbf2e0e331113eef5efe2
MD5 8c80cc2fd88536f1c1343676faac43bc
BLAKE2b-256 10d6c1c855b7e4df783c9fc4ed2406f467143177f3aa79c27b7e07f254077077

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hyperthought-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 69.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for hyperthought-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 88e1bf4a156274231a874bb6b9e57c3ae8c22afd91aa295145ff1c8cfbc70cd0
MD5 6e72b44ed9aee007de2e9ed0b1b0195d
BLAKE2b-256 e8578cd5f2d67c12f0f7d0e5bd73d490ae0401f7931297deba11ae3ccf298c0d

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