Skip to main content

GooseFS Python Client

PyPI Python Versions License

goosefs is the official Python client for Tencent Cloud GooseFS, powered by a native Rust implementation (the goosefs-sdk crate) exposed through PyO3.

Docs: https://tencent.github.io/tencent-goosefs-rust-sdk/

Status: alpha — the API is shaping up. See CHANGELOG.md and DEVELOPMENT.md.

Install

pip install goosefs

Pre-built wheels are provided for:

  • Linux x86_64 / aarch64 (manylinux_2_28)
  • macOS x86_64 / arm64
  • Windows x86_64 (MSVC)

Building From Source (Optional)

Most users should just pip install goosefs. Build from source only if you need an unreleased change or a platform without a pre-built wheel.

Prerequisites: Python 3.9+, Rust 1.88+ (rustup).

git clone https://github.com/Tencent/tencent-goosefs-rust-sdk.git
cd tencent-goosefs-rust-sdk/bindings/python

Install maturin:

pip install maturin

Build and install:

# Development mode (editable)
maturin develop

# Or build a wheel
maturin build --release
pip install target/wheels/goosefs-*.whl

To produce a portable Linux wheel (usable on Tencent Cloud Linux), cross-compile with zig:

rustup target add x86_64-unknown-linux-gnu
pip install ziglang
maturin build --release --target x86_64-unknown-linux-gnu --manylinux 2_28 --zig

Verify:

import goosefs
print("GooseFS Python bindings installed:", goosefs.__version__)

Quick start

from goosefs import Config, Goosefs

cfg = Config("127.0.0.1:9200")
with Goosefs(cfg) as fs:
    fs.mkdir("/data", recursive=True)
    fs.write_file("/data/hello.txt", b"hello, goosefs")
    print(fs.read_file("/data/hello.txt"))

For asynchronous code:

import asyncio
from goosefs import AsyncGoosefs, Config, WriteType

async def main() -> None:
    async with await AsyncGoosefs.connect(Config("127.0.0.1:9200")) as fs:
        await fs.mkdir("/data", recursive=True)
        await fs.write_file("/data/x.bin", b"...", write_type=WriteType.MustCache)
        data = await fs.read_file("/data/x.bin")
        print(len(data), "bytes")

asyncio.run(main())

Type stubs

The package ships PEP 561-compliant type stubs (goosefs/*.pyi) and a py.typed marker, so mypy and pyright get full IntelliSense out of the box. Stubs are kept in lock-step with the runtime by mypy.stubtest in CI:

cd bindings/python
uv run python -m mypy.stubtest goosefs

Thread / process safety

  • Goosefs and AsyncGoosefs are safe to share across threads.
  • Both are NOT safe across os.fork() — child processes must reconnect.
  • Goosefs synchronous methods refuse to run from inside a Tokio worker or asyncio event loop and raise RuntimeError instead of deadlocking.
  • File handles (FileReader / FileWriter / their async siblings) are NOT safe to share across threads or tasks — open one per worker.

License

Apache License 2.0. See LICENSE in the repository root.

Metadata

Release files for goosefs 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for goosefs 0.2.2
File Size Uploaded Provenance Actions
goosefs-0.2.2.tar.gz 915.3 kB Without provenance Details for goosefs-0.2.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for goosefs 0.2.2
File Actions
goosefs-0.2.2-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for goosefs-0.2.2-cp39-abi3-win_amd64.whl
goosefs-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for goosefs-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl
goosefs-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for goosefs-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl
goosefs-0.2.2-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for goosefs-0.2.2-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 17.8 MB

Release files / goosefs-0.2.2.tar.gz

Download URL goosefs-0.2.2.tar.gz
Size 915.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a356c6707c1acc20dc98520d1139626966e67fefdc44ede129ffdd3100bc2ef6
BLAKE2b-256 checksum
How to use checksums
2ab9187b87f58d919a823d6ac76ea78c37f247eec0d8bae5d86fd973a1f1f84b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / goosefs-0.2.2-cp39-abi3-win_amd64.whl

Download URL goosefs-0.2.2-cp39-abi3-win_amd64.whl
Size 4.7 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c5979811e48c1a3da1d710c332987576bd90b3dd4a30cefc8bd81929dfe5c1b6
BLAKE2b-256 checksum
How to use checksums
67a1fe9b876280a5fc1d450150d4816a232306ec83599f99dad94d3ce90b100d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / goosefs-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL goosefs-0.2.2-cp39-abi3-manylinux_2_28_x86_64.whl
Size 4.2 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
c56db48ab2a25143e7c6c5931a710dfab4f4f86af8f40dac941b9879d617e286
BLAKE2b-256 checksum
How to use checksums
fdf8e5e861c4e16f24791b50b7361db872c313e47cc7af21411263235458afac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / goosefs-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL goosefs-0.2.2-cp39-abi3-manylinux_2_28_aarch64.whl
Size 4.1 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
96827af19a763a97ca8a8f585ea5d5e625020f7f07b943784ca2f387865bbd6a
BLAKE2b-256 checksum
How to use checksums
4f6ec3681a90f6ffc158fe31dbb1eb408954a33c28ea2b806943ade60fc8f41b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / goosefs-0.2.2-cp39-abi3-macosx_11_0_arm64.whl

Download URL goosefs-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
Size 3.9 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d1dc9fea980f1246752807055b35d1d19ed774dd6d6a2c80308e96cffe0306c6
BLAKE2b-256 checksum
How to use checksums
28f34a6ded31c556e941e84cac33fe54b119f27ce560a9c98e6c39574b226fe8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for goosefs 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page