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

Uploaded Source

Built Distribution

hyperthought-0.9.8-py3-none-any.whl (49.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hyperthought-0.9.8.tar.gz
  • Upload date:
  • Size: 39.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for hyperthought-0.9.8.tar.gz
Algorithm Hash digest
SHA256 305e7b401925a373badd1632c083e846fd3dc0e6cd2958cefaf88ffd6027d50a
MD5 eb5fa48ee90239943e7d8bc04f1c5a65
BLAKE2b-256 03886c3752021e3d2bcc4ed6b27af9dda95c4979af710b1e3ebe65c0f94a929c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hyperthought-0.9.8-py3-none-any.whl
  • Upload date:
  • Size: 49.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for hyperthought-0.9.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e76a16431a4797eddc422d66e271f069fcbbf2df32570e2d74a8a245ffb97af3
MD5 231f3db29986743c2ca0415356052bfb
BLAKE2b-256 17c799e5661e9faaa86c1ecf7172a3f80e749ac484fee9fe0ab825feededdd4c

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