Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 595 Bytes

README.md

File metadata and controls

26 lines (22 loc) · 595 Bytes

Working with files in Python for humans

# select all the files (done)
files = FileAlchemy('../something')
for f in files:
    print(f)

# filter fiels
files = FileAlchemy('../something').filter(
                extension='jpeg', # done
                created_at<=datetime(...),
                size>'10MB',
                modified_at<=datetime(...),
            )

# move files (done)
fiels = FileAlchemy('../something')
            .filter(
                extension='jpeg',
            ).move('../else')

# delete files (done)
fiels = FileAlchemy('../something').delete()