Skip to main content

Utility for checking whether a path is ignored by ignore files like .gitignore

Project description

isignored

Utility for checking whether a path is ignored by ignore files like .gitignore.

Installation

pip install isignored

Usage

from isignored import is_ignored

# Check if a file is ignored by .gitignore
is_ignored("path/to/file.log")  # True if ignored

# Check against multiple ignore files
is_ignored("path/to/file", [".gitignore", ".dockerignore"])

# Check with no ignore files
is_ignored("path/to/file", [])  # Always False

Features

  • Simple API with one main function
  • Supports .gitignore syntax (subset)
  • Works with any ignore file format
  • Handles nested ignore files
  • Caches ignore file contents for performance

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

isignored-0.1.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

isignored-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file isignored-0.1.1.tar.gz.

File metadata

  • Download URL: isignored-0.1.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for isignored-0.1.1.tar.gz
Algorithm Hash digest
SHA256 510570cc196f804ac74bea56600d083ecb6f19e3ad862cf32f26a3533ad11f9f
MD5 dcec04b7e9dd277cb7fc1ea37dd66792
BLAKE2b-256 b63cbbbbdf055db6b89eb47cd571f741ef3c8e38a2de3ea228700b649b218a1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for isignored-0.1.1.tar.gz:

Publisher: publish.yml on nielsrolf/isignored

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file isignored-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: isignored-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for isignored-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df28ba95b067a1e34c4d7e27d6c984ff98d9cc0b6c42183402dfeda3d80ecf27
MD5 46e23c005bb6ea1b698bf818decc17cf
BLAKE2b-256 4ce94f76f5c1c9732fffda468fec540ab28d2d94d7e3f46bcde2fe71a9c762bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for isignored-0.1.1-py3-none-any.whl:

Publisher: publish.yml on nielsrolf/isignored

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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