Skip to main content

hyperdockt-fileio

Project description

The FileIO Hyperdock

But seriously, what is a Hyperdock?

  • Hyperdock is just a fancy name for a collection of tools. Which are, just python functions returning str!
  • You can define __auth__ property for each tool to specify the authentication method, but it's not necessary for the file IO.

How to use it?

  • From your pocket instantiation, call from_dock. For example, Let's say you're using hyperpocket for langchain. You can do:
from hyperpocket.tool import from_dock
from hyperpocket_langchain import PocketLangchain
from hyperdock_fileio import initialize_dock as fileio_dock

# ...
def agent():
    # ...
    # initialize the pocket
    pocket = PocketLangchain(
        tools=[
            *from_dock(fileio_dock()),
        ]
    )

Supported Tools

Reads

  • read_text_file: Read a text file from the disk.
  • head: Read the first n lines of a text file.
  • tail: Read the last n lines of a text file.
  • read_binary_file_and_encode_base64: Read a binary file from the disk and encode it to base64.

Writes

  • write_text_file: Write a text file to the disk.
  • write_binary_file_from_base64: Write a binary file to the disk from a base64 encoded string.

Directory Operations

  • current_working_directory: Get the current working directory.
  • make_directory: Make a directory.
  • list_directory: List the contents of a directory.
  • find_file_in_directory: Given a glob pattern, find files whose name matches the pattern in a directory.
  • grep_recursive_in_directory: Given a regex pattern, search for files whose content matches the pattern in a directory.

Copy, Move, and Delete

  • copy_file: Copy a file from one location to another.
  • move_file: Move a file from one location to another.
  • delete_file: Delete a 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

hyperdock_fileio-0.2.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

hyperdock_fileio-0.2.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file hyperdock_fileio-0.2.1.tar.gz.

File metadata

  • Download URL: hyperdock_fileio-0.2.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.24

File hashes

Hashes for hyperdock_fileio-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e9fb1c5887d5fa5587fadb57164dba3d9bd0dd36d545c1c91a4f641460c843e7
MD5 e53ff4e485f90844818e3d220c6dcf1a
BLAKE2b-256 a10aae16a4fb9e2a5012c485d9c6c60ca51835ddea138c7d4cf72530f9428a6a

See more details on using hashes here.

File details

Details for the file hyperdock_fileio-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hyperdock_fileio-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e14fa59405157709149d17d64e3d4bf7f0079e2051d8e5f481bd6a53c9c87c17
MD5 50d62b884c4284a357d21da70fa80f1c
BLAKE2b-256 6d79324dd3e38c5b8a415376a6db00a63a0132adc9cf7ce2bf32b878dd7b9399

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