This project contains utility functions for GitHub organization client operations and their corresponding unit tests.
.
├── README.md
├── utils.py # Utility functions module
└── test_utils.py # Unit tests for utils module
Contains generic utility functions including:
access_nested_map: Access nested dictionaries/mappings using a key pathget_json: Retrieve JSON data from remote URLsmemoize: Decorator for memoizing method results
Contains unit tests for the utility functions using Python's unittest framework and parameterized testing.
- Python 3.7 (Ubuntu 18.04 LTS)
- All files follow pycodestyle (version 2.5)
- All functions and classes are properly documented
- All functions are type-annotated
- All files are executable and end with a newline
requests: For HTTP operationsparameterized: For parameterized testingunittest: For unit testing (built-in)
python3 test_utils.pyfrom utils import access_nested_map
nested_data = {"a": {"b": {"c": 1}}}
result = access_nested_map(nested_data, ["a", "b", "c"])
print(result) # Output: 1The project includes comprehensive unit tests for the access_nested_map function, testing various nested dictionary structures and access paths to ensure reliable functionality.
All code follows PEP 8 guidelines and pycodestyle standards for consistent formatting and readability.