dsnparse
parse dsn urls
Decision gist · record as of 2026-08-14
Yes, if you need to parse DSN or connection URL strings. It is lightweight, has no dependencies, and carries a permissive MIT license. The aging maintenance status (305 days since last release) is a minor concern for a stable, narrow-scope utility, but the lack of recent vulnerabilities and active repository suggest it remains reliable for its intended purpose.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with no runtime dependencies.
- Maintenance status is aging—last release was 305 days ago, though the repository remains active and the package is marked Production/Stable.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it safe for both open-source and commercial projects.
last release 2025-10-13 (305 days) · last repo commit 2025-10-13 · 21 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 547,535 downloads/mo, #6,068 on PyPI
Alternatives
Verify before relying
pip install dsnparse
import dsnparse
dsn = "prom.interface.postgres.Interface://testuser:testpw@localhost:1234/testdb"
r = dsnparse.parse(dsn)
print(r.scheme, r.username, r.host, r.port, r.paths)- Whether the package handles all modern DSN formats and edge cases in real-world deployments
- Performance characteristics when parsing very large or complex DSN strings
What it is and what it does
dsnparse is a lightweight URL parser specialized for DSN (Data Source Name) connection strings. It breaks down a DSN like `scheme://user:pass@host:port/path?query=val#fragment` into its constituent parts—scheme, username, password, host, port, paths, and query parameters—similar to Python's standard `urllib.parse.urlparse` but tailored for database and service connection URLs. The package supports custom result classes, allowing you to extend parsed results with domain-specific properties, and can read DSN values from environment variables.
It has no runtime dependencies and requires Python 3.10 or later. The interface is intentionally kept simple and familiar to developers who have used urlparse, making it a drop-in solution for projects that need to parse and extract configuration from connection strings without pulling in heavier frameworks.
Use it for
- Extract database credentials and connection details from a DSN string for establishing connections in application startup code.
- Read and parse a DSN from an environment variable to configure database or service endpoints in containerized deployments.
- Build custom result objects that extend parsed DSN data with application-specific properties or validation logic.
- Parse non-standard or custom scheme DSNs (e.g., `prom.interface.postgres.Interface://...`) for plugin-based architectures.
- Normalize and validate connection strings across different environments by decomposing them into individual components.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to parse DSN or connection URL strings.
It is lightweight, has no dependencies, and carries a permissive MIT license. The aging maintenance status (305 days since last release) is a minor concern for a stable, narrow-scope utility, but the lack of recent vulnerabilities and active repository suggest it remains reliable for its intended purpose.
Install
dsnparse on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging—last release was 305 days ago, though the repository remains active and the package is marked Production/Stable.
Requires Python 3.10 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it safe for both open-source and commercial projects.
Quickstart
pip install dsnparse
import dsnparse
dsn = "prom.interface.postgres.Interface://testuser:testpw@localhost:1234/testdb"
r = dsnparse.parse(dsn)
print(r.scheme, r.username, r.host, r.port, r.paths)
Verify before relying
- Whether the package handles all modern DSN formats and edge cases in real-world deployments
- Performance characteristics when parsing very large or complex DSN strings
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 305 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 547,535 / month, #6,068 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: PluginsIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: dsnparse-0.4.0-py3-none-any.whl
Tags
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 › “dsn url parser”
- dsnparseParses DSN (Data Source Name) connection URL strings into structured…
- flufl.bounceDetects and extracts original bouncing email addresses from bounce…
- can-adaParses and manipulates URLs according to the WHATWG specification,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
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.
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.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also dj-database-url · urlpath · pyfaup-rs · url-normalize · dj-email-url · ipython-sql · arcp · django-cache-url · whoisit · Redis-Sentinel-Url