Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extended-data-types

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extended-data-types

Extended functionality for data types

  • 3.1.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

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.

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc