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.7.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.7.0
File Size Uploaded Provenance Actions
naming-0.7.0.tar.gz 14.3 kB Without provenance Details for naming-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 28.8 kB

Release files / naming-0.7.0.tar.gz

Download URL naming-0.7.0.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6fd6f15e13298e22f5114aca74719a7540ec1c83132f526c6c7b6217e1bfb28b
BLAKE2b-256 checksum
How to use checksums
3ae3b20b67acd954bbb6e77bd9bd6109938ab2104b4800185c51d382726330e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.0

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

Download URL naming-0.7.0-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8af49f7d23775ee9235be68ee5626eba8bbee4c99baae1e37b311ecf0a328eab
BLAKE2b-256 checksum
How to use checksums
198d305e27e410bbd96ce2eec00746e556ae2fdd2a494237652600a000b50659
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.0

Security for naming 0.7.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