Skip to main content

naming

Build Status Coverage Status Documentation Status PyPI version PyPI

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.7 onwards via PyPI.

$ pip install naming

Usage

Please refer to the documentation 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.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for naming 0.6.0
File Size Uploaded Provenance Actions
naming-0.6.0.tar.gz 13.6 kB Without provenance Details for naming-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for naming 0.6.0
File Interpreter ABI Platform Actions
naming-0.6.0-py3-none-any.whl Python 3 none any Details for naming-0.6.0-py3-none-any.whl

Total release size: 39.7 kB

Release files / naming-0.6.0.tar.gz

Download URL naming-0.6.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1409f5261d8761d41ecb29edc14045e1bb22cd7db43ed9f5b76994de79f3249d
BLAKE2b-256 checksum
How to use checksums
f31fd244ed738923e27215cf29232cdcdf31d74519ef4a2fb287613074745326
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

Release files / naming-0.6.0-py3-none-any.whl

Download URL naming-0.6.0-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0970aee13f9137bce564b8dfc17218c0a64c8009e5f0cca9015791813b6bd039
BLAKE2b-256 checksum
How to use checksums
1d22bc642d2dbd249f03b35dd4637291c74489fed90c751896607bc69c70f03d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

Security for naming 0.6.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page