File: README.md

package info (click to toggle)
python-multiurl 0.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 168 kB
  • sloc: python: 1,318; makefile: 4
file content (57 lines) | stat: -rw-r--r-- 1,430 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# multiurl

A package to download several URL as one, as well as supporting multi-part URLs

## Simple example

```python
from multiurl import download

download(url="http://example.com/test.data",
         target="data.file")
```

## Download from two URLs into one file

```python
from multiurl import download

download(url=["http://example.com/test1.data",
              "http://example.com/test2.data"],
         target="data.file")
```

URLs types can be mixed:
```python
from multiurl import download

download(url=["http://example.com/test1.data",
              "ftp://example.com/test2.data"],
         target="data.file")
```

## Download parts of URLs

Provide parts of URLs as a list of `(offset, length)` tuples, expressed in bytes.

```python
from multiurl import download

download(url="http://example.com/test.data",
         parts = [(0, 10), (40, 10), (60, 10)],
         target="data.file")
```

## Download parts of URLs form several URLs

```python
from multiurl import download

download(url=[("http://example.com/test1.data", [(0, 10), (40, 10), (60, 10)]),
              ("http://example.com/test2.data", [(0, 10), (40, 10), (60, 10)])],
         target="data.file")
```

### License
[Apache License 2.0](LICENSE) In applying this licence, ECMWF does not waive the privileges and immunities
granted to it by virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.