1. Write a class with custom __getitem__ and __getattr__ methods
2. Use a template system like Django or Jinja that implements this in certain situations
3. Use a library like https://pypi.org/project/python-box/
1. Write a class with custom __getitem__ and __getattr__ methods
2. Use a template system like Django or Jinja that implements this in certain situations
3. Use a library like https://pypi.org/project/python-box/