Skip to main content

Extended functionality for data types

Project description

Extended Data Types

Extended Data Types Logo

🐍 Supercharge your Python data types! 🚀

CI Status Documentation Status PyPI Package latest release Supported versions

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.

Project Goals

  • Provide a reliable, typed utility layer for working with common serialization formats (YAML, JSON, TOML, HCL) without sacrificing readability or ergonomics.
  • Offer safe helpers for file-system aware workflows, including path handling and Git repository discovery, while keeping platform differences in mind.
  • Maintain a modern, well-tested codebase backed by automated CI/CD that validates packaging, linting, typing, coverage, and documentation builds.

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

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

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 documentation.

Contributing

Contributions are welcome! Please see the Contributing Guidelines for more information.

Credit

Extended Data Types is written and maintained by Jon Bogaty.

Project Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extended_data_types-202511.8.0.tar.gz (64.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extended_data_types-202511.8.0-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

Details for the file extended_data_types-202511.8.0.tar.gz.

File metadata

File hashes

Hashes for extended_data_types-202511.8.0.tar.gz
Algorithm Hash digest
SHA256 88540ac8518de58b2671e7539ecb5d080a442de1ef2c625ada28cd28f9ca3378
MD5 e9a2b70372a9e58a03e3bbe1eeedca24
BLAKE2b-256 4c0f7015156b2dea0c79c08b6b0c63fcb3d4d0b6d1dd005b35ac5dd7d08e8e27

See more details on using hashes here.

File details

Details for the file extended_data_types-202511.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for extended_data_types-202511.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22df87692db1efdd6975625213d583c6fdd3a97599a24d2b9d11e6c504ba1247
MD5 6c093fb90c90f4e893d5b9e08c3a295a
BLAKE2b-256 ac0594a9b08befafba9f50276945193842f450629cd59e10bfa5d08845dab88b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page