Skip to main content

Native python integration for fsspec backends

Project description

fsspec-python

Native python integration for fsspec backends

Build Status codecov License PyPI

Overview

This library wraps an fsspec filesystem so that files and folders inside it can be imported in Python.

from fsspec import open

open(f"python::s3://my-python-bucket")

import my_bucket_lib  # s3://my-python-bucket/my_bucket_lib.py

Usage

In addition to the python:: chained protocol url, this library exposes a handful of functions and monkey patches for connecting Python internal mechanisms to an fsspec-based filesystem.

  • install_importer: install an
  • install_importer(fs: Union[str, AbstractFileSystem], **kwargs): install an fsspec url/args or filesystem instance as an importer
  • uninstall_importer(fs: Union[str, AbstractFileSystem] = ""): uninstall an fsspec url or filesystem instance, or if nothing provided remove the last-installed one
  • install_open_hook(fsspec: str, **fsspec_args): monkeypatch Python's open builtin to run off an fsspec filesystem
  • uninstall_open_hook(): remove the monkeypatched open

Coming soon:

  • Monkey patching for os / os.path / pathlib

[!NOTE] This library was generated using copier from the Base Python Project Template repository.

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

fsspec_python-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

fsspec_python-0.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file fsspec_python-0.1.0.tar.gz.

File metadata

  • Download URL: fsspec_python-0.1.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for fsspec_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 224de5735a687e4a805dc18a61ec755fce81d0f9d80a1633d64ba30d901ffc0d
MD5 4692a87b0e0ca995f47b1c4afdb5dfed
BLAKE2b-256 ec605abeae63133768e7c67a5bd5f8a577fed8bb3689876850049577dce2f900

See more details on using hashes here.

File details

Details for the file fsspec_python-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fsspec_python-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for fsspec_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0cd05c4d3c75215d1ba1d211f7398565467e522a1b7422e91d5866cf0955c3ad
MD5 fbe7ac9382c8407f3264bd782cea25cb
BLAKE2b-256 6e7895fa8cb9fb0136cbb2fb979ea1570e89ddcc9569195e84e616bbad7b5bd8

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