Create a database of all the items of a directory
Installation
Install it with pip: pip install files-db2
Usage
Create the database:
import files_db
db = files_db.create(<your src>)
It is a table, a subclass of pandas dataframe, the columns are the following:
- name: name of the item, relative path
- size: size in bytes
- n: number of items and sub-items
- ctime: creation time
- mtime: modification time
- atime: last access time
- level: how deep the item is from the root
- nls: number of items (-1 if file)
You can use pandas native function sort_values
db_size = db.sort_values("size",ascending=False) # Get which items takes the most place
db_timeline = db.sort_values("ctime") # Get a timeline of items by their creation date
Other features:
db_ls = db.ls() # extract all root items
db_sub = db("foo/bar") # navigate in the database by getting into 1 specific item
db.only_dirs() # select only the dirs
db.only_files() # select only the files
db.pin_columns("nls") # pin a column(s) when you're more interested into a particular one
db.to_csv(<file>) # Export into a file
db = files_db.read_csv(<file>) # Import a database of file
And then you can save it into a file by db.to_csv(<file>) simply like pandas, and use a tool like Data Wrangler or Excel to view and analyse this data freely.
Metadata
Release files for files-db2 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| files_db2-0.2.tar.gz | 60.9 kB | Without provenance | Details for files_db2-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| files_db2-0.2-py3-none-any.whl | Python 3 | none | any | Details for files_db2-0.2-py3-none-any.whl |
Total release size: 64.5 kB
Release files / files_db2-0.2.tar.gz
| Download URL | files_db2-0.2.tar.gz |
|---|---|
| Size | 60.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36924227469911a639cc12194c776cb93ff485ad28f75b225c9a3824bbf77320
|
|
BLAKE2b-256 checksum How to use checksums |
0d1468bed56c2072836bc636c10418f443e5a0ff880633ab6501c06d816f15a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / files_db2-0.2-py3-none-any.whl
| Download URL | files_db2-0.2-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c49ced881a78aba13ccc7adb141a3a373f9e57142f38c4a46d7e197566c05de
|
|
BLAKE2b-256 checksum How to use checksums |
6fbe461d3dc85740bc897fb69bd3f10fc0f35d220c2f878ebd308da8b230551b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for files-db2 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.