Registry / devops / pymaven-patch

pymaven-patch

JSON →
library0.3.2pypypi✓ verified 82d ago

Python library for accessing and working with Maven artifacts using Maven coordinates and dependency resolution. Version 0.3.2 is the current release, maintained by nexB as a fork/advanced patch of the original pymaven library. Release cadence is low.

pip install pymaven-patch
INSTALL
IMPORT
SIG · PYMAVEN-PATCH
P
pymaven-patch
devopspythonv0.3.2
Install
2.7s avg
Import
Disk
31MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 33.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.000s · 34MB
31MB installed
● package 31MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Artifact
from pymaven import Artifact
from pymaven import mvn
Version
from pymaven import Version
VersionRange
from pymaven import VersionRange

Create a Maven artifact coordinate and resolve its dependencies.

from pymaven import artifact, mvn # Create an artifact coordinate coord = artifact.Artifact(group_id='com.example', artifact_id='my-lib', version='1.0.0') print(f"Coordinate: {coord}") # Resolve dependencies (requires internet access to Maven Central) # This will fetch the POM and resolve transitive dependencies try: deps = mvn.resolve(coord) print(f"Number of dependencies: {len(deps)}") except Exception as e: print(f"Resolution failed: {e}")
Debug
Known issues
gotchaThe library is a fork ('pymaven-patch') with slight API differences from the original 'pymaven' package. Import 'pymaven', not 'pymaven_patch'.
fix
Use 'pip install pymaven-patch' but import as 'pymaven'.
affects: all
gotchaDependency resolution may fail silently or return incomplete results if the Maven repository is unavailable or the POM is malformed.
fix
Wrap resolution in try/except and check the returned list length for sanity.
affects: >=0.3.0
deprecatedThe 'mvn.resolve' function does not support custom repository URLs easily; it defaults to Maven Central only.
fix
Use a separate HTTP client to fetch from custom repos and manually construct artifacts if needed.
affects: 0.3.x
Upgrade
Version history
0.3.2latest on PyPI · released Mar 21, 2024
Audit
Dependencies
requestsrequiredHTTP requests to Maven repositories
lxmlrequiredXML parsing for Maven POM files
Agent activity
5 hits · last 30 days
node
4
Resources
pymaven-patch — pip install pymaven-patch · libregistry