Commit ab657379 authored by Janos's avatar Janos 🕴
Browse files

Merge branch 'rename-package' into 'main'

rename package to "dictat"

See merge request !2
parents ec00b688 9b19d98d
Pipeline #486436768 passed with stages
in 5 minutes and 2 seconds
......@@ -18,7 +18,7 @@ coverage:
before_script:
- python3 -m pip install -r .requirements-dev.txt
script:
- pytest test --cov=adict
- pytest test --cov=dictat
coverage: '/^TOTAL.+?(\d+\%)$/'
build:
......
[![Latest Release](https://gitlab.com/janoskut/adict/-/badges/release.svg)](https://gitlab.com/janoskut/adict/-/releases)
[![pipeline status](https://gitlab.com/janoskut/adict/badges/main/pipeline.svg)](https://gitlab.com/janoskut/adict/-/commits/main)
[![coverage report](https://gitlab.com/janoskut/adict/badges/main/coverage.svg)](https://gitlab.com/janoskut/adict/-/commits/main)
[![](https://img.shields.io/pypi/v/dictat.svg?maxAge=3600)](https://pypi.org/project/dictat/)
[![Latest Release](https://gitlab.com/janoskut/dictat/-/badges/release.svg)](https://gitlab.com/janoskut/dictat/-/releases)
[![pipeline status](https://gitlab.com/janoskut/dictat/badges/main/pipeline.svg)](https://gitlab.com/janoskut/dictat/-/commits/main)
[![coverage report](https://gitlab.com/janoskut/dictat/badges/main/coverage.svg)](https://gitlab.com/janoskut/dictat/-/commits/main)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)
[![](https://img.shields.io/badge/dependencies-none-informational)]()
`Adict` is an attribute-accessible dynamic dict wrapper, which allows to access dict items in
attribute notation (".") and allows friendly checks for non-existing items.
`Adict` is not an _extension_ of Python's `dict` (as for example
[adict](https://test.pypi.org/project/adict/) and [dict](https://test.pypi.org/project/dict/)),
but a _wrapper_ around `dict` objects. This allows to use attribute syntax not only for objects
created using the `Adict()` constructor, but also for child dictionaries, which are automatically
wrapped into an `Adict` when they're returned.
# Features
- Default `dict` behavior
- Full wrapping of nested `dict`s
- Fail-safe attribute notation (`adict.key`) doesn't raise `KeyError`
- Supports nested dicts
- Supports JSON encoding
......@@ -18,14 +26,14 @@ attribute notation (".") and allows friendly checks for non-existing items.
# Installation
```sh
pip install adict
pip install dictat
```
# Examples
```py
from adict import Adict
from dictat import Adict
dict1 = Adict()
print('noob' in dict1) # False
......@@ -49,7 +57,7 @@ print(dict3.sub.you) # "noob', nested attribute notation
## JSON encoding
```py
from adict import Adict, JsonEncoder
from dictat import Adict, JsonEncoder
import json
import pathlib
......
import setuptools
setuptools.setup(
name='adict',
name='dictat',
version='1.0.0',
description='Adict is an attribute-accessible dynamic dictionary wrapper',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author='Janos Kutscherauer',
author_email='janoskut@gmail.com',
url='https://gitlab.com/janoskut/adict',
url='https://gitlab.com/janoskut/dictat',
license_files = ['UNLICENSE'],
packages=setuptools.find_packages(),
install_requires=[],
......
"""`pytest` unit tests for module `adict` and it's classes."""
"""`pytest` unit tests for module `dictat` and it's classes."""
# pylint: disable=redefined-outer-name
# pylint: disable=missing-function-docstring
......@@ -8,7 +8,7 @@ import json
import pytest
from adict import Adict, JsonEncoder
from dictat import Adict, JsonEncoder
@pytest.fixture
......
......@@ -4,8 +4,8 @@ envlist = py{37,38,39,310},py38-{test,type,lint}
skip_missing_interpreters = true
[base]
module_dir = adict
lint_paths = adict test
module_dir = dictat
lint_paths = dictat test
unittests_dir = test
coverage_dir = htmlcov
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment