$npx skillfedfor your agent

python-datauri

A li'l class for data URI manipulation in Python

With conditionsPyPI InternetReleased Jan 2025328.1K downloads / moUnlicensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_datauri-3.0.2-py2.py3-none-any.whl
v3.0.2 · released 2025-01-03 · 2 runtime deps: cached-property, typing_extensions

Yes, if you work with data URIs regularly. The package is stable, permissively licensed, has no security vulnerabilities, and requires minimal dependencies. Dormant maintenance is not a concern for a focused utility that does one thing well. Install it when you need to parse or create data URIs; skip it if you only handle them occasionally or can use simpler string manipulation.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with only two lightweight runtime dependencies (cached-property and typing_extensions).
  • Dormant maintenance since 588 days ago, though the repository remains active with a recent commit on 2025-01-03.

License · maintenance · safety

Unlicense (permissive) — Released under the Unlicense, a permissive public-domain equivalent that places no restrictions on use, modification, or distribution.

last release 2025-01-03 (588 days) · last repo commit 2025-01-03 · 58 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 328,132 downloads/mo, #7,559 on PyPI

Verify before relying

from datauri import DataURI

# Parse a data URI
uri = DataURI('data:text/plain;charset=utf-8;base64,VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu')
print(uri.mimetype)  # 'text/plain'
print(uri.data)      # b'The quick brown fox jumped over the lazy dog.'

# Create from string
made = DataURI.make('text/plain', charset='us-ascii', base64=True, data='This is a message.')
print(str(made))     # 'data:text/plain;charset=us-ascii;base64,...'
  • Whether the package handles all valid data URIs or only the subset described as 'most useful'
  • Performance characteristics with large embedded data or many URI operations
  • Whether Pydantic integration requires additional setup beyond the example shown
Same gist for agents: .md · .json

What it is and what it does

python-datauri is a lightweight class for parsing and creating data URIs—the inline data scheme used to embed files, images, and text directly in URLs. It handles the common case of extracting or encoding a mimetype, charset, and base64 flag, then provides access to the decoded payload as bytes or text. The package is intentionally minimal and does not attempt to validate all edge cases; it focuses on the practical subset most developers need.

You use it to parse existing data URIs into their components (mimetype, charset, raw data) or to construct new ones from strings or files. It integrates with Pydantic for type validation in data models. The implementation depends only on cached-property and typing_extensions, making it a low-friction addition to any project that needs to work with embedded data URIs.

Use it for

  • Extract image data from a data URI embedded in HTML or JSON to save to disk or process
  • Encode a file as a data URI for embedding in web pages or API responses
  • Parse and validate data URIs in Pydantic models for REST APIs that accept inline uploads
  • Convert between string and binary representations of embedded data without external libraries
  • Build data URIs programmatically for testing or generating HTML with inline assets

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you work with data URIs regularly.

The package is stable, permissively licensed, has no security vulnerabilities, and requires minimal dependencies. Dormant maintenance is not a concern for a focused utility that does one thing well. Install it when you need to parse or create data URIs; skip it if you only handle them occasionally or can use simpler string manipulation.

Install

python-datauri on PyPI

Before you install

Low friction: pure Python wheel with only two lightweight runtime dependencies (cached-property and typing_extensions). Dormant maintenance since 588 days ago, though the repository remains active with a recent commit on 2025-01-03.

License in practice

Released under the Unlicense, a permissive public-domain equivalent that places no restrictions on use, modification, or distribution.

Quickstart

from datauri import DataURI

# Parse a data URI
uri = DataURI('data:text/plain;charset=utf-8;base64,VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu')
print(uri.mimetype)  # 'text/plain'
print(uri.data)      # b'The quick brown fox jumped over the lazy dog.'

# Create from string
made = DataURI.make('text/plain', charset='us-ascii', base64=True, data='This is a message.')
print(str(made))     # 'data:text/plain;charset=us-ascii;base64,...'

Verify before relying

  • Whether the package handles all valid data URIs or only the subset described as 'most useful'
  • Performance characteristics with large embedded data or many URI operations
  • Whether Pydantic integration requires additional setup beyond the example shown

Package facts

LicenseUnlicense permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
cached-propertytyping_extensions
MaintenanceDormant 588 days since the last release
Last repo commit
First released
Downloads328,132 / month, #7,559 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaLicense :: OSI Approved :: The Unlicense (Unlicense)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: python_datauri-3.0.2-py2.py3-none-any.whl

Tags

Capabilities
data uri parsingdata uri encodingbase64 data urimimetype extractioninline data uridata url handlinguri serialization
Topics
data-uribase64-encodingweb-utilities

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “data uri parsing”

  • python-datauriParses and creates data URIs, extracting or encoding mimetype,…
  • lazr.uriParse, manipulate, and generate URIs with a self-contained library…
  • uritoolsParses, validates, and composes URIs and URI references according to…

Give your agent the search over MCP, or paste the wish link into any chat.

More Internet packages

botocore Worth it
PyPI · Internet · released Aug 2026

Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.

Install it if you need programmatic access to AWS services.

permissive licensepure Python · 3.10+
1.5Bdownloads / mo
aiobotocore Worth it
PyPI · Internet · released Aug 2026

Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.

Install it if you need to call AWS services from async Python code; it is the standard way to do so.

Apache-2.0pure Python · 3.10+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
filelock Worth it
PyPI · Libraries · released Aug 2026

Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.

MITpure Python · 3.10+
717.1Mdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
googleapis-common-protos Worth it
PyPI · Internet · released Aug 2026

Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.

Apache-2.0pure Python · 3.10+
513.7Mdownloads / mo

See also base2048 · lazr.uri · prison · rison · rfc3986 · webencodings · uritools · arcp · base64io · pyuri