PylpRename
Information
pylprename is a plugin for Pylp that rename files in a stream.
Installation
Install pylprename with pip:
pip install pylprename
If you don’t have Python Scripts folder in your PATH, you can run also:
python -m pip install pylprename
Usage
import pylp
from pylprename import rename
# Rename with a string
pylp.src('src/main/text/hello.txt')
.pipe(rename('ciao/goodbye.md'))
.pipe(pylp.dest('dist')) # ./dist/ciao/goodbye.md
# Rename with a function
pylp.src('src/main/text/hello.txt')
.pipe(rename(lambda n:
n.replace('ell', 'all')
))
.pipe(pylp.dest('dist')) # ./dist/hallo.txt
# Rename with some values (all values are optional)
pylp.src('src/main/text/hello.txt')
.pipe(rename(
dirname='md/ciao',
basename='aloha',
prefix='bonjour-',
suffix='-hola',
ext='.md'
))
.pipe(pylp.dest('dist')) # ./dist/md/ciao/bonjour-aloha-hola.md
Notes
basename is the filename without the extension
ext is the file extension including the ‘.’
Metadata
Release files for pylprename 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylprename-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pylprename-0.1.1-py3-none-any.whl |
Release files / pylprename-0.1.1-py3-none-any.whl
| Download URL | pylprename-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
251a96830cd2555d92dcc848501bd1770614f5ac9c210026287cdf3f86203faa
|
|
BLAKE2b-256 checksum How to use checksums |
a72c81dfe732e914fefaa870df8fd217bdc8c4492ea9c7721f763475fdf027ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pylprename 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.