generate file name from file info
Project description
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
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
namefile-0.3.1.post0.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file namefile-0.3.1.post0.tar.gz
.
File metadata
- Download URL: namefile-0.3.1.post0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0b2 CPython/3.9.1 Darwin/21.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d8390e6d304e8a4055f5d9ef74f1e143fd060024775ceb3b9d7c4dc1360ffc |
|
MD5 | cf0bf497468c5ae5ca7d5b05e190d318 |
|
BLAKE2b-256 | 52cc1b57712f8fe890cbb07df6d078975b8554b70624812b7009eb51a6d2e3ae |
File details
Details for the file namefile-0.3.1.post0-py3-none-any.whl
.
File metadata
- Download URL: namefile-0.3.1.post0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0b2 CPython/3.9.1 Darwin/21.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0d1599e72b4ec8fc1bf7f8e9be433ebdc1228d8eaaa59e1cdf95389ae38bf76 |
|
MD5 | 19001b3633894870398bb0e3f77434f3 |
|
BLAKE2b-256 | 7913c04f4dbc264fbcc22a29c591cf72be296569aaa60009e5bfadabf8c52a5f |