fptokens
A library for tokenisable filename paths
Installation
To install fptokens, type:
$ pip install fptokens
Getting Started
To get started with fptokens, type:
>>> import fptokens as fpt
To create a file name, type:
>>> filename = fpt.Filename(root='/Users/demo/Desktop',
folders=['assets', '$colors$'],
base=['asset', '$colors$', '1200px'])
This created a file name with default settings, _ as the separator, jpg as the extension and $ as the escape character for the tokens.
To parse and convert the tokens of the file name to actual tokens, type:
>>> filename.parse()
To get the results of the parsing, type:
>>> print filename.tokens
>>> [<Token: $color$>]
The list of tokens could now be used to create permutations of the tokenised file name for example for batch output of image assets.
Once tokens have been replaced with real-world data to create permutations, the relevant folders can be created by typing:
>>> filename.make()
Metadata
Release files for fptokens 0.1.1
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 |
|---|---|---|---|---|
| fptokens-0.1.1.tar.gz | 13.6 kB | Without provenance | Details for fptokens-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fptokens-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for fptokens-0.1.1-py2.py3-none-any.whl |
Total release size: 20.0 kB
Release files / fptokens-0.1.1.tar.gz
| Download URL | fptokens-0.1.1.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5254cb6cae5f3e26552b94f8910b23de0babfd6082688180284326edcbd8fc2c
|
|
BLAKE2b-256 checksum How to use checksums |
0a1e26d26df8e6592cf1d4faae416a2b78b4325593a44ba8f2aa39ef2a71f081
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / fptokens-0.1.1-py2.py3-none-any.whl
| Download URL | fptokens-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
03ec40d1594b238ffcc1ffb0c991ac38471406b6024a8dffe9aa3087409609c7
|
|
BLAKE2b-256 checksum How to use checksums |
8f85554fa379ca0e8e2311c7d66a1e62133d432d52504b8231856e558d863a56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for fptokens 0.1.1
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.