directoryshard
Shard filenames into subdirectories.
A large number of files in a single directory can make operations such as listing or browsing cumbersome. Splitting files into subdirectories alleviates this.
API
Two methods are provided:
def shardprefix(filename: str) -> str:
"""Return a 2 character alphanumeric string by deterministically hashing filename"""
def sharded(filepath: Path) -> Path:
"""Return path sharded into subdirectory"""
Class
ShardedDirectory provides getting file paths from a directory:
sharded_tmp = ShardedDirectory('/tmp)
print(sharded_tmp.filepath('python'))
return /tmp/ep.python.
Metadata
Release files for directoryshard 1.0
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 |
|---|---|---|---|---|
| directoryshard-1.0.tar.gz | 2.9 kB | Without provenance | Details for directoryshard-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| directoryshard-1.0-py3-none-any.whl | Python 3 | none | any | Details for directoryshard-1.0-py3-none-any.whl |
Total release size: 6.6 kB
Release files / directoryshard-1.0.tar.gz
| Download URL | directoryshard-1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12d9c4120326f3832d992670eeea14e6251ad816ee6d828428c0052471b196bc
|
|
BLAKE2b-256 checksum How to use checksums |
2f87b5a700ad99c3e1e598b6b7da1c776e42c644c8d8af2ecde823469aca6f71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/65.6.3 requests-toolbelt/0.8.0 tqdm/4.64.1 CPython/3.8.10
|
Release files / directoryshard-1.0-py3-none-any.whl
| Download URL | directoryshard-1.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
798197bb89e7bbc145d0fc5822b20abcee7a55a5bb06a2ddd26715d0ea9646f0
|
|
BLAKE2b-256 checksum How to use checksums |
a1dbe2d3f3583e1d25d48f33d1fad304f236b208421e21785925bcaea106894b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/65.6.3 requests-toolbelt/0.8.0 tqdm/4.64.1 CPython/3.8.10
|
Security for directoryshard 1.0
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.