A utility to recursively locate files by name.
Project description
mp_locate
mp_locate is a simple Python library for finding files by name recursively from a base directory.
✨ Features
- Recursive file search
- Configurable base path (or use the current directory)
- Support for returning single or multiple found files
⚡ Installation
pip install mp_locate
Or install locally:
pip install -e .
📄 Usage example
from mp_locate import find_file
# Find the first file with the specified name
path = find_file("data.csv")
# Return all found paths
all = find_file("data.csv", return_all=True)
✉ License
MIT. See the LICENSE file for more details.
mp_locate Portuguese
mp_locate é uma biblioteca Python simples para localizar arquivos por nome de forma recursiva a partir de um diretório base.
✨ Características
- Busca recursiva por arquivos
- Caminho base configurável (ou usa o diretório atual)
- Suporte a retorno único ou múltiplos arquivos encontrados
⚡ Instalação
pip install mp_locate
Ou instale localmente:
pip install -e .
📄 Exemplo de uso
from mp_locate import find_file
# Localizar o primeiro arquivo com nome especificado
caminho = find_file("dados.csv")
# Retornar todos os caminhos encontrados
todos = find_file("dados.csv", retornar_todos=True)
✉ Licença
MIT. Veja o arquivo LICENSE para mais detalhes.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mp_locate-0.1.2.tar.gz.
File metadata
- Download URL: mp_locate-0.1.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f217292856b2c6bb5f9db63d55a8c9414aa7da3dc4e223fd4be59b403faeca6f
|
|
| MD5 |
253f2c755516fe829b9bfcf578de31cc
|
|
| BLAKE2b-256 |
718b7a6c56b1e94af0cb758e64a8d135df042b2ed651d7ae4ab6150221b283e7
|
File details
Details for the file mp_locate-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mp_locate-0.1.2-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0edd80bd229fb6009355e4bd46957871b8e1716f34d47d47d5b5b06eb34ee94f
|
|
| MD5 |
f10b318de902a4cddc6852d70a6d0b30
|
|
| BLAKE2b-256 |
49b77848a3e84999eafc196d92556eedbd32a7735fe28e2e84f054da22a0cc25
|