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.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)

Source distribution for naming 0.7.1
File Size Uploaded
naming-0.7.1.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for naming 0.7.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.1

1 release file

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