Giter VIP home page Giter VIP logo

entity_addict's Introduction

python version PyPI version Downloads Status Downloads License pypi format Maintenance

entity_addict

An extended version of addict.

It can be very useful as a decorator. It can be converted to Dict when the function returns a value. Can support a single dictionary, list dictionary, or multi deep dictionary of list.

install via pip

pip install entiry_addict

examples:

from entity_addict import entity_addict
    
@entity_addict
def get_dict_data_a():
    return {"key_name": "value"}

data = get_dict_data_a()
print(data.key_name)

@entity_addict
def get_dict_data_b():
    return [{"key_name": "value"}]

for data in get_dict_data_b():
    print(data.key_name)

@entity_addict
def get_dict_data_c():
    return [
        {"key_name": "value"},
        {"key": [{"sub_key1": 1}, {"sub_key2": 2}]}
    ]
data = get_dict_data_c()
print(data[1].key[1].sub_key2)

entity_addict's People

Contributors

actions-user avatar github-actions[bot] avatar loonghao avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

entity_addict's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency isort to v5.13.2
  • chore(deps): update dependency mypy to v0.991
  • chore(deps): update dependency pre-commit to v2.21.0
  • chore(deps): update dependency tox to v3.28.0
  • chore(deps): update dependency flake8 to v7
  • chore(deps): update dependency pytest to v8
  • chore(deps): update dependency pytest-cov to v5
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/bumpversion.yml
  • actions/checkout v3
.github/workflows/python-publish.yml
  • actions/checkout v3
  • actions/setup-python v1
.github/workflows/pythonpackage.yml
  • actions/checkout v3
  • actions/setup-python v1
  • codecov/codecov-action v1.5.2
pep621
pyproject.toml
  • poetry-core >=1.0.0
poetry
pyproject.toml
  • python ^3.6.1
  • addict ^2.4.0
  • pytest ^5.0
  • flake8 ^3.6
  • pytest-cov ^3.0
  • codecov ^2.0
  • mypy ^0.770
  • isort ^5.7.0
  • pydocstyle ^5.0.2
  • pre-commit ^2.6.0
  • tox ^3.23.1
  • commitizen ^2.20.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.