namefile
Install
pip install namefile
Usage
from namefile import namefile, parse
filename = namefile(
stem='glue-cola',
suffix='csv',
tags=('classification', 'processed'),
date=True,
version='1.2.0.post1'
)
# filename: 'glue_cola-classification-processed.20220829.1.2.0.post1-v.csv'
fileinfo = parse(filename)
# fileinfo: FileInfo(stem='glue_cola', suffix='csv', tags={'classification', 'processed'}, date=datetime.datetime(2022, 8, 29, 0, 0), version=<Version('1.2.0.post1')>)
assert filename == fileinfo.name() == str(fileinfo)
Development
conda env
conda env create
poetry
poetry install
Makefile
# 帮助文档
make help
# 格式化代码
make style
# 静态检查
make lint
...
Metadata
Release files for namefile 0.3.1.post0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| namefile-0.3.1.post0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| namefile-0.3.1.post0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / namefile-0.3.1.post0.tar.gz
| Download URL | namefile-0.3.1.post0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73d8390e6d304e8a4055f5d9ef74f1e143fd060024775ceb3b9d7c4dc1360ffc
|
|
BLAKE2b-256 checksum How to use checksums |
52cc1b57712f8fe890cbb07df6d078975b8554b70624812b7009eb51a6d2e3ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0b2 CPython/3.9.1 Darwin/21.3.0
|
Release files / namefile-0.3.1.post0-py3-none-any.whl
| Download URL | namefile-0.3.1.post0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0d1599e72b4ec8fc1bf7f8e9be433ebdc1228d8eaaa59e1cdf95389ae38bf76
|
|
BLAKE2b-256 checksum How to use checksums |
7913c04f4dbc264fbcc22a29c591cf72be296569aaa60009e5bfadabf8c52a5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0b2 CPython/3.9.1 Darwin/21.3.0
|