naming
Object-oriented names for the digital era.
naming provides an interface for dealing with naming conventions; from
defining them, to identifying names and creating new ones.
Installation
naming is available for Python 3.8+ via PyPI.
$ pip install naming
Example
Please refer to the documentation walkthrough for details on contents and usage.
>>> import naming
>>> class NameFileConvention(naming.Name, naming.File):
... config = dict(first=r'\w+', last=r'\w+', number=r'\d+')
...
>>> name = NameFileConvention('john doe 07.jpg')
>>> name.last
'doe'
>>> name.number
'07'
>>> name.get(first='jane', number=99) # returns new name string
'jane doe 99.jpg'
>>> name.last = 'connor' # mutates current name
>>> name
NameFileConvention("john connor 07.jpg")
>>> name.number = 'not_a_number'
...
ValueError: Can't set field 'number' with invalid value 'not a number' on 'NameFileConvention("john doe 07.jpg")'. A valid field value should match pattern: '\d+'
Metadata
Release files for naming 0.7.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 | |
|---|---|---|---|---|
| naming-0.7.1.tar.gz | 14.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| naming-0.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.3 kB
Release files / naming-0.7.1.tar.gz
| Download URL | naming-0.7.1.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
847dbe7391a7c065bd31352b6a5f7a84b9bf743478049f16c1c1a30f065873d1
|
|
BLAKE2b-256 checksum How to use checksums |
ad86324f424668cecddece79df4d9d67798dee4779ff2f9185c1f07b34717e6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / naming-0.7.1-py3-none-any.whl
| Download URL | naming-0.7.1-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
914b52e9804432bd7f585f3b57ab719bb065a28c3bc6e1fb88c06da5250a0ff5
|
|
BLAKE2b-256 checksum How to use checksums |
251bc6fff92c6e5bf2b553c3600febb305592938e4ab444a8c142ced563a4e12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for naming 0.7.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.