Skip to main content

name_conflict_resolver

A small Python library that decides how to rename files to avoid conflicts.

example

This example can also be found in eample.py

from pathlib import PurePosixPath as p
from name_conflict_resolver import NameConflictResolver

names = [p("/home/andrew/foo"), p("/home/andrew/bar"), p("/home/andrew/foo")]

# We can currently distinguish these names by their index in the array, so
# we use the list of indices as the keys. Meanwhile, we can obtain a 
# corresponding path from a key using the __getitem__ method of names.
resolver = NameConflictResolver.from_keys(range(len(names)), names.__getitem__)

for f, (orig_destination, destination) in resolver.resolve():
    print(f"Path at index {f}: {orig_destination} -> {destination}")

Output:

Path at index 2: /home/andrew/foo -> /home/andrew/foo_1
Path at index 0: /home/andrew/foo -> /home/andrew/foo
Path at index 1: /home/andrew/bar -> /home/andrew/bar

Metadata

Release files for name-conflict-resolver 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for name-conflict-resolver 0.0.1
File Size Uploaded Provenance Actions
name_conflict_resolver-0.0.1.tar.gz 3.1 kB With provenance Details for name_conflict_resolver-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for name-conflict-resolver 0.0.1
File Interpreter ABI Platform Actions
name_conflict_resolver-0.0.1-py3-none-any.whl Python 3 none any Details for name_conflict_resolver-0.0.1-py3-none-any.whl

Total release size: 5.9 kB

Release files / name_conflict_resolver-0.0.1.tar.gz

Download URL name_conflict_resolver-0.0.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
958c519970d376f900cc0be260879ec46823dc5807638df4e45e2ec164ef7fb8
BLAKE2b-256 checksum
How to use checksums
ad55ada7a2aa03e653b19c269caca7cdf1990b5c4d50e9fb3bdaca3daba567b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / name_conflict_resolver-0.0.1-py3-none-any.whl

Download URL name_conflict_resolver-0.0.1-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8c223adf7c5d849206d25ca1ba5f66e4bed5d54a73ede105fe2cf16398bbb8a
BLAKE2b-256 checksum
How to use checksums
db4e1b0e8bd1255cdb602803bef7dfa26166a2e2844582e892bd7a8d77f474f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Security for name-conflict-resolver 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for name_conflict_resolver-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page