Skip to main content

httpfs-sync

Overview

httpfs-sync is an implementation of a filesystem interface for the Python fsspec library that uses synchronous requests based on urllib3. This serves as an alternative to the default asynchronous (based on aiohttp) filesystem implementation provided by fsspec. This project is ideal for environments where asynchronous operations are not feasible or desired, allowing users to interact with HTTP-based filesystems using a synchronous API.

If you're dealing with deadlocks potentially involving the default HTTP 'filesystem' in fsspec, the implementation here may help with verification of behavior: just use the classes provided here as a drop-in replacement for HTTPFileSystem and compare behaviors.

Features

  • Synchronous HTTP requests for file system operations.
  • Fully compatible with the fsspec API, making it easy to drop in as a replacement.
  • Uses urllib3 for robust, production-ready HTTP communications.

Installation

To install httpfs-sync, you can use pip:

pip install httpfs-sync

Usage

Here's a simple example of how to use httpfs-sync to read a file from an HTTP server:

import fsspec
from httpfs_sync.core import SyncHTTPFileSystem

# enable use of SyncHTTPFileSystem and associated files for both http and https
SyncHTTPFileSystem.overwrite_async_registration()

# Use the registered file system to access a remote file
with fsspec.open('http://example.com/data.txt', 'r') as f:
    data = f.read()
    print(data)

License

httpfs-sync is distributed under the MIT License, allowing the code to be used in commercial applications as well as open-source projects.

Metadata

Release files for httpfs-sync 0.0.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 httpfs-sync 0.0.2
File Size Uploaded
httpfs_sync-0.0.2.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for httpfs-sync 0.0.2
File Interpreter ABI Platform
httpfs_sync-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 24.9 kB

Release files / httpfs_sync-0.0.2.tar.gz

Download URL httpfs_sync-0.0.2.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9d1d3b699b0f6d6c4d9fddaf4ad8b8688b1a1ba3fefe80c1445247e56833a57c
BLAKE2b-256 checksum
How to use checksums
6660008de95cbbd5d712211f177793b00f5c34558613285c84a22edfc9325a94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / httpfs_sync-0.0.2-py3-none-any.whl

Download URL httpfs_sync-0.0.2-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
223c1bf44ace63f6f5b3a07678174133a701314c8bdf88a53f7fb7d71de8e521
BLAKE2b-256 checksum
How to use checksums
6b42c1e2acce42bb8597b215313de8dacbe07d90928c195dcaf7218fa461c543
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

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