Metadata-Version: 2.1
Name: bigsort
Version: 0.0.4
Summary: sort big file or streams
Home-page: https://github.com/laohur/bigsort
Author: laohur
Author-email: laohur@gmail.com
License: [Anti-996 License](https: // github.com/996icu/996.ICU/blob/master/LICENSE)
Keywords: bigsort,sort,external sort,big file sort
Requires-Python: >=3.0
Description-Content-Type: text/markdown

# bigsort
sort or shuffle big file/stream

## usage
> pip install bigsort 

### shell

```shell
bigsort -i  readme.md -o sorted.txt  # default sort in increase 
cat readme.md |  bigsort --sortType=d --unique=1 > sorted.txt  # sort pipe, order in descend, unique
bigsort -i sorted.txt -c ">"  # check order
bigsort -i  readme.md --unique=1   | bigsort --sortType=R > sorted.txt   # unique and shufle 
seq 0  10123456789  | bigsort --sortType=d -T "./"  -n 100   # just try sort 10^10 numbers and take first 100 lines
```

### python

```python
import os
from bigsort import BigSort,bigsort,sortFile,check,bisect

# sort in file
sortFile("cat readme.md","sorted.txt",budget=0.8)
check(open("sorted.txt"),"<=")

# sort in pipe
bigsort(os.popen("cat readme.md"),open("sorted.txt",'w',buffering=1024*1024),unique=1,sortType="d",budget=0.8)
check(open("sorted.txt"),">")
```

## [custom sort](demo.py)
