Metadata-Version: 2.4
Name: extended-data-types
Version: 5.0.3
Summary: Extended functionality for data types
Project-URL: Documentation, https://github.com/jbcom/extended-data-types#readme
Project-URL: Issues, https://github.com/jbcom/extended-data-types/issues
Project-URL: Source, https://github.com/jbcom/extended-data-types
Author-email: Jon Bogaty <jon@jonbogaty.com>
Maintainer-email: Jon Bogaty <jon@jonbogaty.com>
License: MIT
License-File: LICENSE
Keywords: python3
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: future>=1.0.0
Requires-Dist: gitpython>=3.1.0
Requires-Dist: inflection>=0.5.1
Requires-Dist: orjson>=3.10.7
Requires-Dist: python-hcl2>=4.3.4
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: requests>=2.32.3
Requires-Dist: sortedcontainers>=2.4.0
Requires-Dist: tomlkit>=0.13.2
Requires-Dist: typing-extensions>=4.3.0; python_version < '3.10'
Requires-Dist: wrapt>=1.16.0
Provides-Extra: docs
Requires-Dist: docutils>=0.17; extra == 'docs'
Requires-Dist: myst-parser>=3.0.1; extra == 'docs'
Requires-Dist: sphinx-autodoc2>=0.5.0; extra == 'docs'
Requires-Dist: sphinx<7.5,>=7.2; extra == 'docs'
Requires-Dist: sphinxawesome-theme>=5.2.0; extra == 'docs'
Provides-Extra: tests
Requires-Dist: coverage[toml]>=7.6.0; extra == 'tests'
Requires-Dist: pytest-cov>=5.0.0; extra == 'tests'
Requires-Dist: pytest-mock>=3.14.0; extra == 'tests'
Requires-Dist: pytest-xdist>=3.6.1; extra == 'tests'
Requires-Dist: pytest>=8.2.2; extra == 'tests'
Provides-Extra: typing
Requires-Dist: mypy>=1.0.0; extra == 'typing'
Requires-Dist: sortedcontainers-stubs>=2.4.2; extra == 'typing'
Requires-Dist: types-pyyaml>=6.0.12.20240724; extra == 'typing'
Description-Content-Type: text/markdown

# Extended Data Types

[![Extended Data Types Logo](docs/_static/logo.png)](https://github.com/jbcom/extended-data-types)

*🐍 Supercharge your Python data types! 🚀*

[![CI Status](https://github.com/jbcom/extended-data-types/workflows/CI/badge.svg)](https://github.com/jbcom/extended-data-types/actions?query=workflow%3ACI)
[![Documentation Status](https://readthedocs.org/projects/extended-data-types/badge/?version=latest)](https://extended-data-types.readthedocs.io/en/latest/?badge=latest)
[![PyPI Package latest release](https://img.shields.io/pypi/v/extended-data-types.svg)](https://pypi.org/project/extended-data-types/)
[![Supported versions](https://img.shields.io/pypi/pyversions/extended-data-types.svg)](https://pypi.org/project/extended-data-types/)

Extended Data Types is a Python library that provides additional functionality for Python's standard data types. It includes utilities for handling YAML, JSON, Base64, file paths, strings, lists, maps, and more.

## Key Features

- 🔒 **Base64 encoding and decoding** - Easily encode data to Base64 format with optional wrapping for export.
- 📁 **File path utilities** - Manipulate and validate file paths, check file extensions, and determine encoding types.
- 🗺️ **Extended map and list utilities** - Flatten, filter, and manipulate dictionaries and lists with ease.
- 🔍 **String matching and manipulation** - Partially match strings, convert case, and validate URLs.
- 🎛️ **Custom YAML utilities** - Handle custom YAML tags, construct YAML pairs, and represent data structures.

### Base64 Encoding

```
from extended_data_types import base64_encode

data = "Hello, world!"
encoded = base64_encode(data)
print(encoded)  # Output: SGVsbG8sIHdvcmxkIQ==
```

### File Path Utilities

```python
from extended_data_types import match_file_extensions

file_path = "example.txt"
allowed_extensions = [".txt", ".log"]
is_allowed = match_file_extensions(file_path, allowed_extensions)
print(is_allowed)  # Output: True
```

### YAML Utilities

```python
from extended_data_types import encode_yaml, decode_yaml

data = {"name": "Alice", "age": 30}
yaml_str = encode_yaml(data)
print(yaml_str)
# Output:
# name: Alice
# age: 30

decoded_data = decode_yaml(yaml_str)
print(decoded_data)  # Output: {'name': 'Alice', 'age': 30}
```

For more usage examples, see the [Usage](https://extended-data-types.readthedocs.io/en/latest/usage.md) documentation.

## Contributing

Contributions are welcome! Please see the [Contributing Guidelines](https://github.com/jbcom/extended-data-types/blob/main/CONTRIBUTING.md) for more information.

## Credit

Extended Data Types is written and maintained by [Jon Bogaty](mailto:jon@jonbogaty.com).

## Project Links

- [**Get Help**](https://stackoverflow.com/questions/tagged/extended-data-types) (use the *extended-data-types* tag on
  Stack Overflow)
- [**PyPI**](https://pypi.org/project/extended-data-types/)
- [**GitHub**](https://github.com/jbcom/extended-data-types)
- [**Documentation**](https://extended-data-types.readthedocs.io/en/latest/)
- [**Changelog**](https://github.com/jbcom/extended-data-types/tree/main/CHANGELOG.md)
