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 project.

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)

# The space could also be 'group' or 'user'.
space = 'project'
# space_id could also be a group id or username, for group or user spaces, respectively.
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=space,
    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=space,
    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-0.9.26.4.tar.gz (45.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperthought-0.9.26.4-py3-none-any.whl (56.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hyperthought-0.9.26.4.tar.gz
  • Upload date:
  • Size: 45.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for hyperthought-0.9.26.4.tar.gz
Algorithm Hash digest
SHA256 a4b746aa099e123db97a22e8c33bb4b6fdd973eea2a727164378641c6cadd5c1
MD5 97b9ff4dfff24ce7a32e190468beedc1
BLAKE2b-256 a8dd69e10421ffb954d4911d90e62a40d634862856f208139a53cdeda65f038b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hyperthought-0.9.26.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd3ae4858164a788e958242e4e85f461afcf90a22a5fe31391169196ab2c5cb
MD5 36e9853a8eb81f3c97d4f2960781ca81
BLAKE2b-256 f33f279fb930ece28652364ed901fbe3c171fcfa9b0249d1991ef0001aaeb78e

See more details on using hashes here.

Supported by

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