Skip to main content

Filesystem driver for the Model Context Standard.

Project description

mcs-driver-filesystem

Filesystem driver for the Model Context Standard (MCS).

Provides list_directory, read_file, and write_file tools. The actual I/O is delegated to a pluggable adapter, making the same driver work with local disk, SMB shares, or any future backend (S3, SFTP, ...).

Installation

pip install mcs-driver-filesystem

Quick start

from mcs.driver.filesystem import FilesystemToolDriver

# Local filesystem (default)
td = FilesystemToolDriver(adapter="localfs", base_dir="/data")

# SMB share
td = FilesystemToolDriver(adapter="smb", server="nas", share="docs",
                           username="user", password="pass")

Adapter protocol

The driver defines a FilesystemPort typing protocol. Any object that implements list_dir, read_text, write_text, list_files, read_raw, and exists satisfies the contract -- no inheritance required.

Links

License

Apache-2.0

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

mcs_driver_filesystem-0.2.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

mcs_driver_filesystem-0.2.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcs_driver_filesystem-0.2.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for mcs_driver_filesystem-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9c3bed7b4d96ce96d0b332f47f6efa5c0ac33813f24af69942d12e8c60b3d23b
MD5 99e5a2a24f80d0dc85894aad69e5469b
BLAKE2b-256 f94217d54e5d11f699a1967c7a2c08b338c205d101a6a50b5ecbf1518feb126e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcs_driver_filesystem-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4d1a52943540967f736fa64e14575e8575097f8a1817bd8532eaaae17a00897
MD5 d76944c84dd904fa2b554b3aeb623795
BLAKE2b-256 52cab74bb66d01e103bcd78bc7405cea23f64cb94ab55b56d1d7fcf27f1b6893

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