naming


Namenaming JSON
Version 0.7.1 PyPI version JSON
download
home_pagehttps://github.com/chrizzFTD/naming
SummaryObject-oriented names for the digital era.
upload_time2024-04-14 02:02:49
maintainerNone
docs_urlNone
authorChristian López Barrón
requires_pythonNone
licenseNone
keywords name names naming convention configuration config cfg regex
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # naming
[![Build Status](https://travis-ci.org/chrizzFTD/naming.svg?branch=master)](https://travis-ci.org/chrizzFTD/naming)
[![Coverage Status](https://coveralls.io/repos/github/chrizzFTD/naming/badge.svg?branch=master)](https://coveralls.io/github/chrizzFTD/naming?branch=master)
[![Documentation Status](https://readthedocs.org/projects/naming/badge/?version=latest)](https://naming.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/naming.svg)](https://badge.fury.io/py/naming)
[![PyPI](https://img.shields.io/pypi/pyversions/naming.svg)](https://pypi.python.org/pypi/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.

```bash
$ pip install naming
```

## Example

Please refer to the [documentation walkthrough](http://naming.readthedocs.io/en/latest/) for details on contents and usage.

```python
>>> 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+'
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/chrizzFTD/naming",
    "name": "naming",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "name names naming convention configuration config cfg regex",
    "author": "Christian L\u00f3pez Barr\u00f3n",
    "author_email": "chris.gfz@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ad/86/324f424668cecddece79df4d9d67798dee4779ff2f9185c1f07b34717e6f/naming-0.7.1.tar.gz",
    "platform": null,
    "description": "# naming\r\n[![Build Status](https://travis-ci.org/chrizzFTD/naming.svg?branch=master)](https://travis-ci.org/chrizzFTD/naming)\r\n[![Coverage Status](https://coveralls.io/repos/github/chrizzFTD/naming/badge.svg?branch=master)](https://coveralls.io/github/chrizzFTD/naming?branch=master)\r\n[![Documentation Status](https://readthedocs.org/projects/naming/badge/?version=latest)](https://naming.readthedocs.io/en/latest/?badge=latest)\r\n[![PyPI version](https://badge.fury.io/py/naming.svg)](https://badge.fury.io/py/naming)\r\n[![PyPI](https://img.shields.io/pypi/pyversions/naming.svg)](https://pypi.python.org/pypi/naming)\r\n\r\n> Object-oriented names for the digital era.\r\n\r\n`naming` provides an interface for dealing with naming conventions; from\r\ndefining them, to identifying names and creating new ones.\r\n    \r\n## Installation\r\n\r\n`naming` is available for Python 3.8+ via PyPI.\r\n\r\n```bash\r\n$ pip install naming\r\n```\r\n\r\n## Example\r\n\r\nPlease refer to the [documentation walkthrough](http://naming.readthedocs.io/en/latest/) for details on contents and usage.\r\n\r\n```python\r\n>>> import naming\r\n>>> class NameFileConvention(naming.Name, naming.File):\r\n...     config = dict(first=r'\\w+', last=r'\\w+', number=r'\\d+')\r\n...\r\n>>> name = NameFileConvention('john doe 07.jpg')\r\n>>> name.last\r\n'doe'\r\n>>> name.number\r\n'07'\r\n>>> name.get(first='jane', number=99)  # returns new name string\r\n'jane doe 99.jpg'\r\n>>> name.last = 'connor'  # mutates current name\r\n>>> name\r\nNameFileConvention(\"john connor 07.jpg\")\r\n>>> name.number = 'not_a_number'\r\n...\r\nValueError: 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+'\r\n```\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Object-oriented names for the digital era.",
    "version": "0.7.1",
    "project_urls": {
        "Homepage": "https://github.com/chrizzFTD/naming"
    },
    "split_keywords": [
        "name",
        "names",
        "naming",
        "convention",
        "configuration",
        "config",
        "cfg",
        "regex"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "251bc6fff92c6e5bf2b553c3600febb305592938e4ab444a8c142ced563a4e12",
                "md5": "c9a78c4b46d21debb87eee99fca7dd0c",
                "sha256": "914b52e9804432bd7f585f3b57ab719bb065a28c3bc6e1fb88c06da5250a0ff5"
            },
            "downloads": -1,
            "filename": "naming-0.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c9a78c4b46d21debb87eee99fca7dd0c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9617,
            "upload_time": "2024-04-14T02:02:47",
            "upload_time_iso_8601": "2024-04-14T02:02:47.215309Z",
            "url": "https://files.pythonhosted.org/packages/25/1b/c6fff92c6e5bf2b553c3600febb305592938e4ab444a8c142ced563a4e12/naming-0.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad86324f424668cecddece79df4d9d67798dee4779ff2f9185c1f07b34717e6f",
                "md5": "11f7d8b8f8823955054ac44d3d1634d6",
                "sha256": "847dbe7391a7c065bd31352b6a5f7a84b9bf743478049f16c1c1a30f065873d1"
            },
            "downloads": -1,
            "filename": "naming-0.7.1.tar.gz",
            "has_sig": false,
            "md5_digest": "11f7d8b8f8823955054ac44d3d1634d6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14695,
            "upload_time": "2024-04-14T02:02:49",
            "upload_time_iso_8601": "2024-04-14T02:02:49.193292Z",
            "url": "https://files.pythonhosted.org/packages/ad/86/324f424668cecddece79df4d9d67798dee4779ff2f9185c1f07b34717e6f/naming-0.7.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-14 02:02:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chrizzFTD",
    "github_project": "naming",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "naming"
}
        
Elapsed time: 0.22687s