Skip to main content

💨 Kuling 💨

A simple, intuitive Python library for file operations with clean APIs and robust error handling.

🚀 Features

  • Glob Pattern Matching 🔍 - Find files with support for *, ?, [abc], and ** wildcards
  • Safe File Operations 📁 - Move, copy, and delete files with automatic directory creation
  • Robust Error Handling ⚠️ - Clear exceptions for all edge cases
  • Path Flexibility 🛤️ - Works with both strings and Path objects
  • Type Safety 🔒 - Full type hints for better IDE support

📦 Installation

pip install kuling

🔧 Quick Start

from kuling import find_matching_paths, move_file, copy_file, delete_file

# Find all Python files recursively
python_files = find_matching_paths("/project/**/*.py")

# Move a file (creates parent directories automatically)
move_file("old/location/file.txt", "new/location/file.txt")

# Copy a file to a directory (keeps original name)
copy_file("important.txt", "backups/")

# Delete a file
delete_file("temp/unwanted.log")

🔧 Advanced Features

Pattern Matching Examples

# Question mark - single character
find_matching_paths("file?.txt")  # file1.txt, fileA.txt

# Character sets
find_matching_paths("test[123].py")  # test1.py, test2.py, test3.py
find_matching_paths("file[abc].txt")  # filea.txt, fileb.txt, filec.txt

# Negation
find_matching_paths("test[!1].py")  # test2.py, test3.py (not test1.py)

# Recursive search
find_matching_paths("**/*.py")  # All .py files in all subdirectories

# Combined wildcards
find_matching_paths("logs/*/2024/*.log")  # Logs in any subdirectory for 2024

Path Flexibility

from pathlib import Path

# All functions accept both strings and Path objects
source = Path("file.txt")
dest = "backup/"

copy_file(source, dest)  # Mixed types work fine
copy_file(str(source), str(dest))  # Strings work
copy_file(source, Path(dest))  # Path objects work

🔗 Links

Metadata

Release files for kuling 1.0.2

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

Source distribution (sdist)

Source distribution for kuling 1.0.2
File Size Uploaded Provenance Actions
kuling-1.0.2.tar.gz 15.4 kB Without provenance Details for kuling-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kuling 1.0.2
File Interpreter ABI Platform Actions
kuling-1.0.2-py3-none-any.whl Python 3 none any Details for kuling-1.0.2-py3-none-any.whl

Total release size: 31.9 kB

Release files / kuling-1.0.2.tar.gz

Download URL kuling-1.0.2.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d6ec3d6b10f384bbaf43edd7480a6751f7f4f7640da4da2e593688b614a225dc
BLAKE2b-256 checksum
How to use checksums
07295dc85e71795239c15dd252a42d63cd1e9b718733f51d106c6ef2eafe23c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / kuling-1.0.2-py3-none-any.whl

Download URL kuling-1.0.2-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cddcbf68c3da041adb5619d491e85e43e4a977bdd50e29b236ce1a11ea1577b6
BLAKE2b-256 checksum
How to use checksums
6214f9ad1dc09136f97ca514e02324db428c518573cb4d377eca9d42db54f93f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for kuling 1.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

1.0.2 This release

2 release files No 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