Skip to main content

a shared library for file finding and source resolution with gitignore support

Project description

libsightseeing

a shared library for file finding and source resolution with gitignore support.

overview

libsightseeing provides a simple api for finding files in repositories while respecting .gitignore files and supporting include/exclude patterns.

installation

pip install libsightseeing

usage

simple api

from libsightseeing import find_files

# find all python files
files = find_files(".", include=["*.py"])

# find files excluding tests
files = find_files("src", exclude=["tests"])

# include gitignored files
files = find_files(".", include=["*.py"], respect_gitignore=False)

advanced api

from libsightseeing import SourceResolver

resolver = SourceResolver(
    root=".",
    include=["src/**/*.py"],
    exclude=["tests"],
    respect_gitignore=True,
)
files = resolver.resolve()

features

  • respects .gitignore files automatically
  • supports glob patterns for include/exclude
  • simple one-liner api
  • configurable resolver for advanced use cases
  • only depends on gitignore-parser

licence

mit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libsightseeing-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file libsightseeing-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: libsightseeing-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for libsightseeing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cee296d57bfa3e3523784dc46d24f0ed2ef69be78345b260e5d9753b054b627b
MD5 12adf975e3219f9905ae2197d48d2ec1
BLAKE2b-256 d7e9488d4bc707bc4758f987d96d6ea65e347817f867441563acef57d825d2c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page