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.6 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.5.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.5.1
File Size Uploaded Provenance Actions
naming-0.5.1.tar.gz 13.1 kB Without provenance Details for naming-0.5.1.tar.gz

Built distribution (wheel)

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

Total release size: 38.7 kB

Release files / naming-0.5.1.tar.gz

Download URL naming-0.5.1.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8066f4b378f546af9e2b98084cd4fb1fb38181d50ef21979bde291f8f3aa3c4e
BLAKE2b-256 checksum
How to use checksums
90714b971e6c7c151d38ba647b0b1e91d59b10fa992215f19ce087bed662eedb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

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

Download URL naming-0.5.1-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b594e929b7b39047758dcf450f7c440c56e98cc7141363ef7dbb7c489fb46600
BLAKE2b-256 checksum
How to use checksums
4ee81004113ffe634feb4bde7d4aac3c7007bd5ad6a386f2278f66317bce1728
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

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

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