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

Uploaded Source

Built Distribution

hyperthought-0.9.26-py3-none-any.whl (55.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hyperthought-0.9.26.tar.gz
  • Upload date:
  • Size: 44.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for hyperthought-0.9.26.tar.gz
Algorithm Hash digest
SHA256 767750d2c9390d7501f1c7a0d067fe65328cd70da53f457922d8cea3a8eeeb7d
MD5 c9d885f4a14205f1035db51779f76c8c
BLAKE2b-256 65379edee67bf9c44487896c20cd5301a832077d2b260ebb9b0581cb7da1f440

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hyperthought-0.9.26-py3-none-any.whl
Algorithm Hash digest
SHA256 a3b90139b3ae7362001407669d0f528bee7980771f3de7d1727276bc216e7af2
MD5 3571bae798c39547d47b186e3e2ae9fa
BLAKE2b-256 fc072032c030787b44d97b232c60830370afab63c3e42065cf96ee2d3d348132

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