Skip to main content

Credentials

The VFS reaches a file system through its REST API with a file system token. No extra package is needed in Python or TypeScript.
  1. Create a file system in the TiDB Cloud console or with ti fs, and note its region.
  2. Take its owner token, shown once when the file system is created, or create a scoped token under File Systems, your file system, Access Tokens, Create Token. See Manage File System Tokens.
  3. Set host to the endpoint of the file system’s region. A token works only against its own region.
Your application passes both to the VFS, for example from its environment:

Scoped tokens

A scoped token reaches only the path it was created for, and only with the operations it allows (read, list, search, write, delete). Mount it with root_path set to that path, since it cannot list the file system’s root.

Self-hosted drive9

TiDB Cloud Filesystem runs on the open-source drive9 server, and the same VFS mounts a drive9 server you run yourself: set host to its origin and token to an API key it issued. See the Python TiDB Cloud Filesystem VFS or TypeScript TiDB Cloud Filesystem VFS page for configuration and examples.