Skip to main content

Net-file ranged read file access abstraction library

net-file allows you to access files by URL the same way for different types of storage:

  • local files
  • files served by http(s) servers like Nginx
  • files on SFTP
  • ...

Second major feature of net-file is ranged access. So you can download only part of file starting from arbitrary position.

API

    open_url(
        url: str,                   # File URL. For local file use file:///absolute/file/path
        start_bytes: int = None,    # For ranged access - the beginning of the range
        length: int = None          # For ranged access - range length
    ) -> NetFile

Opens URL returning NetFile object. To read from file use context manager or open() / close() methods pair of NetFile object:

    with open_url(
            url='http://test.domain/example.mp4',
            start_bytes=10000,
            length=20000,
    ) as open_file:
        content = open_file.read()
        while content:
            content = open_file.read()

Speech Technology Center

Metadata

Release files for net-file 1.1.6

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

Source distribution (sdist)

Source distribution for net-file 1.1.6
File Size Uploaded
net-file-1.1.6.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for net-file 1.1.6
File Interpreter ABI Platform
net_file-1.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 12.9 kB

Release files / net-file-1.1.6.tar.gz

Download URL net-file-1.1.6.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fda0116974c7d62667db93520f23c343617f916ccb437db5f0b9e7694a0e0bea
BLAKE2b-256 checksum
How to use checksums
7f5d3dc6d27e71e9f0732cf7f4458ed9fa0dd451d7e762d8a1c07017e9b7718c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

Release files / net_file-1.1.6-py3-none-any.whl

Download URL net_file-1.1.6-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2c28c6c3d9257a59f9849f03f606590f2e59c7f31c31f58138cdc6fbcc8e7ab
BLAKE2b-256 checksum
How to use checksums
7014543f283c0d73ddb34ad69d6ac8a6868aed9144d4188b2f9ac65d4adc2548
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

Release history Release notifications | RSS feed

This release

1.1.6 This release

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

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